亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

HTML5 canvas beginPath() 方法

實例

在畫布上繪制兩條路徑;紅色和藍(lán)色:

Your browser does not support the HTML5 canvas tag.

JavaScript:

var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");

ctx.beginPath();
ctx.lineWidth="5";
ctx.strokeStyle="red"; // 紅色路徑
ctx.moveTo(0,75);
ctx.lineTo(250,75);
ctx.stroke(); // 進(jìn)行繪制

ctx.beginPath();
ctx.strokeStyle="blue"; // 藍(lán)色路徑
ctx.moveTo(50,0);
ctx.lineTo(150,130);
ctx.stroke(); // 進(jìn)行繪制

親自試一試

瀏覽器支持

Internet Explorer 9、Firefox、Opera、Chrome 以及 Safari 支持 beginPath() 方法。

注釋:Internet Explorer 8 或更早的瀏覽器不支持 <canvas> 元素。

定義和用法

beginPath() 方法開始一條路徑,或重置當(dāng)前的路徑。

提示:請使用這些方法來創(chuàng)建路徑:moveTo()、lineTo()、quadricCurveTo()、bezierCurveTo()、arcTo() 以及 arc()。

提示:請使用 stroke() 方法在畫布上繪制確切的路徑。

JavaScript 語法:

context.fillRect(x,y,width,height);