SVG and elliptical arcs

Need help with Photoshop, the GIMP, Illustrator, or others? Want to show off your work? Looking for advice on your newest Flash stuff?

Moderator: General Moderators

Post Reply
skylark2
Forum Commoner
Posts: 32
Joined: Wed Jun 16, 2010 6:00 am

SVG and elliptical arcs

Post by skylark2 »

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...
Post Reply