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
startStarting angle
endEnding Angle
Return Value
An array of
BezierPathwhich 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
shapesShapes to operate on
operationThe operation to perform
Return Value
An array of the resulting paths
View on GitHub
Polygon Protocol Reference