Name
CanvasRenderingContext2D.bezierCurveTo( ): add a cubic Bézier curve to the current subpath
Synopsis
void bezierCurveTo(floatcpX1, floatcpY1, floatcpX2, floatcpY2, floatx, floaty)
Arguments
-
cpX1, cpX2 The coordinates of the control point associated with the curve’s start point (the current position).
-
cpX2, cpY2 The coordinates of the control point associated with the curve’s end point.
-
x, y The coordinates of the curve’s end point.
Description
bezierCurveTo( ) adds a
cubic Bézier curve to the current subpath of a canvas. The start
point of the curve is the current point of the canvas, and the end
point is (x,y). The two Bezier
control points (cpX1, cpY1) and
(cpX2, cpY2) define the shape of
the curve. When this method returns, the current position is
(x,y).
See Also
CanvasRenderingContext2D.quadraticCurveTo(
)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access