Starling-Framework icon indicating copy to clipboard operation
Starling-Framework copied to clipboard

updated to copy BitmapData with copyPixels();

Open dimensionscape opened this issue 5 years ago • 3 comments

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

dimensionscape avatar Feb 14 '20 19:02 dimensionscape

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:

PrimaryFeather avatar Feb 17 '20 08:02 PrimaryFeather

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.

dimensionscape avatar Feb 17 '20 08:02 dimensionscape

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

PrimaryFeather avatar Feb 17 '20 08:02 PrimaryFeather