forked from:緑から青へのグラデーション(長方形)

by ganyan forked from forked from:赤から青へのグラデーション(縦) (diff: 6)
lineを使ったグラデーション
♥0 | Line 16 | Modified 2011-04-02 17:13:43 | MIT License
play

ActionScript3 source code

/**
 * Copyright ganyan ( http://wonderfl.net/user/ganyan )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1ixc
 */

// forked from ganyan's forked from:赤から青へのグラデーション(縦)
// forked from shmdmoto's 赤から緑へのグラデーション
// forked from shmdmoto's 赤から緑へのグラデーション
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * lineを使った赤から緑へのグラデーション
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var x:Number;
            rectMode(CENTER);
            for( x = 465 ; x >= 0 ; x-- ) {
               
               stroke(0 ,  255*x/465 , 255-255*x/465);
                 rect(232, 232, x, x);
            }
        }
    }
}