BezierPath

public class BezierPath : Shape
extension BezierPath: CGDrawable
extension BezierPath: SVGDrawable
extension BezierPath: Hashable

A parametric curve

  • A point used to draw a Bézier curve

    See more

    Declaration

    Swift

    public struct Point : Hashable
  • The starting position of the path

    Declaration

    Swift

    public var start: Vector
  • The points making up the curve

    Declaration

    Swift

    public var points: [Point]
  • A Rectangle that contains the receiver

    Declaration

    Swift

    public var boundingBox: Rectangle { get }
  • Instantiate a new Path from an array of Vectors

    Declaration

    Swift

    public init(start: Vector, points: [Point] = [])

    Parameters

    points

    Points in the path

  • Instantiate a new Bezier from a Path

    From: Smooth a Svg path with cubic bezier curves

    Declaration

    Swift

    public init(_ path: Path, smoothing: Double = 0.2)

    Parameters

    path

    The path to transform into a Bézier curve

  • 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 style

    Declaration

    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: BezierPath, rhs: BezierPath) -> Bool
  • The hash value of the curve

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

    Parameters

    hasher

    The hasher