Path
public class Path : Shape
extension Path: CGDrawable
extension Path: SVGDrawable
extension Path: Hashable
Represents a multi-point path
-
A Rectangle that contains the receiver
Declaration
Swift
public var boundingBox: Rectangle { get }
-
Points that make up the path
Declaration
Swift
public var points: [Vector]
-
Whether to close the path
This is done by appending the first point to the end of
points
while drawingDeclaration
Swift
public var close: Bool
-
Instantiate a new Path from an array of Vectors
Declaration
Swift
public init(points: [Vector] = [])
Parameters
points
Points in the path
-
Instantiate a new Path from an array of Vectors
Declaration
Swift
public convenience init(point: Vector)
Parameters
points
Points in the path
-
Instantiate a new Path from a Bézier curve
Declaration
Swift
public convenience init(_ bezier: BezierPath)
Parameters
bezier
The curve it convert to sharp lines
-
Append a point to the path
Declaration
Swift
public func addPoint(_ point: Vector)
Parameters
point
New Vector
-
Append an array of points to the path
Declaration
Swift
public func addPoints(_ points: [Vector])
Parameters
point
New Vectors
-
Append the points of another Path
Declaration
Swift
public func addPoints(_ other: Path)
Parameters
other
The other Path
-
Create a smooth Bézier curve
Declaration
Swift
@available(*, deprecated, message: "Use BezierPath(_:smoothing:﹚ instead.") public func smoothLine() -> BezierPath
-
Draw the receiver in the specified context
Declaration
Swift
public func draw(in context: CGContext)
Parameters
context
Context in which to draw
-
Draw a representation of the receiver meant for debugging the shape in the specified context
Declaration
Swift
public func debugDraw(in context: CGContext)
Parameters
context
Context in which to draw
-
Create an
XMLElement
for the Path in its drawing styleDeclaration
Swift
public func svgElement() -> XMLElement
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.
Declaration
Swift
public static func == (lhs: Path, rhs: Path) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)