forked from: 長方形の描画
forked from 長方形の描画 (diff: 34)
長方形の描画: @author shmdmoto
ActionScript3 source code
/**
* Copyright shinw ( http://wonderfl.net/user/shinw )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9SCH
*/
// forked from shmdmoto's 長方形の描画
package
{
import frocessing.display.F5MovieClip2D;
/**
* 長方形の描画:
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
var sx:Number = 20;
var sy:Number = 20;
var ex:Number = 100;
var ey:Number = 100;
// ここに描画命令を記述します.
/*
sx = sx + 100
rect(sx,sy,ex,ey);
sy = sy + 100;
ex = ex + 50;
rect(sx,sy,ex,ey);
sy = sy + 100;
ex = ex + 50;
rect(sx,sy,ex,ey);
sy = sy + 100;
ex = ex + 50;
rect(sx,sy,ex,ey);
*/
rect(sx,sy,ex,ey);
rect(sx+ex,sy+ey,ex,ey);
rect(sx+ex*2,sy+ey*2,ex,ey);
rect(sx,sy+ey*2,ex,ey);
rect(sx+ex*2,sy,ex,ey);
}
}
}
