Curve

public class Curve: Shape

Curve is a concrete subclass of Shape that has a special initialzer that creates an bezier whose shape is defined by its end points and two control points.

  • The beginning and end points of the receiver. Animatable.

    Declaration

    Swift

    public var endPoints = (Point(), Point())
  • The control points of the receiver. Animatable.

    Declaration

    Swift

    public var controlPoints = (Point(), Point())
  • The center of the curve’s view.

    Declaration

    Swift

    public override var center: Point
  • The origin of the curve’s view.

    Declaration

    Swift

    public override var origin: Point
  • Creates a bezier curve.

    let crv = Curve(a: Point(), b: Point(0,50), c: Point(100,50), d: Point(100,0))
    

    Declaration

    Swift

    convenience public init(begin: Point, control0: Point, control1: Point, end: Point)

    Parameters

    begin

    The beginning point of the curve.

    control0

    The first control point used to define the shape of the curve.

    control1

    The second control point used to define the shape of the curve.

    end

    The end point of the curve.