Section 25.15. CanvasRenderingContext2D.bezierCurveTo( ): add a cubic Bzier curve to the current subpath


25.15. CanvasRenderingContext2D.bezierCurveTo( ): add a cubic Bézier curve to the current subpath

25.15.1. Synopsis

 void bezierCurveTo(float cpX1, float cpY1, float cpX2, float cpY2, float x, float y) 

25.15.1.1. 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.

25.15.2. 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).

25.15.3. See Also

CanvasRenderingContext2D.quadraticCurveTo( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net