quadraticCurveTo method
Adds a point to the current subpath by using the specified control points that represent a quadratic Bézier curve.
![]() ![]() |
Syntax
object.quadraticCurveTo(cp1x, cp1y, x, y);
Parameters
- cp1x [in]
-
Type: number
The x-coordinate of the Bézier control point.
- cp1y [in]
-
Type: number
The y-coordinate of the 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.
Standards information
- HTML Canvas 2D Context, Section 9
Remarks
A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for 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 set a starting point.
See also

