bezierCurveTo method

Adds a point to the current subpath by using the specified control points that represent a cubic Bézier curve.

 

Syntax

object.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);

Parameters

  • cp1x [in]
    Type: number

    The x-coordinate of the first Bézier control point.

  • cp1y [in]
    Type: number

    The y-coordinate of the first Bézier control point.

  • cp2x [in]
    Type: number

    The x-coordinate of the second Bézier control point.

  • cp2y [in]
    Type: number

    The y-coordinate of the second Bézier control point.

  • x [in]
    Type: number

    The x-coordinate of the point to add to the current path.

  • y [in]
    Type: number

    The y-coordinate of the point to add to the current path.

Return value

This method does not return a value.

Remarks

A cubic Bézier curve must include three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. The first point on the curve is the last point in the existing current subpath. If a path does not exist, use the ICanvasRenderingContext2D::beginPath and ICanvasRenderingContext2D::moveTo methods to create a starting point.

See also

ICanvasRenderingContext2D::quadraticCurveTo