チェンジセット 3493

差分発生行の前後
無視リスト:
コミット日時:
2010/03/06 23:04:50 (3 年前)
コミッタ:
hkrn
ログメッセージ:

more asdoc

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/PaintEngine.as

    r3438 r3493  
    122122        } 
    123123         
     124        /** 
     125         * ペンオブジェクトを返す 
     126         *  
     127         * @return Pen ペンオブジェクト 
     128         */ 
    124129        public function get pen():Pen 
    125130        { 
     
    127132        } 
    128133         
     134        /** 
     135         * シェイプオブジェクトを返す 
     136         *  
     137         * @return Shape シェイプオブジェクト 
     138         */ 
    129139        public function get shape():Shape 
    130140        { 
     
    132142        } 
    133143         
     144        /** 
     145         * 現在のx座標を返す 
     146         *  
     147         * @return x 現在のx座標 
     148         */ 
    134149        public function get x():int 
    135150        { 
     
    137152        } 
    138153         
     154        /** 
     155         * 現在のy座標を返す 
     156         *  
     157         * @return y 現在のy座標 
     158         */ 
    139159        public function get y():int 
    140160        { 
     
    142162        } 
    143163         
     164        /** 
     165         * ペンオブジェクトを設定する 
     166         *  
     167         * @param pen ペンオブジェクト 
     168         */ 
    144169        public function set pen(value:Pen):void 
    145170        { 
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/Painter.as

    r3488 r3493  
    138138        } 
    139139         
     140        /** 
     141         * ペンオブジェクトを初期状態にリセットする 
     142         *  
     143         * PainterEngine クラスにある resetPen の委譲 
     144         *  
     145         */ 
    140146        public function resetPen():void 
    141147        { 
     
    143149        } 
    144150         
     151        /** 
     152         * 描写中の内容を消去する 
     153         *  
     154         * PainterEngine クラスにある clear の委譲 
     155         *  
     156         */ 
    145157        public function clear():void 
    146158        { 
     
    158170            // undoBuffer に入っているLayerBitmapを上書きしない為にコピーしてから作業する 
    159171            // これは floodFill 及び setPixel も同様 
    160             var newLayer:LayerBitmap = m_layers.currentLayer.clone(); 
    161             newLayer.compositeFrom( 
     172            m_layers.currentLayer.compositeFrom( 
    162173                m_paintEngine.shape, 
    163174                m_paintEngine.pen.blendMode 
    164175            ); 
    165             m_layers.setCurrentLayer(newLayer); 
    166176            m_layers.compositeAll(); 
    167177        } 
     
    175185        public function floodFill():void 
    176186        { 
    177             var newLayer:LayerBitmap = m_layers.currentLayer.clone(); 
    178             newLayer.floodFill( 
     187            m_layers.currentLayer.floodFill( 
    179188                m_paintEngine.x, 
    180189                m_paintEngine.y, 
    181190                m_paintEngine.pen.argb 
    182191            ); 
    183             m_layers.setCurrentLayer(newLayer); 
    184192            m_layers.compositeAll(); 
    185193        } 
     
    195203        public function setPixel(x:int, y:int):void 
    196204        { 
    197             var newLayer:LayerBitmap = m_layers.currentLayer.clone(); 
    198             newLayer.setPixel(x, y, m_paintEngine.pen.argb); 
    199             m_layers.setCurrentLayer(newLayer); 
     205            m_layers.currentLayer.setPixel(x, y, m_paintEngine.pen.argb); 
    200206            m_layers.compositeAll(); 
    201207        } 
     
    353359        } 
    354360         
     361        /** 
     362         * レイヤーオブジェクトを返す 
     363         *  
     364         * @return LayerBitmapCollection 
     365         */ 
    355366        public function get layers():LayerBitmapCollection 
    356367        { 
     
    358369        } 
    359370         
     371        /** 
     372         * スプライトオブジェクトを返す 
     373         *  
     374         * @return Sprite 
     375         */ 
    360376        public function get view():Sprite 
    361377        { 
     
    363379        } 
    364380         
     381        /** 
     382         * ペンオブジェクトを返す 
     383         *  
     384         * @return Pen 
     385         */ 
    365386        public function get pen():Pen 
    366387        { 
     
    390411        } 
    391412         
     413        /** 
     414         * ペンオブジェクトを設定する 
     415         *  
     416         * @param value 
     417         */ 
    392418        public function set pen(value:Pen):void 
    393419        { 
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/Parser.as

    r3438 r3493  
    3434         *  
    3535         * @param data 
     36         * @throws InvalidSignatureError 最初の14文字がGUNYARA_PAINT:と一致しない場合 
    3637         */ 
    3738        public function readHeader(data:Object):void 
     
    5960         * ログを本体の最初の位置に移動する 
    6061         *  
    61          * ヘッダーは 26 bytes あるため、それ未満であれば ArgumentError を送出する。 
     62         * @throws ArgumentError ログの大きさが 26 bytes 未満の場合。 
    6263         */ 
    6364        public function rewind():void 
     
    7576         * ログを先読みする 
    7677         *  
    77          * ログの先読みによって、お絵描きログのコマンド数、最適なアンドゥ回数が分かる。 
    78          * 未登録のコマンドが入っていた場合、InvalidCommandError を送出する。 
     78         * ログの先読みによって、お絵描きログのコマンド数、最適なアンドゥ回数が分かる 
     79         *  
     80         * @throws InvalidCommandError 登録されていないコマンドが検出された場合 
    7981         */ 
    8082        public function preload():void 
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/modules/DrawModule.as

    r3479 r3493  
    11package org.libspark.gunyarapaint.framework.modules 
    22{ 
    3     import flash.errors.IllegalOperationError; 
    4      
    53    import org.libspark.gunyarapaint.framework.LayerBitmap; 
    64    import org.libspark.gunyarapaint.framework.Painter; 
     
    1917    import org.libspark.gunyarapaint.framework.commands.layer.SetLayerIndexCommand; 
    2018    import org.libspark.gunyarapaint.framework.commands.layer.SwapLayerCommand; 
     19    import org.libspark.gunyarapaint.framework.errors.InvisibleLayerError; 
     20    import org.libspark.gunyarapaint.framework.errors.LockedLayerError; 
    2121 
    2222    internal class DrawModule 
     
    117117         * 現在のレイヤーの状態を検証する 
    118118         *  
    119          * 以下の状態であれば IllegalOperationError を送出する 
    120          * - 現在のレイヤーが不可視 
    121          * - 現在のレイヤーがロックされている 
    122          *  
     119         * @throws InvisibleLayerError 現在のレイヤーが不可視の場合 
     120         * @throws LockedLayerError 現在のレイヤーがロックされている場合 
    123121         */ 
    124122        protected function validateLayerState():void 
     
    126124            var layer:LayerBitmap = m_recorder.painter.layers.currentLayer; 
    127125            if (!layer.visible) 
    128                 throw new IllegalOperationError(); 
     126                throw new InvisibleLayerError(); 
    129127            else if (layer.locked) 
    130                 throw new IllegalOperationError(); 
     128                throw new LockedLayerError(); 
    131129        } 
    132130         
     
    134132         * 現在の座標を設定する 
    135133         *  
    136          * @param x 
    137          * @param y 
     134         * @param x x座標 
     135         * @param y y座標 
    138136         */ 
    139137        protected function setCoordinate(x:Number, y:Number):void 
     
    156154         * 指定された座標が現在の座標と一致するかを確認する 
    157155         *  
    158          * @param x 
    159          * @param y 
     156         * @param x x座標 
     157         * @param y y座標 
    160158         * @return 同じである場合は true 
    161159         */         
     
    179177         * 指定された座標から ICommand#write に渡す引数に変換する 
    180178         *  
    181          * @param x 
    182          * @param y 
    183          * @return args 
     179         * @param x x座標 
     180         * @param y y座標 
     181         * @return args プロパティxとyで構成されるオブジェクト 
    184182         */ 
    185183        protected function getArgumentsFromCoordinate(x:Number, y:Number):Object 
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/modules/IDrawable.as

    r3471 r3493  
    66         * 描写の開始をする 
    77         *  
    8          * @param x 
    9          * @param y 
     8         * @param x x座標 
     9         * @param y y座標 
    1010         */ 
    1111        function start(x:Number, y:Number):void; 
     
    1414         * 座標位置を移動する 
    1515         *  
    16          * @param x 
    17          * @param y 
     16         * @param x x座標 
     17         * @param y y座標 
    1818         */ 
    1919        function move(x:Number, y:Number):void; 
     
    2222         * 描写を終了する 
    2323         *  
    24          * @param x 
    25          * @param y 
     24         * @param x x座標 
     25         * @param y y座標 
    2626         */ 
    2727        function stop(x:Number, y:Number):void; 
     
    3030         * 描写を中断する 
    3131         *  
    32          * @param x 
    33          * @param y 
     32         * @param x x座標 
     33         * @param y y座標 
    3434         */ 
    3535        function interrupt(x:Number, y:Number):void; 
     
    3838         * 最後に移動した位置を保存する 
    3939         *  
    40          * @param x 
    41          * @param y 
     40         * @param x x座標 
     41         * @param y y座標 
    4242         */ 
    4343        function saveCoordinate(x:Number, y:Number):void;