Bug with the binary operator `point ... on ...` from Metafun
Franck Pastor <[email protected]>
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
I’ve just encountered a very puzzling bug with the binary operator `point <len> of <path>` defined in the Metafun format. In the Metafun manual (http://www.pragma-ade.com/general/manuals/metafun-p.pdf), p. 61, this binary operator is defined as such: primarydef len of pat = (arctime len of pat) of pat enddef; So if I write `point 0 on pat`, it should return the starting point of the path <pat>, right? But n. To the contrary, it returns the end point of <pat>! Stranger yet, if I try `point (arctime 0 of pat) of pat`, it returns the starting point, as expected. This weird behavior is illustrated by the following program, to be run with the Metafun format of course: beginfig(1); path line[]; line1 = origin -- 3cm*right; line2 = line1 yshifted -1cm; draw line1; draw line2; pickup pencircle scaled 3bp; draw point 0 of line1; % draw a dot at the start point, as expected draw point 0 on line1; % draws a dot at the end point!!!!! draw point (arctime 0 of line2) of line2; % draws a dot at the starting point… endfig; end. An idea about what is wrong? I use MetaPost 1.902 and Metafun version 1.004, from TeX Live 2014. Thanks in advance, Franck Pastor -- http://tug.org/metapost/