forked from: 折れ線を描く
forked from 折れ線を描く (diff: 31)
折れ線を描く 折れ線を描く @author shmdmoto
ActionScript3 source code
/**
* Copyright Erinco157 ( http://wonderfl.net/user/Erinco157 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9L1r
*/
// forked from lenonsun's 折れ線を描く
// 折れ線を描く
package
{
import frocessing.display.F5MovieClip2D;
/**
* 折れ線を描く
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
background(128);
drawGridGuide();
endShape();
// 塗りが無いと閉じない
noFill();
strokeWeight(2);
beginShape();
vertex(300,100);
vertex(350,100);
vertex(350, 50);
vertex(400, 50);
vertex(400,150);
vertex(300,150);
endShape();
}
// 以下は,位置をわかり安くする説明のため
// 処理なので無視してください.
public function drawGridGuide() : void
{
var x : int;
var y : int;
stroke(192,192,192);
for( x = 0 ; x < 465 ; x += 50 )
line( x, 0, x, 465);
for( y = 0 ; y < 465 ; y += 50 )
line( 0, y, 465, y);
stroke(0,0,0);
}
}
}
