views:

12

answers:

1

Hello, what would be your recommendation for drawing shapes (rects, circles...) onto BitmapData, and how to effectively switch between colors.

Is there any way to get graphics context from BitmapData so I could easily paint shapes using graphics.draw...()?

+1  A: 

Why do you want to use a BitmapData? Not sure what you're after, but after reading a couple of your questions it seems you're a kind of fighting against how flash works. I think you'll make things much easier for yourself if you use what's available already. BitmapData objects are meant mainly to manipulate pixels and don't expose methods for drawing shapes. A Graphics object (available through Sprite, Shape, etc) on the other hand, allows you to draw vector shapes easily.

So, the best approach for this, I guess, would be using the drawing API to do what you want and then, if needed, convert the graphic to a BitmapData.

Juan Pablo Califano
Yes I'm quite fighting it, I need to get something done and instead of doing I'm just struggling with it, thank you anyway I'll try it differently
uther.lightbringer
@uther-lightbringer. No problem, if you're struggling with some particular problem, feel free to post a question describing it (possibly with some code) so people could throw you a hand with it.
Juan Pablo Califano