-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fix issue #2446: rotozoom keeps the colorkey flag. #2491
Conversation
Co-authored-by: Joras <[email protected]> Co-authored-by: Antonio <[email protected]> Co-authored-by: João <[email protected]> Co-authored-by: Caio <[email protected]> Co-authored-by: Cícero <[email protected]> Co-authored-by: Natália <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks for contributing to pygame-ce! 🎉 🍰
This seems like a nice fix, but we have CI failing on lint errors. To fix that run setup.py format
and commit resulting changes (make sure you have the appropriate tools like black
/clang-format
installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added a note here about an RLE thing that likely needs fixing in general across the whole of transform.c
before we add another version of it in here.
We probably also need to make some tests for it based on the first post in #1668 just to check if it still is, or isn't a problem, as SDL has likely changed since this issue was first posted.
This will also need to merge in the latest main branch to pick up the grub-efi fix. |
I'll get back to this in a few days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can confirm it fixes the issue and works with RLE and non-RLE colorkey surfaces. Thank you for the contribution!
👍 🎉
function was added in 2.0.14 - min SDL version currently 2.0.9
I realised while investigating the failing test that the function now known as I've just added a patch commit to vendor this function in for the case where SDL is less that 2.0.14. Not the most elegant solution (if it eventually works), but it should hold up OK as the function itself is super basic and we can delete it eventually when our bottom end catches up with our current main target. |
Getting that to compile via Github web version interactions required a few compromises... I'm planning to do another PR on the topic of Surface RLE flags for the whole transform module once this gets merged, so I can almost certainly clean this up a bit in that PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR 🎉
Noticed the original commit has many co-authors, so thank you all! Unless anyone minds, I'd like to squash-and-merge this PR but I will leave the co-author tags intact. |
Absolutely squash and merge away. Igor did 99% of the work here. I was
just wrestling with the compiler to get it over the line.
…On Sat, Oct 28, 2023 at 12:56 PM Ankith ***@***.***> wrote:
Noticed the original commit has many co-authors, so thank you all! Unless
anyone minds, I'd like to squash-and-merge this PR but I will leave the
co-author tags intact.
—
Reply to this email directly, view it on GitHub
<#2491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDGGUP2WZ557IVUA44OODYBTXIJAVCNFSM6AAAAAA5PJ3OU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTG44DSNJXGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Issue #2446 reported that using rotozoom looses the colorkey information and provided code to reproduce the issue. We modified
rotozoomSurface
to copy colorkey fromsrc
torz_dst
and added a test totest/transform_test.py
.Closes #2446
Before:
After: