[NTG-context] Hatch an area with Metapost (Metafun)

John Kitzmiller kitz at inradius.net
Tue Feb 17 14:51:20 CET 2015


On Feb 16, 2015, at 3:21 PM, Fabrice Couvreur wrote:
> 
> This does not work with :
> 
> labeloffset := 2mm;



On Feb 09, 2015, Hans Hagen wrote:

\startMPpage[offset=2pt]
     path p, q, r ; pair z ;
     p := unitsquare scaled 4cm ;
     z := point 3.6 of p ;
     q := z--urcorner p ;
     r := q -- reverse bottomboundary p -- cycle ;
     draw p ;
     draw q ;
     draw r numberstriped (.25,10,5) withcolor blue ;
     draw thetextext.llft("B", llcorner p) ;
     draw thetextext.lrt ("C", lrcorner p) ;
     draw thetextext.ulft("A", ulcorner p) ;
     draw thetextext.urt ("D", urcorner p) ;
     draw thetextext.lft ("M", z) ;
\stopMPpage
Hello Fabrice,

labeloffset does not work with Hans’ code above using ‘draw thetextext’ for labels. It works with the label macro:

\startMPpage[offset=2mm]
 path p, q, r ; pair z ;
 p := unitsquare scaled 4cm ;
 z := point 3.6 of p ;
 q := z--urcorner p ;
 r := q -- reverse bottomboundary p -- cycle ;
 draw p ;
 draw q ;
 draw r numberstriped (.25,10,5) withcolor blue ;
 labeloffset := 2mm ;
 label.llft("B", llcorner p) ;
 label.lrt ("C", lrcorner p) ;
 label.ulft("A", ulcorner p) ;
 label.urt ("D", urcorner p) ;
 label.lft ("M", z) ;
 \stopMPpage

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150217/077ab78b/attachment.html>


More information about the ntg-context mailing list