There doesn't seem to be a way to render a region of one
bitmapData to another bitmapData. Is this a large flaw or is there
something I'm missing? I'm currently creating a complex game, and
this has been puzzling me. I know about the draw command, but say I
want to take a convex polygon region of one bitmapData object and
paste that region of pixels to another. How would I do that. I am
familiar with the idea that I can draw to a movieclip using the
moveTo and lineTo, then just draw to a desired bitmapData, but that
extra third party transfer of pixels is very useless and a tad CPU
intensive for my liking.
I've even gone as far as trying to implement my own system
using get and set pixel, but that is rather pointless as the code
runs far to slow, unlike the optimized functions flash uses.
I was just wondering if one of the developers could fix this
problem (if it really does exist). I thought flash CS3 would fix
this simple concept, but they didn't. I don't use movieClips when I
program my games, so using them for something this trivial leads me
to believe that the developers didn't foresee the use of bitmap
region to bitmap much.
Has anyone else noticed this before? Any fast fixes or
For instance, view this image:
Then I want to copy the polygon region formed by a group of
I hope that makes sense. And again, I know transferring to a
MC then back to a bitmapData object works, but it is a little slow,
and I believe it is unneeded. This is for a real-time game, so I
tend to not take any shortcuts. I just find it very odd, that the
bitmapData object doesn't have such a function in it.
I'm looking forward to reading any responses or information
I wish the beginBitmapFill(...); worked with bitmaps. That
would make things so much nicer.