Skip to content Skip to sidebar Skip to footer

How To Determine The Large-arc-flag In Path Arc

I have the two coordinate start(x1,y1) end(x2,y2) and circle(c1,c2) x1, y1, x2, y2, c1, c2, radius, clockwise I want to draw an arc, from (x1,y1) to (x2,y2), I think the SVG Path

Solution 1:

The diagram in this section of the spec pretty much explains what is going on.

http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands

If you have a start point, end point, and a radius, then the arc between those points is either going to be a small arc (<180deg) or a large arc (>180deg - the long way around the circle). That's assuming the centre of the circle isn't directly between the two points, of course.

In most cases you probably want the short-cut. That is, large-arc-flag = 0.

Normally it is the other flag, sweep, which is the trickier one.

Post a Comment for "How To Determine The Large-arc-flag In Path Arc"