forked from: 赤から緑へのグラデーション

by shinw forked from 赤から緑へのグラデーション (diff: 10)
lineを使った赤から緑へのグラデーション
@author shmdmoto
♥0 | Line 17 | Modified 2011-06-20 15:15:50 | MIT License
play

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/vt9r
 */

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