Arc

class kurbopy.Arc(center, radii, start_angle, sweep_angle, x_rotation)

A single arc segment.

area()

Compute the signed area under the curve.

For a closed path, the signed area of the path is the sum of signed areas of the segments. This is a variant of the “shoelace formula.” See: <https://github.com/Pomax/bezierinfo/issues/44> and <http://ich.deanmcnamee.com/graphics/2016/03/30/CurveArea.html>

This can be computed exactly for Béziers thanks to Green’s theorem, and also for simple curves such as circular arcs. For more exotic curves, it’s probably best to subdivide to cubics. We leave that to the caller, which is why we don’t give an accuracy param here.

bounding_box()

The smallest rectangle that encloses the shape.

center
contains(pt)

Returns true if the [Point] is inside this shape.

This is only meaningful for closed shapes.

perimeter(accuracy)

Total length of perimeter.

radii
start_angle
sweep_angle
to_cubic_beziers(tolerance, fun)

Converts an Arc into a series of cubic bezier segments.

Closure will be invoked for each segment.

to_path(tolerance)

Convert to a Bézier path.

winding(pt)

The winding number of a point.

This method only produces meaningful results with closed shapes.

The sign of the winding number is consistent with that of area, meaning it is +1 when the point is inside a positive area shape and -1 when it is inside a negative area shape. Of course, greater magnitude values are also possible when the shape is more complex.

x_rotation