[NTG-context] METAPOST: How do I get this 'max' cutafter to work?
Taco Hoekwater
taco at elvenkind.com
Wed Apr 22 09:30:46 CEST 2020
Hi,
> On 21 Apr 2020, at 17:52, Gerben Wierda <Gerben.Wierda at rna.nl> wrote:
>
>> pair a ; a := arrowHead intersection_point connection ;
Hans’ example also works with “intersectionpoint”: the differences between intersectionpoint
and intersection_point are minimal except if there is no intersection at all.
The trick is that Hans does not use cutafter. cutafter is designed to cut off as little as
possible, it is a cutbefore on both paths reversed. So, uses the last intersection point of
the paths, and in this case it will therefore use the top of the arrowhead.
In contrast, intersectionpoint finds the first intersection on the non-reversed paths, which
is the base of the arrowhead.
Alternatively (in this case), you could move the arrowhead up a tiny amount, so that there is
only one intersection between the connection and arrowHead.
Best wishes,
Taco
More information about the ntg-context
mailing list