From: Michael J G. <mic...@us...> - 2012-05-14 09:05:53
|
Joerg Lehmann venit, vidit, dixit 13.05.2012 17:20: > Hi Michael, > > Thanks for the patch. I am not sure, however, whether it really improves > the situation. In particular, I do not like the fact that varying the > pos argument at the beginning and end of the path does not move the > arrow at all. If I understand the intention of the change correctly, it > means that the arrow is always positioned at the end of the > constriction - as long as this is possible. Why is this desirable? That means I have not made myself clear enough. Let me try again: We do try to position the arrow head based on the "inward tip" (constriction center) since r3151, which can be considered the "middle of the head". I don't propose changing that. PATCH 1/2 only makes sure that the same positioning is applied to reversed heads, i.e. non-reversed and reversed are mirror symmetric with respect to (an axis through) the "middle of the head", i.e. the positioning center. The problem I'm trying to address with PATCH 2/2 is: An arrow head positioned with pos=0.5 ist not positioned at 0.5*arclen, e.g. a semicircle. It is positioned at 0.5*(arclen-constrictionlen). This becomes quite visible when you're trying to position arrow heads at various intermediate positions, but also when you try to line up arrow heads with other decorations (such as text) which are *really* positioned at pos*arclen (or relarclenpos*arclen, there's no consistent naming). In the example which I provided, notice how the position of the ("middle of the") arrow heads does not scale linearly with the radius of the circle, even though the pos argument is always the same. It's the result of this principle: We calculate/restrict "admissible positions" so that 0 and 1 mean begin and end arrow, where an end arrow head has its tip lined up the end of the path, and a begin arrow has its constriction center lined up with the start of the path. That's why (1-0) has to mean (arclen-constrictionlen) which creates the other problems. Basically, I would love (1-0) to mean arclen (patch 2/2), i.e. everything relative to full arclen, then a beginhead would have pos=0, and an endhead would be at pos=1-constrictionlen/arclen. Consequently, a head at pos=1 would have its constriction center ("middle") at the end of the path. This would require additional adjustments to the way we cut the path, though. Which is why I did the min/max thingy. Cheers, Michael |