Contents

CGPathAddCurveToPoint

Appends a cubic Bézier curve to a mutable graphics path.

Declaration

extern void CGPathAddCurveToPoint(CGMutablePathRef path, const CGAffineTransform *m, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y);

Parameters

  • path:

    The mutable path to change. The path must not be empty.

  • m:

    A pointer to an affine transformation matrix, or NULL if no transformation is needed. If specified, Core Graphics applies the transformation to the curve before it is added to the path.

  • cp1x:

    The x-coordinate of the first control point.

  • cp1y:

    The y-coordinate of the first control point.

  • cp2x:

    The x-coordinate of the second control point.

  • cp2y:

    The y-coordinate of the second control point.

  • x:

    The x-coordinate of the end point of the curve.

  • y:

    The y-coordinate of the end point of the curve.

Discussion

Appends a cubic Bézier curve from the current point in a path to the specified location using two control points, after an optional transformation. Before returning, this function updates the current point to the specified location (x,y).

See Also

Constructing a Graphics Path