bezierCurveTo method
[This documentation is preliminary and is subject to change.]
Adds a point to the current subpath by using the specified control points that represent a cubic Bézier curve.
![]() |
Syntax
HRESULT retVal = object.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
Parameters
- cp1x [in]
-
Type: float
The x-coordinate of the first Bézier control point.
- cp1y [in]
-
Type: float
The y-coordinate of the first Bézier control point.
- cp2x [in]
-
Type: float
The x-coordinate of the second Bézier control point.
- cp2y [in]
-
Type: float
The y-coordinate of the second Bézier control point.
- x [in]
-
Type: float
The x-coordinate of the point to add to the current path.
- y [in]
-
Type: float
The y-coordinate of the point to add to the current path.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
A cubic bezier curve must include three points. The first two points are control points that are used in the cubic bezier 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
Build date: 6/12/2012
