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

Add Premultiplied Alpha tutorial #2531

Merged
merged 6 commits into from
Nov 12, 2023
Merged

Add Premultiplied Alpha tutorial #2531

merged 6 commits into from
Nov 12, 2023

Conversation

MyreMylar
Copy link
Member

This should finally close #1115 by adding a tutorial on how to use premultiplied alpha in pygame applications to fix alpha composition errors and slightly speed up your blitting.

@MyreMylar MyreMylar requested a review from a team as a code owner October 26, 2023 10:10
Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to make these images as small as possible to keep the overall download small. I think some sort of visual was needed though.

spelling and grammar pass
@MyreMylar MyreMylar added docs Surface pygame.Surface labels Oct 27, 2023
Copy link
Contributor

@dr0id dr0id left a comment

Choose a reason for hiding this comment

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

LGMT

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, I learnt something useful too, thanks for the PR! 🍰

Left a minor review for your consideration, resolve at will

docs/reST/tutorials/en/premultiplied-alpha.rst Outdated Show resolved Hide resolved
@ankith26 ankith26 added this to the 2.4.0 milestone Nov 9, 2023
Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

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

I like the casual inclusion of wraplength functionality! Nice modern examples using the quality of life stuff.

Gave it a read through. Only thing that immediately popped up to me is that in some places you construct pygame.Color objects to pass to fill and in others you don't.

Merge when you're ready.

Consistent color arguments
@MyreMylar MyreMylar merged commit 1a38e02 into main Nov 12, 2023
2 checks passed
@ankith26 ankith26 deleted the premul-tutorial branch November 12, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Surface pygame.Surface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pre-multiplied alpha continued (2113)
4 participants