Thanks Taco! I have been playing about with an example from this site https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html which was originally for a square and I obviously didn't get my angles right. Thanks for spotting it. I'm beginning to appreciate where the Fun in MetaFun comes from. Best Wishes Keith On 15/08/2020 18:35, Taco Hoekwater wrote:
Hi Keith,
It took me a while before I saw it, but I think you wanted to type in
z0 = (60,60); z1 = z0 rotated 120; z2 = z0 rotated 240;
instead of
z0 = (60,60); z1 = z0 rotated 120; z2 = z1 rotated 240;
because the latter puts z2 at z0, resulting in a path that is a straight line. The fact that AR displays anything at all is probably some form of correction like "fill of empty path == single pixel line”.
Best wishes, Taco
On 15 Aug 2020, at 17:39, Keith McKay
wrote: Dear List
I have come across a problem which I don't think is due to ConTeXt but I'm hopping the great and the good of this list may be able to explain what is going on.
The code below produces an MPpage with a shaded background and two graphics along with a line of outlined text. When I view in Adobe (or the output from TeXworks) I see everything as it should be. However, I wanted to convert the MPpage to a jpeg file and when I opened the pdf in either Apple MAC Preview or Gimp 2.10 the two graphics are missing, and I have no idea why.
Could someone explain a way round this? Here is the code.
Thanks
Keith
%%%%%%%%%%%%%%%%%%%%%%%%%% system >
system > ConTeXt ver: 2020.07.29 18:36 LMTX fmt: 2020.7.29 int: english/english system >
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setuppapersize [A5, portrait] \usecolors[crayola] \starttext \startMPpage StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; definecolor [ name = "MyColor1", r = 0.781, g = 0.5, b = 0.5 ] ; definecolor [ name = "MyColor3", r = 1, g = 1, b = 0.7983 ] ; draw lmt_shade [ path = unitsquare xscaled 14.8cm yscaled 21cm, direction = "up", alternative = "linear", colors = { "MyColor1", "MyColor3" }, ] ; z0 = (60,60); z1 = z0 rotated 120; z2 = z1 rotated 240; path carre; carre = z0--z1--z2--cycle; picture pic; pic := image( numeric d; d := 0.0005; for i=1 step -d until d: fill carre scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; fill carre rotated (45) scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; fill carre rotated (90) scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; fill carre rotated (135) scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; fill carre rotated (180) scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; fill carre rotated (225) scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ; endfor;); draw pic rotatedaround(center pic, 270); draw pic rotatedaround(center pic, 90) shifted (7cm,-13cm) ; draw lmt_outline [ text = "Page 18" kind = "draw", drawcolor = "VividTangerine", ] xsized TextWidth shifted (1cm,7.67cm); StopPage; \stopMPpage \stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Taco Hoekwater Elvenkind BV
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________