チェンジセット 714

差分発生行の前後
無視リスト:
コミット日時:
2008/06/26 17:45:22 (2 ヶ月前)
コミッタ:
nutsu
ログメッセージ:

簡単な画像の描画追加。3Dレンダラを別クラスなどでクラス追加や配置変え

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/Frocessing/trunk/src/frocessing/color/ColorConvert.as

    r659 r714  
    3131        *  
    3232        * @author nutsu 
    33         * @version 0.1.1 
     33        * @version 0.1.2 
    3434        *  
    3535        */ 
     
    137137                 
    138138                /** 
     139                 * 24bit Color を RGB値に変換します. 
     140                 * @param       col     0xRRGGBB 
     141                 * @return      { r:uint, g:uint, b:uint } 
     142                 */ 
     143                public static function UInt2RGB( col:uint ):Object 
     144                { 
     145                        return { r:(col & 0xff0000) >>> 16, g:(col & 0x00ff00) >>> 8, b:col & 0x0000ff }; 
     146                } 
     147                 
     148                /** 
    139149                 * 24bit Color を HSV値に変換します. 
    140150                 * @param       col     0xRRGGBB 
     
    144154                { 
    145155                        return RGB2HSV( (col & 0xff0000) >>> 16, (col & 0x00ff00) >>> 8, col & 0x0000ff ); 
     156                } 
     157                 
     158                /** 
     159                 * RGB値 を 24bit Color に変換します. 
     160                 * @param       r       red [0,255] 
     161                 * @param       g       green [0,255] 
     162                 * @param       b       blue [0,255] 
     163                 * @return      0xRRGGBB 
     164                 */ 
     165                public static function RGB2UInt( r:uint, g:uint, b:uint ):uint 
     166                { 
     167                        return ( r & 0xff ) << 16 | ( g & 0xff ) << 8 | ( b & 0xff ); 
    146168                } 
    147169                 
     
    158180                        return col.r << 16 | col.g << 8 | col.b; 
    159181                } 
     182                 
     183                /** 
     184                 * グレー値 を 24bit Color に変換します. 
     185                 * @param       gray    [0,255] 
     186                 * @return      0xRRGGBB 
     187                 */ 
     188                public static function gray2UInt( gray:uint ):uint 
     189                { 
     190                        return ( gray & 0xff ) << 16 | ( gray & 0xff ) << 8 | ( gray & 0xff ); 
     191                } 
    160192        } 
    161193         
  • as3/Frocessing/trunk/src/frocessing/color/ColorLerp.as

    r659 r714  
    148148                 *      graphics.beginFill( g[i] ); 
    149149                 *      graphics.drawRect( i~~20, 0, 20, 20 ); 
    150                  *      graphics.endFill();  
     150                 *      graphics.endFill(); 
    151151                 * }</listing> 
    152152                 *  
  • as3/Frocessing/trunk/src/frocessing/color/FColorMode.as

    r659 r714  
    3636         *  
    3737         * @author nutsu 
    38          * @version 0.1.1 
     38         * @version 0.1.2 
    3939         *  
    4040         * @see frocessing.color.ColorMode 
     
    182182                 
    183183                /** 
     184                 * 32bit Color を取得します. 
     185                 *  
     186                 * <p>色の指定は、color() メソッドを参照してください.</p> 
     187                 *  
     188                 * @param       c1      first value 
     189                 * @param       c2      second value 
     190                 * @param       c3      third value 
     191                 * @param       c4      fourth value 
     192                 */ 
     193                public function color32( c1:Number, c2:Number=NaN, c3:Number=NaN, c4:Number=NaN ):uint 
     194                { 
     195                        if ( isNaN( c2 ) ) 
     196                        { 
     197                                return 0xff000000 | ColorConvert.gray2UInt( uint(c1/_range1*0xff) ); 
     198                        } 
     199                        else if ( isNaN( c3 ) ) 
     200                        { 
     201                                return ( Math.round( c2/_range4*0xff ) & 0xff )<<24 | ColorConvert.gray2UInt( uint(c1/_range1*0xff) ); 
     202                        } 
     203                        else if ( isNaN( c4 ) ) 
     204                        { 
     205                                if ( _color_mode == ColorMode.HSB ) 
     206                                        return 0xff000000 | ColorConvert.HSV2UInt( 360*c1/_range1 , c2/_range2, c3/_range3 ); 
     207                                else 
     208                                        return 0xff000000 | ColorConvert.RGB2UInt( uint(c1/_range1*0xff), uint(c2/_range2*0xff), uint(c3/_range3*0xff) ); 
     209                        } 
     210                        else 
     211                        { 
     212                                if ( _color_mode == ColorMode.HSB ) 
     213                                        return ( Math.round( c4/_range4*0xff ) & 0xff )<<24 | ColorConvert.HSV2UInt( 360*c1/_range1 , c2/_range2, c3/_range3 ); 
     214                                else 
     215                                        return ( Math.round( c4/_range4*0xff ) & 0xff )<<24 | ColorConvert.RGB2UInt( uint(c1/_range1*0xff), uint(c2/_range2*0xff), uint(c3/_range3*0xff) ); 
     216                        } 
     217                } 
     218                 
     219                /** 
     220                 * 24bit Color を取得します. 
     221                 *  
     222                 * <p>色の指定は、color() メソッドを参照してください.透明度の指定は無視されます.</p> 
     223                 *  
     224                 * @param       c1      first value 
     225                 * @param       c2      second value 
     226                 * @param       c3      third value 
     227                 * @param       c4      fourth value 
     228                 */ 
     229                public function color24( c1:Number, c2:Number=NaN, c3:Number=NaN, c4:Number=NaN ):uint 
     230                { 
     231                        if ( isNaN( c2 ) || isNaN( c3 ) ) 
     232                        { 
     233                                return ColorConvert.gray2UInt( uint(c1/_range1*0xff) ); 
     234                        } 
     235                        else 
     236                        { 
     237                                if ( _color_mode == ColorMode.HSB ) 
     238                                        return ColorConvert.HSV2UInt( 360*c1/_range1 , c2/_range2, c3/_range3 ); 
     239                                else 
     240                                        return ColorConvert.RGB2UInt( uint(c1/_range1*0xff), uint(c2/_range2*0xff), uint(c3/_range3*0xff) ); 
     241                        } 
     242                } 
     243                 
     244                /** 
    184245                 * IFColor の色を変更します. 
    185246                 *  
  • as3/Frocessing/trunk/src/frocessing/color/FColorUtil.as

    r659 r714  
    3333         *  
    3434         * @author nutsu 
    35          * @version 0.1.1 
     35         * @version 0.1.2 
    3636         *  
    3737         * @see frocessing.color.FColor 
     
    150150                public static function hsvToRGB( h:Number, s:Number=1.0, v:Number=1.0, a:Number=1.0 ):ColorRGB 
    151151                { 
    152                         return new ColorHSV( h, s, v, a ).toRGB(); 
     152                        var co:Object = ColorConvert.HSV2RGB( h, s, v ); 
     153                        return new ColorRGB( co.r, co.g, co.b, a ); 
    153154                } 
    154155                 
     
    206207                public static function valueOfRGB( r:uint, g:uint, b:uint ):uint 
    207208                { 
    208                         return ( r & 0xff ) << 16 | ( g & 0xff ) << 8 | ( b & 0xff ); 
     209                        return ColorConvert.RGB2UInt( r, g, b ); 
    209210                } 
    210211                 
     
    219220                public static function valueOfARGB( r:uint, g:uint, b:uint, a:Number=1.0 ):uint 
    220221                { 
    221                         return ( Math.round( a*0xff ) & 0xff )<<24 | ( r & 0xff ) << 16 | ( g & 0xff ) << 8 | b & 0xff
     222                        return ( Math.round( a*0xff ) & 0xff )<<24 | ColorConvert.RGB2UInt( r, g, b )
    222223                } 
    223224                 
     
    246247                public static function valueOfHSV( h:Number, s:Number=1.0, v:Number=1.0, a:Number=NaN ):uint 
    247248                { 
    248                         var cc:Object = ColorConvert.HSV2RGB( h, s, v ); 
    249249                        if( isNaN(a) ) 
    250                                 return valueOfRGB( cc.r, cc.g, cc.b ); 
     250                                return ColorConvert.HSV2UInt( h, s, v ); 
    251251                        else 
    252                                 return valueOfARGB( cc.r, cc.g, cc.b, a ); 
    253                 } 
    254                  
    255                 //--------------------------------------------------------------------------------------------------- CONVERT 
    256                  
    257                 /** 
    258                  * RGB値 を HSV値 に変換します. 
    259                  * @param       r       red [0,255] 
    260                  * @param       g       green [0,255] 
    261                  * @param       b       blue [0,255] 
    262                  * @return      { h:Number, s:Number, v:Number } 
    263                  * @see frocessing.color.ColorConvert 
    264                  */ 
    265                 public static function RGB2HSV( r:uint, g:uint, b:uint ):Object 
    266                 { 
    267                         return ColorConvert.RGB2HSV( r, g, b ); 
    268                 } 
    269                  
    270                 /** 
    271                  * HSV値 を RGB値 に変換します. 
    272                  * @param       h       hue degree 360 
    273                  * @param       s       saturation [0.0,1.0] 
    274                  * @param       v       brightness [0.0,1.0] 
    275                  * @return      { r:uint, g:uint ,b:uint } 
    276                  * @see frocessing.color.ColorConvert 
    277                  */ 
    278                 public static function HSV2RGB( h:Number, s:Number=1.0, v:Number=1.0 ):Object 
    279                 { 
    280                         return ColorConvert.HSV2RGB( h, s, v ); 
     252                                return ( Math.round( a*0xff ) & 0xff )<<24 | ColorConvert.HSV2UInt( h, s, v ); 
    281253                } 
    282254                 
  • as3/Frocessing/trunk/src/frocessing/core/DrawMode.as

    r659 r714  
    3333         
    3434        /** 
    35         * DrawMode 
     35        * DrawMode クラスは、F5Graphics クラス beginShape() メソッドの mode パラメータの値を提供します. 
     36        *  
    3637        * @author nutsu 
    37         * @version 0.1 
     38        * @version 0.1.2 
     39        *  
     40        * @see frocessing.core.F5Graphics#beginShape 
    3841        */ 
    3942        public class DrawMode { 
     
    4447                public static const LINES         :int = 20; 
    4548                public static const TRIANGLES     :int = 30; 
    46                 public static const TRIANGLE_FAN  :int = 31; 
    47                 public static const TRIANGLE_STRIP:int = 32; 
     49                public static const TRIANGLE_STRIP:int = 31; 
     50                public static const TRIANGLE_FAN  :int = 32; 
    4851                public static const QUADS         :int = 40; 
    4952                public static const QUAD_STRIP    :int = 41; 
  • as3/Frocessing/trunk/src/frocessing/core/DrawPosMode.as

    r659 r714  
    3333         
    3434        /** 
    35         * DrawPosMode 
     35        * DrawPosMode クラスは、F5Graphics クラス rectMode(), ellipseMode() メソッドの mode パラメータの値を提供します. 
     36        *  
    3637        * @author nutsu 
    37         * @version 0.1 
     38        * @version 0.1.2 
     39        *  
     40        * @see frocessing.core.F5Graphics#rectMode 
     41        * @see frocessing.core.F5Graphics#ellipseMode 
    3842        */ 
    3943        public class DrawPosMode { 
  • as3/Frocessing/trunk/src/frocessing/core/F5BitmapData.as

    r659 r714  
    3535        import flash.display.BitmapData; 
    3636        import flash.display.Shape; 
     37        import flash.geom.Rectangle; 
    3738         
    3839        /** 
    39         * F5BitmapData 
     40        * F5BitmapData は、F5Graphics2D の描画を BitmapData で保持するクラスです. 
     41        *  
    4042        * @author nutsu 
    41         * @version 0.1 
     43        * @version 0.1.2 
    4244        */ 
    4345        public class F5BitmapData extends F5Graphics2D{ 
    4446                 
    4547                private var _bitmapData:BitmapData; 
     48                private var screenRect:Rectangle; 
    4649                private var _shape:Shape; 
    4750                 
    4851                /** 
     52                 * 新しい F5BitmapData クラスのインスタンスを生成します. 
    4953                 *  
    50                  * @param       width_ 
    51                  * @param       height_ 
    52                  * @param       transparent_ 
    53                  * @param       bgcolor 
     54                 * @param       width_                 BitmapData の幅 
     55                 * @param       height_                        BitmapData の高さ 
     56                 * @param       transparent_   BitmapData の transparent 
     57                 * @param       bgcolor                        BitmapData の 背景色( 32bit Color ) 
    5458                 */ 
    5559                public function F5BitmapData( width_:uint, height_:uint, transparent_:Boolean=true, bgcolor:uint=0xffcccccc ){ 
    5660                        super( (_shape = new Shape()).graphics ); 
    57                         size( width_, height_ ); 
    58                         _bitmapData = new BitmapData( width_, height_, transparent_, bgcolor ); 
     61                        _width  = width_; 
     62                        _height = height_; 
     63                        _bitmapData = new BitmapData( _width, _height, transparent_, _background.value32 ); 
    5964                } 
    6065                 
    6166                /** 
    62                  *  
     67                 * 描画の対象となる BitmapData を示します. 
    6368                 */ 
    6469                public function get bitmapData():BitmapData { return _bitmapData; } 
    6570                 
    6671                /** 
    67                  * @inheritDoc 
     72                 * 描画を終了するときに実行します.このメソッドにより Graphics の内容が BitmapData にドローされます. 
    6873                 */ 
    6974                public override function endDraw():void 
    7075                { 
    71                         _bitmapData.draw( _shape ); 
    72                         clear(); 
     76                        _bitmapData.draw( _shape, null, null, null, screenRect, _imageSmoothing ); 
    7377                } 
    7478                 
    7579                /** 
    76                  * @inheritDoc 
     80                 * 幅と高さを設定します. このメソッドにより bitmapData のサイズが変更され、描画が初期状態になります. 
    7781                 */ 
    7882                public override function size( width_:uint, height_:uint ):void 
     
    8084                        _width  = width_; 
    8185                        _height = height_; 
    82                          
    83                         //BitmapData Update 
    84                         // 
     86                        screenRect = new Rectangle( 0, 0, width_, height_ ); 
     87                        _bitmapData.dispose(); 
     88                        _bitmapData = new BitmapData( _width, _height, _bitmapData.transparent, _background.value32 ); 
    8589                } 
    8690                 
     
    9195                { 
    9296                        color_mode.setColor( _background, c1, c2, c3, c4 ); 
    93                         _background_do = true; 
    9497                        _bitmapData.fillRect( _bitmapData.rect, _background.value32 ); 
    9598                } 
  • as3/Frocessing/trunk/src/frocessing/core/F5Graphics.as

    r659 r714  
    3232package frocessing.core { 
    3333         
     34        import flash.display.BitmapData; 
    3435        import flash.display.Graphics; 
     36        import flash.geom.Matrix; 
    3537        import frocessing.color.ColorMode; 
    3638        import frocessing.color.FColorMode; 
     
    4244         
    4345        /** 
    44         * F5Graphics 
     46        * F5Graphics クラスは、Processing の描画メソッドを実装したクラスです. 
     47        *  
    4548        * @author nutsu 
    46         * @version 0.1 
     49        * @version 0.1.2 
    4750        */ 
    4851        public class F5Graphics extends GraphicsEx{ 
     
    8487                protected var _fill_do:Boolean; 
    8588                protected var _stroke_do:Boolean; 
    86                 protected var _background_do:Boolean; 
    8789                 
    8890                //Shape Attributes 
    89                  
    90                 //@default CORNER 
    91                 protected var rect_mode:int; 
    92                 //@default CENTER 
    93                 protected var ellipse_mode:int; 
    94                 //@default NONE_SHAPE 
    95                 protected var shape_mode:int; 
     91                protected var rect_mode:int;    //@default CORNER 
     92                protected var ellipse_mode:int; //@default CENTER 
     93                protected var shape_mode:int;   //@default NONE_SHAPE 
    9694                protected var shape_mode_polygon:Boolean; 
     95                 
     96                //Image 
     97                protected var image_mode:int;   //@default CORNER 
     98                protected var image_matrix:Matrix; 
     99                protected var _imageSmoothing:Boolean; 
    97100                 
    98101                //Vertex 
     
    105108                 
    106109                /** 
     110                 * 新しい F5Graphics クラスのインスタンスを生成します. 
    107111                 *  
    108                  * @param       gc 
     112                 * @param       gc     描画対象となる Graphics を指定します 
    109113                 */ 
    110114                public function F5Graphics( gc:Graphics ) { 
     
    120124                        _stroke_color  = 0x000000; 
    121125                        _stroke_alpha  = 1.0; 
    122                         _background_do = false; 
    123126                         
    124127                        color_mode     = new FColorMode(); 
     
    128131                        lineStyle( 0, _stroke_color, _stroke_alpha ); 
    129132                         
    130                         rect_mode    = CORNER; 
    131                         ellipse_mode = CENTER; 
    132                         shape_mode   = NONE_SHAPE; 
     133                        rect_mode      = CORNER; 
     134                        ellipse_mode   = CENTER; 
     135                        shape_mode     = NONE_SHAPE; 
    133136                        shape_mode_polygon = false; 
     137                         
     138                        image_mode     = CORNER; 
     139                        image_matrix   = new Matrix(); 
     140                        _imageSmoothing = true; 
    134141                } 
    135142                 
    136143                //--------------------------------------------------------------------------------------------------- 
    137144                 
    138                 public function get width():uint{ return _width; } 
     145                /** 
     146                 * F5Graphics が保持する幅を示します. 
     147                 */ 
     148                public function get width():uint { return _width; } 
     149                /** 
     150                 * F5Graphics が保持する高さを示します. 
     151                 */ 
    139152                public function get height():uint{ return _height; } 
    140153                 
     154                /** 
     155                 * 幅と高さを設定します. width, height は background() メソッド以外には使用されません. 
     156                 */ 
    141157                public function size( width_:uint, height_:uint ):void 
    142158                { 
     
    145161                } 
    146162                 
     163                /** 
     164                 * 描画を開始するときに実行します.このメソッドは、F5Graphics2D,F5Graphics3D など F5Graphicsの拡張クラスで意味を持ちます.  
     165                 */ 
    147166                public function beginDraw():void { ; } 
    148167                 
     168                /** 
     169                 * 描画を終了するときに実行します.このメソッドは、F5Graphics2D,F5Graphics3D など F5Graphicsの拡張クラスで意味を持ちます.  
     170                 */ 
    149171                public function endDraw():void { ; } 
    150172                 
     
    154176                 
    155177                /** 
     178                 * カラーモードを指定します. 
    156179                 * @see frocessing.color.ColorMode 
    157180                 * @see frocessing.color.FColorMode 
     
    163186                 
    164187                /** 
    165                  *  
     188                 * 背景を描画します.このメソッドを実行すると、現在の描画内容がクリアされます. 
    166189                 * @param       c1 
    167190                 * @param       c2 
     
    172195                { 
    173196                        color_mode.setColor( _background, c1, c2, c3, c4 ); 
    174                         _background_do = true; 
    175197                        if( _width>0 && _height>0 ) 
    176198                        { 
     
    183205                } 
    184206                 
    185                 public function noBackground():void 
    186                 { 
    187                         _background_do = false; 
    188                 } 
    189                  
    190                 /** 
    191                  *  
     207                /** 
     208                 * 線の色、透明度を指定します. 
     209                 * このメソッドにより lineStyle が実行され線のスタイルが適用されます. 
    192210                 * @param       c1 
    193211                 * @param       c2 
     
    201219                        _stroke_alpha = _stroke.alpha; 
    202220                        _stroke_do    = true; 
    203                         applyLineStyle(); 
    204                 } 
    205                  
    206                 /** 
    207                  *  
     221                        super.applyLineStyle(); 
     222                } 
     223                 
     224                /** 
     225                 * 塗りの色、透明度を指定します. 
    208226                 * @param       c1 
    209227                 * @param       c2 
     
    220238                 
    221239                /** 
    222                  *  
     240                 * 線が描画されないようにします. 
    223241                 */ 
    224242                public function noStroke():void 
     
    228246                 
    229247                /** 
    230                  *  
     248                 * 塗りが描画されないようにします. 
    231249                 */ 
    232250                public function noFill():void 
     
    247265                 
    248266                /** 
     267                 * @copy frocessing.color.FColorMode#color32 
    249268                 * @see frocessing.color.FColorMode 
    250269                 */ 
     270                public function color32( c1:Number, c2:Number=NaN, c3:Number=NaN, c4:Number=NaN ):uint 
     271                { 
     272                        return color_mode.color32( c1, c2, c3, c4 ); 
     273                } 
     274                 
     275                /** 
     276                 * @copy frocessing.color.FColorMode#color24 
     277                 * @see frocessing.color.FColorMode 
     278                 */ 
     279                public function color24( c1:Number, c2:Number=NaN, c3:Number=NaN, c4:Number=NaN ):uint 
     280                { 
     281                        return color_mode.color24( c1, c2, c3, c4 ); 
     282                } 
     283                 
     284                /** 
     285                 * @copy frocessing.color.FColorMode#red 
     286                 * @see frocessing.color.FColorMode 
     287                 */ 
    251288                public function red( c:IFColor ):Number 
    252289                { 
     
    255292                 
    256293                /** 
     294                 * @copy frocessing.color.FColorMode#green 
    257295                 * @see frocessing.color.FColorMode 
    258296                 */ 
     
    263301                 
    264302                /** 
     303                 * @copy frocessing.color.FColorMode#blue 
    265304                 * @see frocessing.color.FColorMode 
    266305                 */ 
     
    271310                 
    272311                /** 
     312                 * @copy frocessing.color.FColorMode#hue 
    273313                 * @see frocessing.color.FColorMode 
    274314                 */ 
     
    279319                 
    280320                /** 
     321                 * @copy frocessing.color.FColorMode#saturation 
    281322                 * @see frocessing.color.FColorMode 
    282323                 */ 
     
    287328                 
    288329                /** 
     330                 * @copy frocessing.color.FColorMode#brightness 
    289331                 * @see frocessing.color.FColorMode 
    290332                 */ 
     
    295337                 
    296338                /** 
     339                 * @copy frocessing.color.FColorMode#alpha 
    297340                 * @see frocessing.color.FColorMode 
    298341                 */ 
     
    303346                 
    304347                /** 
     348                 * @copy frocessing.color.FColorMode#lerpColor 
    305349                 * @see frocessing.color.FColorMode 
    306350                 */ 
     
    311355                 
    312356                /** 
     357                 * @copy frocessing.color.FColorMode#blendColor 
    313358                 * @see frocessing.color.ColorBlend 
    314359                 */ 
     
    321366                 
    322367                /** 
    323                  *  
     368                 * 線の太さを指定します.有効な値は 0~255 です. 
     369                 * このメソッドにより lineStyle が実行され線のスタイルが適用されます. 
    324370                 * @param       thickness 
    325371                 */ 
    326                 public function strokeWeight( thickness:Number ):void 
    327                 { 
    328                         thickness = thickness; 
    329                 } 
    330                  
    331                 /** 
     372                public function strokeWeight( thickness_:Number ):void 
     373                { 
     374                        _thickness = thickness_; 
     375                        _stroke_do = true; 
     376                        super.applyLineStyle(); 
     377                } 
     378                 
     379                /** 
     380                 * 線の角で使用する接合点の外観の種類を指定します. 
     381                 * このメソッドにより lineStyle が実行され線のスタイルが適用されます. 
    332382                 * @see flash.display.JointStyle 
    333383                 */ 
    334384                public function strokeJoin( jointStyle:String ):void 
    335385                { 
    336                         joints = jointStyle; 
    337                 } 
    338                  
    339                 /** 
     386                        _joints = jointStyle; 
     387                        _stroke_do = true; 
     388                        super.applyLineStyle(); 
     389                } 
     390                 
     391                /** 
     392                 * 線の終端のキャップの種類を指定します. 
     393                 * このメソッドにより lineStyle が実行され線のスタイルが適用されます. 
    340394                 * @see flash.display.CapsStyle 
    341395                 */ 
    342396                public function strokeCap( capsStyle:String ):void 
    343397                { 
    344                         caps = capsStyle; 
     398                        _caps = capsStyle; 
     399                        _stroke_do = true; 
     400                        super.applyLineStyle(); 
    345401                } 
    346402                 
     
    363419                } 
    364420                 
     421                //--------------------------------------------------------------------------------------------------- Image 
     422                 
     423                /** 
     424                 *  @param      mode    CORNER | CORNERS | RADIUS | CENTER 
     425                 * @see frocessing.core.DrawPosMode 
     426                 */ 
     427                public function imageMode( mode:int ):void 
     428                { 
     429                        image_mode = mode; 
     430                } 
     431                 
     432                /** 
     433                 * 画像を描画する場合の Smoothing を設定します. 
     434                 */ 
     435                public function imageSmoothing( smooth:Boolean ):void 
     436                { 
     437                        _imageSmoothing = smooth; 
     438                } 
     439                 
     440                /** 
     441                 * 画像を描画します. 
     442                 *  
     443                 * <p> 
     444                 * image()メソッドの引数は、imageMode() で指定したモードによりその意味が異なります. モードと引数の関係は以下のようになります.<br/> 
     445                 * デフォルトのモードは、<code>CORNER</code>です. 
     446                 * </p> 
     447                 *  
     448                 * <ul> 
     449                 * <li>mode CORNER  : image( bitmapdata, left, top, width, height )</li> 
     450                 * <li>mode CORNERS : image( bitmapdata, left, top, right, bottom )</li> 
     451                 * <li>mode CENTER  : image( bitmapdata, center x, center y, width, height )</li> 
     452                 * <li>mode RADIUS  : image( bitmapdata, center x, center y, radius x, radius y )</li> 
     453                 * </ul> 
     454                 *  
     455                 * <p>w、h を省略した場合は、bitmapdata の width と hight が適用されます.</p> 
     456                 */ 
     457                public function image( img:BitmapData, x:Number, y:Number, w:Number = NaN, h:Number = NaN ):void 
     458                { 
     459  &