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

John Kitzmiller kitz at inradius.net
Wed Feb 11 12:45:13 CET 2015

On Feb 10, 2015, at 3:42 PM, couvreur.fabrice at wanadoo.fr <mailto:couvreur.fabrice at wanadoo.fr> wrote:
> Is it  possible to have  some explanation of  the parameters of  the  macro  numberstriped(#1,#2,#3)  ?
> How to have  horizontal hatching  ?  (How to  change the slope  hatching  ?)

There is also anglestriped in mp-tool with some examples. The second argument changes the angle.

  path p, q ;
  p := unitsquare scaled 4cm ;
  z1 = point 3.6 of p ;
  q := subpath (0,2) of p -- z1 -- cycle;
  q := q shifted(-4cm,-4cm);
  draw q anglestriped(1,180,6) withcolor blue;
  draw p ; 

(I have not yet found why the striped path q goes out of position. Looking at mp-tool may help.)

> I  just noticed  that the position of  labels  is not  quite the  same  when using  macros  and macro  Metafun Metapost:
> I think the  labels are  too near to the  corners of the square  with the  macro  Metafun.

Try the mpost variable lableoffset := ? to adjust.

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

More information about the ntg-context mailing list