On 2/15/2020 12:25 PM, Fabrice Couvreur wrote:
Hi Henri,
Why does the blue path not rotate 90 with the draw command but rotate with the fill command?

compare

draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor red; draw (origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle) rotated alpha withcolor blue;



\startMPcode

   def match (expr alpha, pos) =
     fill unitsquare xscaled 4cm  yscaled 0.2cm rotated alpha shifted pos
     withcolor yellow ;
     fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --  (0.1cm,-0.05cm) --
     cycle rotated alpha withcolor(.6yellow + black);
     draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
     -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
      draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
     -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor blue;
     draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
     rotated alpha;
     draw fullcircle xscaled 0.50cm yscaled 0.44cm shifted (4.125cm,0.1cm)
     rotated alpha
     withshademethod "circular 1"
     withshadevector (0,1)
     withshadecolors (red,white);
     enddef;
   match(0,(0,0));
   match(90,(4.2cm,0));
   match(90,(0,0));
   match(0,(0,4.2cm));

\stopMPcode-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to