forked from: 縦横のサイズが異なる長方形を並べる
forked from 縦横のサイズが異なる長方形を並べる (diff: 5)
縦横のサイズが異なる長方形を並べる 8個の縦横の大きさの異なる長方形を横一列に並べる @author shmdmoto
ActionScript3 source code
/**
* Copyright Flagfighter172 ( http://wonderfl.net/user/Flagfighter172 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/6DJv
*/
// forked from lenonsun's 縦横のサイズが異なる長方形を並べる
// 縦横のサイズが異なる長方形を並べる
package
{
import frocessing.display.F5MovieClip2D;
/**
* 8個の縦横の大きさの異なる長方形を横一列に並べる
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
// ここに描画命令を記述します
// 初期設定の描画属性
fill(255,0,0)
var rectWidth : Array = new Array( 50, 50, 50, 50, 50, 50, 50, 50);
var rectHeight : Array = new Array( 50, 50, 50, 50, 50, 50, 50, 50);
var i:int;
for( i = 1 ; i <= 8 ; i ++ ) {
rect( 50 * i, 100, rectWidth[i-1], rectHeight[i-1]);
}
}
}
}
