forked from: ColorSetting

by y_tama forked from ColorSetting (diff: 6)
see http://gihyo.jp/design/feature/01/frocessing/0002
♥0 | Line 51 | Modified 2010-11-29 18:55:04 | MIT License
play

ActionScript3 source code

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

// forked from nutsu's ColorSetting
// see http://gihyo.jp/design/feature/01/frocessing/0002
package  
{
    import frocessing.display.F5MovieClip2D;
    
    [SWF(width=465,height=465,backgroundColor=0xFFFFFF)]
    public class ColorSetting extends F5MovieClip2D
    {
        public function ColorSetting() 
        {
            //線と塗りの色指定
            
            //■ RGB
            //stroke( red, green, blue, alpha  )
            //fill( red. green, blue, alpha  )
            stroke( 204, 0, 0 );
            fill( 255, 153, 51 );
            circle( 90, 90, 50 );
            
            //透明度
            stroke( 204, 0, 0, 1.0 );
            fill( 255, 153, 51, 1.0 );
            circle( 225, 90, 50 );
            
            stroke( 0, 0, 0, 0.2 );
            fill( 51, 153, 255, 0.5 );
            circle( 245, 90, 50 );
            
            //------------------------------------
            
            //■ グレースケール
            //stroke( gray, alpha )
            //fill( gray, alpha )
            stroke( 0 );
            fill( 127 );
            circle( 90, 230, 50 );
            
            //透明度
            stroke( 0, 1.0 );
            fill( 127, 1.0 );
            circle( 225, 230, 50 );
            
            stroke( 0, 0.2 );
            fill( 255, 0.5 );
            circle( 245, 230, 50 );
            
            //------------------------------------
            
            //■ 24bitカラー
            //stroke( 0xRRGGBB, alpha )
            //fill( 0xRRGGBB, alpha )
            stroke( 0xCC0000 );
            fill( 0xFF9933 );
            circle( 80, 370, 50 );
            
            //透明度
            stroke( 0x000000, 0.2 );
            fill( 0x3399FF, 0.5 );
            circle( 100, 370, 50 );
            
            //■ 32bitカラー
            //stroke( 0xAARRGGBB )
            //fill( 0xAARRGGBB )
            stroke( 0xFFCC0000 );
            fill( 0xFFFF9933 );
            circle( 225, 370, 50 );
            
            stroke( 0x33000000 );
            fill( 0x7F3399FF );
            circle( 245, 370, 50 );
            
            //■ 線の無効
            noStroke();
            fill( 200 );
            circle( 365, 370, 50 );
            
            //■ 塗りの無効
            noFill();
            stroke(0);
            circle( 385, 370, 50 );
            
            stroke(204, 0, 0);
            point(100,100);
            line(10,10,400,150);
            rect(80,100,40,40,10,10);
        }
    }
}