From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: passvariable(); path problem
Date: Mon, 07 Oct 2013 13:02:24 +0200 [thread overview]
Message-ID: <525294C0.10204@gmx.net> (raw)
In-Reply-To: <CAG5iGsCBxx=N8OUAyZuLveCtzQTyW7hoT-1reWaduNome_DLeg@mail.gmail.com>
Am 07.10.2013 11:47, schrieb luigi scarso:
>
>
>
> On Mon, Oct 7, 2013 at 10:48 AM, Peter Rolf <indiego@gmx.net
> <mailto:indiego@gmx.net>> wrote:
>
> 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
@Luigi: thanks for the fix!
@Hans: quickanddirty sounds promising (bbox is needed anyway) :-D
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2013-10-07 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 12:52 Peter Rolf
2013-10-04 14:15 ` Hans Hagen
2013-10-04 14:47 ` Peter Rolf
2013-10-04 14:59 ` Peter Rolf
2013-10-05 15:52 ` Peter Rolf
2013-10-05 22:37 ` Hans Hagen
2013-10-06 13:05 ` Peter Rolf
2013-10-06 15:06 ` Hans Hagen
2013-10-07 8:48 ` Peter Rolf
2013-10-07 9:47 ` luigi scarso
2013-10-07 10:03 ` Hans Hagen
2013-10-07 11:02 ` Peter Rolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525294C0.10204@gmx.net \
--to=indiego@gmx.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).