チェンジセット 3804: as3/gunyarapaint
- コミット日時:
- 2010/04/16 02:24:35 (3 年前)
- ファイル:
-
- as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/modules/TransparentLineModule.as (更新) (2 diffs)
- as3/gunyarapaint/branches/gunyarapaint/test/src/org/libspark/gunyarapaint/framework/module/TransparentFloodFillTest.as (更新) (4 diffs)
- as3/gunyarapaint/branches/gunyarapaint/test/src/org/libspark/gunyarapaint/framework/module/TransparentLineTest.as (更新) (5 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/modules/TransparentLineModule.as
r3801 r3804 22 22 validateLayerState(); 23 23 setCoordinate(x, y); 24 m_blendMode = m_recorder. layers.currentLayer.blendMode;24 m_blendMode = m_recorder.pen.blendMode; 25 25 m_recorder.startDrawingSession(); 26 26 } … … 50 50 blendMode = m_blendMode; 51 51 } 52 m_recorder. currentLayerBlendMode = m_blendMode;52 m_recorder.pen.blendMode = m_blendMode; 53 53 saveCoordinate(x, y); 54 54 } as3/gunyarapaint/branches/gunyarapaint/test/src/org/libspark/gunyarapaint/framework/module/TransparentFloodFillTest.as
r3605 r3804 4 4 5 5 import org.flexunit.Assert; 6 import org.libspark.gunyarapaint.framework.Pen; 6 7 import org.libspark.gunyarapaint.framework.Recorder; 7 8 import org.libspark.gunyarapaint.framework.modules.CanvasModuleContext; … … 15 16 { 16 17 m_bytes = new ByteArray(); 17 var recorder:Recorder = ModuleTestUtil.createRecorder(m_bytes);18 var context:CanvasModuleContext = new CanvasModuleContext( recorder);18 m_recorder = ModuleTestUtil.createRecorder(m_bytes); 19 var context:CanvasModuleContext = new CanvasModuleContext(m_recorder); 19 20 m_module = context.getModule(TransparentFloodFill.TRANSPARENT_FLOOD_FILL); 20 21 } … … 30 31 public function floodFill():void 31 32 { 33 var pen:Pen = m_recorder.pen; 34 pen.alpha = 0.5; 35 pen.color = 0x123456; 32 36 m_module.start(1, 1); 33 37 m_module.move(2, 2); 34 38 m_module.stop(3, 3); 35 39 ModuleTestUtil.countCommands(6, m_bytes); 40 Assert.assertStrictlyEquals(0.5, pen.alpha); 41 Assert.assertStrictlyEquals(0x123456, pen.color); 36 42 } 37 43 … … 43 49 44 50 private var m_bytes:ByteArray; 51 private var m_recorder:Recorder; 45 52 private var m_module:ICanvasModule; 46 53 } as3/gunyarapaint/branches/gunyarapaint/test/src/org/libspark/gunyarapaint/framework/module/TransparentLineTest.as
r3801 r3804 1 1 package org.libspark.gunyarapaint.framework.module 2 2 { 3 import flash.display.BlendMode; 3 4 import flash.utils.ByteArray; 4 5 … … 15 16 { 16 17 m_bytes = new ByteArray(); 17 var recorder:Recorder = ModuleTestUtil.createRecorder(m_bytes);18 var context:CanvasModuleContext = new CanvasModuleContext( recorder);18 m_recorder = ModuleTestUtil.createRecorder(m_bytes); 19 var context:CanvasModuleContext = new CanvasModuleContext(m_recorder); 19 20 m_module = context.getModule(TransparentLineModule.TRANSPARENT_LINE); 20 21 } … … 30 31 public function drawWithoutMoving():void 31 32 { 33 m_recorder.pen.blendMode = BlendMode.ADD; 32 34 m_module.start(1, 1); 33 35 m_module.stop(1, 1); 34 36 ModuleTestUtil.countCommands(0, m_bytes); 37 Assert.assertStrictlyEquals(BlendMode.ADD, m_recorder.pen.blendMode); 35 38 } 36 39 … … 38 41 public function drawWithMoving():void 39 42 { 43 m_recorder.pen.blendMode = BlendMode.DARKEN; 40 44 m_module.start(1, 1); 41 45 m_module.move(2, 2); 42 46 m_module.stop(3, 3); 43 47 ModuleTestUtil.countCommands(5, m_bytes); 48 Assert.assertStrictlyEquals(BlendMode.DARKEN, m_recorder.pen.blendMode); 44 49 } 45 50 … … 51 56 52 57 private var m_bytes:ByteArray; 58 private var m_recorder:Recorder; 53 59 private var m_module:ICanvasModule; 54 60 }

