Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to copy BitmapData with copyPixels(); #1069

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dimensionscape
Copy link

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

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

@Dimensionscape Dimensionscape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a more eloquent fix but this does remedy the issue of bitmapdata chunks getting turned upside down or placed incorrectly during processing. I'm not sure if this was an issue on mobile or macOS, but it was definitely generating images incorrectly on windows.

@PrimaryFeather
Copy link
Contributor

PrimaryFeather commented Feb 17, 2020

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. 😄

@Dimensionscape
Copy link
Author

Dimensionscape commented Feb 17, 2020

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants