[cairo] [off topic?] SVG question elliptical arc question

Travis Griggs tgriggs at cincom.com
Mon Nov 9 10:49:41 PST 2009

I am trying to render the SVG 'a' (elliptical arc) path command in  
Cairo using just the arc drawing APIs and various transforms. One  
question has come up as I work through it though.

Assuming that the two endpoints of the arc and the x_axis_rotation  
jive such that the arc is normal to the vector between the two end  
points, what happens if the rx value (x radius) is less than half of  
the distance between the two points? The svg spec example does just  
that, sets an rx of 25, but the distance between the two points is  
~56. So this begs the question of what to do? If the rx is half the  
distance, then the center of the ellipse lies along the vector. If rx  
is big, then it is off axis, making room for a bigger ellipse that  
includes the two points. But I don't know what the right way to  
proceed for the less than case is.


Travis Griggs
One man's blue plane is another man's pink plane.

More information about the cairo mailing list