On Mon, Oct 7, 2013 at 10:48 AM, Peter Rolf
Am 06.10.2013 17:06, schrieb Hans Hagen:
On 10/6/2013 3:05 PM, Peter Rolf wrote:
Thanks for the explanation. I think I have understood the scheme (but I might be wrong, because this doesn't help me with my example).
Where is the starting point['20 20'] in the returned example path? Same is true for the first control point ['20 190.34']. Either I'm missing something, or the returned path data is incomplete.
you get just the value of the path variable in your mp code, not a ps or whatever representation and in mp a path has just points so the starting point is the x y of the first point
I tested several examples and the only time that the starting point was part of the returned path was, when the path only consists of one point. In all other cases it was missing.
This is a bit contrary to my definition of a (complete) path. Anyhow, thanks for the pointer :-)
in mp-mlib.mpiv should be : vardef mfun_path_to_string(expr p) = mfun_point_to_string(p,0) for i=1 upto length(p) : & " " & mfun_point_to_string(p,i) endfor enddef ; (You can fix it and rebuild the format. To understand the output, is better to know that mfun_point_to_string is vardef mfun_point_to_string(expr p,i) = decimal xpart (point i of p) & " " & decimal ypart (point i of p) & " " & decimal xpart (precontrol i of p) & " " & decimal ypart (precontrol i of p) & " " & decimal xpart (postcontrol i of p) & " " & decimal ypart (postcontrol i of p) enddef ; ) -- luigi