Reputation: 600
I am developing a Paint Application is AS3. What I am trying is to basically mimick the MS Paint.I am newbie and have some problem implementing the idea that is my head.
I am using vector graphics to implement tools like pencil,line,curve and bitmap to implement bucket tool,spray and eraser. But I faced a problem. While its possible to draw bitmap over vector its not possible to draw vector over bitmap if every drawing is in the same layer.
So the idea that I have is to make it into two layers
My questions are:
The name of the MovieClips are topLayer_mc and bottomLayer_mc. What is need to have is to have a function to create a bitmap copy of topLayer_mc on every MOUSE_UP of pencil,line and add it to bottomLayer_mc.
Can some tell me how to do it.
I mean create a bitmap copy of topLayer_mc on every MOUSE_UP of pencil,line and add it to bottomLayer_mc. A function will do. Thanks in advance.
Upvotes: 0
Views: 676
Reputation: 14276
BitmapData.draw()
. It allows you to draw an IBitmapDrawable
, which is implemented by MovieClip
(via DisplayObject
).Upvotes: 2