BezierCurve
public struct BezierCurve
extension BezierCurve: Equatable
extension BezierCurve: CustomStringConvertible
Model of a Bézier curve.
-
Todo
Consider makingfunc
withaccuracy
parameter.Declaration
Swift
public var axisAlignedBoundingBox: Rectangle { get }
-
Order of
BezierCurve
.Declaration
Swift
public var order: Order { get }
-
Start point.
Declaration
Swift
public var start: Point { get }
-
End point.
Declaration
Swift
public var end: Point { get }
-
Arc length of
BezierCurve
.Todo
Add customizability to accuracy.Declaration
Swift
public var length: Double { get }
-
The control points defining a Bézier curve.
Declaration
Swift
public let points: [Point]
-
Creates a linear
BezierCurve
with the givenline
.Declaration
Swift
public init(_ line: Line.Segment)
-
Declaration
Swift
public subscript(t: Double) -> Point { get }
Return Value
Point
at the givent
value.
-
Declaration
Swift
public func ts(x: Double) -> Set<Double>
Return Value
t
values for the givenx
. -
Declaration
Swift
public func ts(y: Double) -> Set<Double>
Return Value
t
values for the giveny
. -
Declaration
Swift
public func ys(x: Double) -> Set<Double>
Return Value
Vertical positions for the given
x
. -
Declaration
Swift
public func xs(y: Double) -> Set<Double>
Return Value
Horizontal positions for the given
y
. -
Declaration
Swift
public func translated(by point: Point) -> BezierCurve
Return Value
BezierCurve
translated by the givenpoint
. -
Declaration
Swift
public func translatedBy(x: Double = 0, y: Double = 0) -> BezierCurve
Return Value
BezierCurve
translated by the givenx
andy
values. -
Declaration
Swift
public func split(t: Double) -> (BezierCurve, BezierCurve)
Return Value
Two
BezierCurve
values of the same order asself
, split at the givent
value. -
Declaration
Swift
public func simplified(segmentCount: Int) -> [Point]
Return Value
Array of
Point
values. -
Declaration
Swift
public func scaled(by amount: Double, from reference: Point = Point()) -> BezierCurve
Return Value
BezierCurve
which is scaled by the givenamount
from the givenreference
point. -
Declaration
Swift
public func rotated(by angle: Angle, around reference: Point = Point()) -> BezierCurve
Return Value
BezierCurve
which is rotated by the givenangle
around the givenreference
point.
-
Order of
See moreBezierCurve
.Declaration
Swift
public enum Order : Int
-
Declaration
Swift
public var description: String { get }