
2009/6/17 Daniel Pope <mauve@...1559...>:
I used some software once that had these, though I can't remember the name of it. SomethingDraw I think. In that your paths were either/or - you would use either a bezier tool, or a quadratic tool, or an elliptical segment tool.
This is wrong. We can have any of those segments in any path: SVG allows to mix them freely. Not to mention it would be very confusing, because we would now have several modes of the node tool, and modes are bad. I didn't think about drawing such paths yet - for now it's sufficient if we can change the type of a segment to either quad or arc and edit it.
Now actual UI ideas. For quadratic beziers, it's rather easy: we have something like two cubic bezier handles glues together. It's a bit harder for elliptical arcs. The ellipse-fitting toy from 2geom uses three points on the arc, but it's hard to get the shape you want with this kind of control. The ellipse tool uses the bounding rectangle, but this approach doesn't make much sense for paths when the ends of the arc are fixed. Here are my initial ideas:
a) Ellipse's major and minor axis end with handles. Dragging on one of the handles would leave the second handle of the same axis in place and update the handles of the other axis appropriately. Unwieldy for shallow arcs.
b) Draw the entire ellipse as a helper path, allow dragging any part of it and do the "expected thing". Not very precise, unwieldy for shallow arcs.
c) Use the ellipse's foci and a point on the arc as handles. Dragging any of the handles would have to change the position of at least one other handle, so they wouldn't be independent, unwieldy for shallow arcs.
d) Use a point on the arc with one handle which specifies the direction of the normal at that point. The point would be independent, but there would be keys to drag the point along the arc without changing the shape with the tangent point following. Pros: can edit very shallow arcs with ease. Cons: might not work well for arcs larger than 180 degrees, I don't know how to do this mathemathically :), not sure about interaction with smooth and symmetric nodes.
Regards, Krzysztof