Closed cannin closed 8 years ago
Original comment by: amarillion
Original comment by: amarillion
Frank also mentioned the possibility of defining arcs as list of segments (with segment = either a Bezier curve or a straight line)
It can be seen as an advanced version of the above suggestion (or is it a separate "bug"/missing feature to track?)
Original comment by: alice_villeger
Original comment by: amarillion
I'm copying the last proposal on the mailing list here, because it appears that most people like it
How about this: If we assume that a path goes from point to point, with at least one start point and one end point, and either straight or curved segments in between, then a path consisting of three straight edges can be defined like this:
<arc> <start x,y /> <line x,y /> <line x,y /> <line x,y /> </arc>
So the "start" tag defines the starting point, and each subsequent "line" goes from the previous point to the new point. This is how SVG paths work, as well as the Graphics2D API, so it would be really easy to implement. The start x,y is the start point of course, and the final line x,y is the end point, so start and end point are really easy to find. Here is how you would define a path with quadratic bezier curves:
<arc> <start x,y /> <quadratic x,y,x1,y1/> <quadratic x,y,x1,y1/> <quadratic x,y,x1,y1 /> </arc>
It's still easy to find the start and end point, so for less capable software it's easy to approximate the arc with a straight line. You can mix straight and curved segments:
<arc> <start x,y /> <straight x,y/> <quadratic x,y,x1,y1/> <straight x,y /> </arc>
Here is how you would define a single straight arc:
<arc> <start x,y /> <line x,y /> </arc>
You can even add cubic bezier curves easily:
<arc> <start x,y /> <cubic x,y,x1,y1,x2,y2/> <quadratic x,y,x1,y1/> <straight x,y /> </arc>
Original comment by: amarillion
Original comment by: amarillion
Assigning to alice, she has an example of mixed straight / curved arcs
Original comment by: amarillion
Original comment by: amarillion
Original comment by: alice_villeger
Frank Bergmann: would it be possible to just include two optional points for the arcs, that will allow us to use nice looking Bezier curves? That really would make a difference for me ...
Reported by: amarillion