Polygon
public protocol Polygon : Intersectable
Represens a Shape
that has an internal area
-
The center of the shape
Declaration
Swift
var center: Vector { get set }
-
A boolean indicating whether the specified point lies within the shape
Declaration
Swift
func contains(_ point: Vector) -> Bool
-
Create a Bézier path representing the shaoe
Declaration
Swift
func bezierCurve(start: Radians, end: Radians) -> [BezierPath]
Parameters
start
Starting angle
end
Ending Angle
Return Value
An array of
BezierPath
which draw the shape -
booleanOperation(_:
Extension method_: ) Perform a Boolean operation between the specified shapes.
Declaration
Swift
public func booleanOperation(_ shapes: [Polygon], _ operation: BooleanOperation = .add) -> [BezierPath]
Parameters
shapes
Shapes to operate on
operation
The operation to perform
Return Value
An array of the resulting paths