line():直線を描く

説明

指定した2点間の座標を直線で描画します。PanCakeのラインのラッパーです。

[以下のJavaScriptプログラムをダウンロード]

[もう1つのサンプルプログラムをダウンロード]

// Line(x1,y1,x2,y2,color)
function line(x1,y1,x2,y2,c){
  pc.line(x1,y1,x2,y2,c);
}
// Sample Code
var pc=new PanCake();
pc.reset(0);
pc.clear(0);
line(0,0,32,18,3);

目次に戻る