SVG and elliptical arcs
Posted: Wed Oct 06, 2010 6:27 am
I'm converting a Windows program to be a web application and am using SVG for the graphics. Has anyone done something like this and can point me at the correct logic to convert the parameters which the Windows GDI "arc" routine expects (the bounding box for the rectangle the ellipse would fit into, plus start and end coordinates) into equivalents for an SVG elliptical curve path?
All suggestions gratefully received...the start and end points are obvious, the radii can be calculated easily from the dimensions of the rectangle...but the sweep and large-arc flags are going to depend on the location of the rectangle and I'm struggling...
All suggestions gratefully received...the start and end points are obvious, the radii can be calculated easily from the dimensions of the rectangle...but the sweep and large-arc flags are going to depend on the location of the rectangle and I'm struggling...