チェンジセット 1586
- コミット日時:
- 2008/10/12 04:23:05 (5 年前)
- ファイル:
-
- as3/gunyarapaint/trunk/gunyarapaint/src/gplogplayer.mxml (更新) (1 diff)
- as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint.mxml (更新) (1 diff)
- as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLayer.as (更新) (4 diffs)
- as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLayerArray.as (更新) (2 diffs)
- as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLogger.as (更新) (1 diff)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/gunyarapaint/trunk/gunyarapaint/src/gplogplayer.mxml
r1578 r1586 163 163 ]]> 164 164 </mx:Script> 165 <mx:Label x="313" y="11" text="ver.2008101 103"/>165 <mx:Label x="313" y="11" text="ver.2008101201"/> 166 166 </mx:Application> as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint.mxml
r1578 r1586 12 12 </mx:Script> 13 13 <mx:Canvas id="toolCanvas" x="0" y="0" width="685" height="102"> 14 <mx:Label id="versionLabel" x="238" y="9" text="ver.2008101 103"/>14 <mx:Label id="versionLabel" x="238" y="9" text="ver.2008101201"/> 15 15 <mx:Label x="28" y="7" text="名前"/> 16 16 <mx:TextInput id="fromTextInput" x="55" y="3" maxChars="32" fontSize="14" focusThickness="0"/> as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLayer.as
r1547 r1586 59 59 public function draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void { 60 60 // UndoBufferに入っているbitmapDataを上書きしないように、コピーしてから描く。 61 _bitmapData = _bitmapData.clone(); 62 _bitmap.bitmapData = _bitmapData; 61 this.bitmapData = _bitmapData.clone(); 63 62 _bitmapData.draw(source, matrix, colorTransform, blendMode, clipRect, smoothing); 64 63 } 65 64 public function floodFill(x:Number, y:Number, color:uint):void { 66 _bitmapData = _bitmapData.clone(); 67 _bitmap.bitmapData = _bitmapData; 65 this.bitmapData = _bitmapData.clone(); 68 66 _bitmapData.floodFill(x, y, color); 69 67 } … … 72 70 return false; 73 71 } 74 _bitmapData = _bitmapData.clone(); 75 _bitmap.bitmapData = _bitmapData; 72 this.bitmapData = _bitmapData.clone(); 76 73 _bitmapData.setPixel32(x, y, color); 77 74 return true; … … 83 80 } 84 81 } 82 85 83 public function set index(i:uint):void { 86 84 _index = i; … … 143 141 return _bitmapData; 144 142 } 143 // レイヤ統合用… 144 public function set bitmapData(b:BitmapData):void { 145 _bitmapData = b; 146 _bitmap.bitmapData = b; 147 } 145 148 public function get bitmap():Bitmap { 146 149 return _bitmap; as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLayerArray.as
r1547 r1586 164 164 return true; 165 165 } 166 166 167 // 新版。統合レイヤの透明度は0になる。レイヤ統合しても見た目が変わらない。 167 168 public function mergeWithBelow():Boolean { 168 169 if (_targetIndex == 0) { … … 170 171 return false; 171 172 } 172 _a[_targetIndex].drawDest(_a[_targetIndex - 1].bitmapData); 173 if (!_a[_targetIndex].show || !_a[_targetIndex - 1].show) { 174 Alert.show('統合対象のレイヤのどちらかが不可視になってます。', 'レイヤツール'); 175 return false; 176 } 177 178 var mergeBitmapData:BitmapData = new BitmapData(_width, _height, true, 0x00000000); 179 _a[_targetIndex - 1].drawDest(mergeBitmapData); 180 _a[_targetIndex].drawDest(mergeBitmapData); 181 _a[_targetIndex - 1].bitmapData = mergeBitmapData; 182 _a[_targetIndex - 1].alpha = 1; 173 183 _a.splice(_targetIndex, 1); 174 184 _view.removeChildAt(_targetIndex); as3/gunyarapaint/trunk/gunyarapaint/src/org/libspark/gunyarapaint/entities/GPLogger.as
r1554 r1586 131 131 // & レイヤの可視・不可視をundoバッファに積まないようにする。 132 132 case '0.0.9:': // ドット絵ペン追加、lineTo/ドット絵で無駄なログが出ないように 133 case '0.1.0:': // レイヤー統合のUndoでbitmapDataをcloneしていなかった問題を修正 134 // mergeWithBelowの実装を変えて、統合後のalpha値を1に設定するようにした。 133 135 break; 134 136 default:

