Name
CanvasRenderingContext2D.lineTo( ): add a straight line to the current subpath
Synopsis
void lineTo(floatx
, floaty
)
Arguments
-
x, y
The coordinates of the end point of the line.
Description
lineTo( )
adds a straight
line to the current subpath. The line begins at the current point
and ends at (x,y)
. When this
method returns, the current position is (x,y)
.
See Also
CanvasRenderingContext2D.beginPath(
)
, CanvasRenderingContext2D.moveTo( )
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.