Name
CanvasRenderingContext2D.quadraticCurveTo( ): add a quadratic Bezier curve to the current subpath
Synopsis
void quadraticCurveTo(floatcpX
, floatcpY
, floatx
, floaty
)
Arguments
-
cpX, cpY
The coordinates of the control point.
-
x, y
The coordinates of the end point of the curve.
Description
This method adds a quadratic Bézier curve segment to the
current subpath. The curve starts at the current point and ends at
(
x
,
y
)
. The control point (
cpX
,
cpY
)
specifies the shape of the curve between
these two points. (The mathematics of Bezier curves is beyond the
scope of this book, however.) When this method returns, the current
position is (
x
,
y
)
.
Bugs
Firefox 1.5 implements this method incorrectly.
See Also
CanvasRenderingContext2D.bezierCurveTo(
)
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.