Draw modifications
Theo Markettos (89) 919 posts |
I consider this to be a bug in Draw and/or the Draw module, but maybe others disagree? When drawing a line with end caps, like triangles, the end caps are added to the length of the line. But if you have a line with, say, arrows on the end you expect the tips of the arrows to be where the line endpoint is, not the base of the arrow. So, when the grid is switched on, it’s very tricky to get the point of the arrow to abut another object because you have to tweak the base of the arrow to be a short distance away, which isn’t covered by grid lock. Should Draw draw end caps within the length of the line it plots? This would mess up existing drawings. Could there be some way of fixing this without breaking them? (Exactly the same happens in Vector, FWIW) |
Ben Avison (25) 445 posts |
I’ve always found this irritating myself too, but I can imagine why it’s been done that way: there’s no need to worry about the case where the caps are larger than the line itself, and for Bezier curves it’s much easier to work out the angle at which to plot the end cap if it’s beyond the end of the line rather than inside it. Having said that, if someone fancies trying to fix it, I’d suggest doing so by keeping the old end caps and adding three new ones, to prevent the whole issue with old DrawFiles looking wrong in new versions of Draw (which would be bad). The opposite problem, of some new DrawFiles looking wrong in old versions of Draw, is unavoidable and less important (especially since new versions of Draw will be available to all users). |
nemo (145) 2529 posts |
It’s not a bug of course, it’s done that way because that’s how Postscript does it. And PDF. And XPS… They AREN’T arrowheads, they’re end-caps – so they go at the end. Pulling arrowheads back involves more than joining a perpendicular via a couple of beziers to the end point (as per Ben’s example) – one has to handle collisions with joins or the other end in short segments, the optical problem of where the “end” is, and the knotty problem of how this would interact with dashing. |