Changeset 3364
- Timestamp:
- 12/20/07 20:26:12 (13 months ago)
- Location:
- lang/legacy-actionscript/as2draw
- Files:
-
- 2 modified
-
AS2Draw.swf (modified) (previous)
-
Drawable.as (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/legacy-actionscript/as2draw/Drawable.as
r3363 r3364 4 4 private var mMC:MovieClip; 5 5 private var mMStack:MovieClipStack; 6 private var mCurrentDrawingMC:MovieClip; 6 7 private var mSize:Object; 7 8 private var mPixBuf:PixelBuffer; … … 18 19 19 20 mMStack = new MovieClipStack(mMC); 21 mCurrentDrawingMC = null; 20 22 21 23 mPixBuf = new PixelBuffer(aW, aH, mMC); … … 54 56 { 55 57 mDragData.dragging = false; 58 commit(); 56 59 } 57 60 … … 67 70 private function renderLine(x1:Number, y1:Number, x2:Number, y2:Number) 68 71 { 72 var g:MovieClip; 73 74 if (!mCurrentDrawingMC) 75 mCurrentDrawingMC = mMStack.pushNew(); 76 77 g = mCurrentDrawingMC; 78 69 79 var ofs:Array = PEN_OFFSET_1; 70 80 var l:Number = ofs.length>>1; … … 83 93 x2 +dx, y2 +dy, 0, mCurrentPen.color); 84 94 85 mMC.lineStyle(0, mCurrentPen.color);86 mMC.moveTo(x1+dx, y1+dy);87 mMC.lineTo(x2+dx, y2+dy);88 mMC.lineTo(x2+dx, y2+dy+1);95 g.lineStyle(0, mCurrentPen.color); 96 g.moveTo(x1+dx, y1+dy); 97 g.lineTo(x2+dx, y2+dy); 98 g.lineTo(x2+dx, y2+dy+1); 89 99 } 90 100 } … … 107 117 mMC.endFill(); 108 118 } 119 120 private function commit() 121 { 122 mCurrentDrawingMC = null; 123 } 109 124 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)