beginPathの読み方

beginPathの読み方

javascriptで利用されるメソッドの1つである「beginPath」の読み方を掲載してます。

読み⽅

ビギンパス」と読みます。

英訳

「begin」は「始める」という意味があります。

beginPathとは

javascriptで、canvasタグで描写するパスを作成するメソッドとなります。

/** html **/

<canvas id="cvs"></canvas>

/** js **/

// 2D図形を扱うことを宣言
let ctx = document.getElementById('cvs').getContext('2d');

// 枠色を指定
ctx.strokeStyle = "#eb2142";

// 円を描画
ctx.beginPath();
ctx.arc(80, 50, 20, 0, Math.PI * 2, false);
ctx.stroke();

実行結果