lineTo of line on CanvasDrag the sliders to change the X, Y postion of lineTo().
x: Position from left edge of the canvas, y: Position from Top edge of the canvas, lineTo() actually does not draw the line , it happens only by stroke() command. var my_canvas=$('#my_canvas').get(0) var gctx = my_canvas.getContext("2d"); gctx.beginPath() gctx.moveTo(20,30); gctx.lineTo(100,100); gctx.stroke();
This article is written by plus2net.com team.
|