Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

updated to copy BitmapData with copyPixels(); #1069

Open Dimensionscape opened 4 years ago

Dimensionscape commented 4 years ago

Update to fix issue with BitmapData distortion on DisplayObjects larger than the stage.

PrimaryFeather commented 4 years ago

Thanks a lot for the pull request!

I hadn't heard about this problem yet – so you say when you use "drawToBitmapData" on Windows, with an image size bigger than the backbuffer, some parts are upside down?

I'm asking because I need to reproduce the problem before I can have a look at the fix. :smile:

Dimensionscape commented 4 years ago

Yes, precisely. This occurs on Windows at least. I haven't checked on other platforms. Depending on the size of the stage, sometimes it works, sometimes it renders some of the chunks upside down. I'm not sure why the original code wasn't working, but assembling entire bitmapdata out via copyPixels() fixed it.

I figured you would find the root cause, my fix is just a bandaid. Let me know if you have trouble reproducing the issue, I'd be happy to share the source for my test.

PrimaryFeather commented 4 years ago

Thanks a lot for the clarification! I'll have a look at it in the coming days. 👍