Path
public struct Path
extension Path: CollectionWrapping
extension Path: Additive
extension Path: Equatable
extension Path: CustomStringConvertible
Undocumented
-
Undocumented
Declaration
Swift
public var isShape: Bool { get } -
Declaration
Swift
public var isEmpty: Bool { get }Return Value
trueif there are no non-.closeelements contained herein. Otherwise,false. -
Warning
This uses a simplification technique for calculateing the bounding boxes of quadratic and cubic Bézier curves, which may result in some inaccuracy for whacky curves.
Declaration
Swift
public var axisAlignedBoundingBox: Rectangle { get }Return Value
The axis-aligned bounding box for
Path. -
Undocumented
Declaration
Swift
public let curves: [BezierCurve]
-
Create a
Pathwith a singlecurve.Declaration
Swift
public init(_ curve: BezierCurve) -
Create a
Pathwith the givencurves.Declaration
Swift
public init(_ curves: [BezierCurve]) -
Create a
Pathwith the givenpathElements.Declaration
Swift
public init(pathElements: [PathElement])
-
Declaration
Swift
public func simplified(segmentCount: Int) -> PolygonReturn Value
Polygonal representation of the
Path.
-
Undocumented
Declaration
Swift
public static func arrowhead( tip: Point = Point(), height: Double = 100, width: Double = 25, barbProportion: Double = 0.25, rotation: Angle = .zero ) -> Path
-
Declaration
Swift
public static func circle(center: Point, radius: Double) -> PathReturn Value
Pathwith a circle shape with the givenradiusandcenter.
-
Declaration
Swift
public static func ellipse(in rect: Rectangle) -> PathReturn Value
Pathwith an ellipse shape within the givenrectangle. -
Undocumented
Declaration
Swift
public static func line(from start: Point, to end: Point) -> Path
-
Note
The sides are always vertical, independant of the slope.
Note
Useful for accidental components and system dividers.
Declaration
Swift
public static func parallelogram( center: Point, height: Double, width: Double, slope: Double ) -> PathReturn Value
Pathof a slanted bar. -
Creates a
Pathwith the givenpolygon.Declaration
Swift
public init<P>(_ polygon: P) where P : PolygonProtocol -
Undocumented
Declaration
Swift
public init(vertices: [Point])
-
Declaration
Swift
public static func rectangle(_ rect: Rectangle) -> PathReturn Value
Pathwith a rectangle shape defined byrectangle. -
Declaration
Swift
public static func rectangle(origin: Point, size: Size) -> PathReturn Value
Pathwith a rectangle shape with the givenoriginandsize. -
Declaration
Swift
public static func rectangle(x: Double, y: Double, width: Double, height: Double) -> PathReturn Value
Pathwith a rectangle shape with the givenx,y,width, andheightvalues.
-
Undocumented
Declaration
Swift
public static func square(center: Point, width: Double) -> Path
-
Declaration
Swift
public func scaled(by amount: Double, from reference: Point = Point()) -> PathReturn Value
Pathscaled by the givenamountfrom the givenreferencepoint. -
Declaration
Swift
public func rotated(by angle: Angle, around reference: Point = Point()) -> PathReturn Value
Pathrotated by the givenanglearound the givenreferencepoint. -
Declaration
Swift
public func translated(by point: Point) -> PathReturn Value
Pathtranslated by the givenpoint. -
Declaration
Swift
public func translatedBy(x: Double, y: Double) -> PathReturn Value
Pathtranslated by the givenxandyvalues.
-
Declaration
Swift
public static var builder: AllowingMoveTo { get }Return Value
Builderobject that only exposes themove(to:)method, as it is a required first element for aPath. -
Declaration
Swift
public var base: [BezierCurve] { get } -
Empty path.
Declaration
Swift
public static let zero: Path -
Declaration
Swift
public static func + (lhs: Path, rhs: Path) -> PathReturn Value
New
Pathwith elements of two paths.
-
Printed description.
Declaration
Swift
public var description: String { get }
View on GitHub
Install in Dash
Path Structure Reference