QuadCurve

public class QuadCurve: Curve

QuadCurve is a concrete subclass of Curve that modifies it shape based on a single point rather than 2 used by its parent class.

  • A Point used to calculate the shape of the quadratic curve.

    Declaration

    Swift

    public var controlPoint = Point()
  • Initializes a new QuadCurve.

    let curve = QuadCurve(a: Point(), b: Point(50,50), c: Point(100,0))
    canvas.add(curve)
    

    Declaration

    Swift

    convenience public init(begin: Point, control: Point, end: Point)

    Parameters

    begin

    The beginning point of the curve.

    control

    A single Point used to calculate the shape of the curve.

    end

    The end point of the curve.