HTML5 canvas moveTo()
·λ 0,0λ 300,150
Your browser does not support the HTML5 canvas tag.JavaScript:
var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(300,150); ctx.stroke();
Internet Explorer 9FirefoxOperaChrome Safari moveTo()
Internet Explorer 8 <canvas>
÷
fillRect() Ρ
stroke() е·
JavaScript context.moveTo(x,y);x ·λ x
y ·λ y