基本図形の描画1③
forked from 線の幅・色を変える (diff: 24)
線の描画属性
ActionScript3 source code
/**
* Copyright N.YUUKI ( http://wonderfl.net/user/N.YUUKI )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/iVy9
*/
// forked from shmdmoto's 線の幅・色を変える
package
{
import frocessing.display.F5MovieClip2D;
/**
* Frocessingを使った線の描画属性設定
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function draw() : void
{
// ここに描画命令を記述します.
// 線幅の変更
line(100,100,300,100);
strokeWeight(6);
line(100,150,300,150);
strokeWeight(7);
line(100,200,300,200);
stroke(103,159,202);
line(100,250,300,250);
stroke(236, 0, 140);
line(100,300,300,300);
stroke(255, 212, 0);
line(100,350,300,350);
strokeWeight(5);
stroke(0,0,0);
line(125,125,325,125);
stroke(255,0,0);
line(325,125,325,325);
stroke(0,255,0);
line(325,325,125,125);
stroke(0,0,255);
stroke(0,0,0);
}
}
}