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

Only draw each rectangle outline pixel once #5183

Merged
merged 1 commit into from Mar 7, 2021

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Jan 5, 2021

Resolves #5182

ImagingDrawRectangle draws four individual lines to make up a rectangle, including each corner twice.
This becomes apparent when the lines are drawn with partial opacity, and the repeated drawing of the corner pixels changes the final opacity.

This PR updates the function to only draw each corner pixel once, similar to #4333

Copy link
Contributor

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@hugovk
Copy link
Member

hugovk commented Mar 7, 2021

@radarhere Thanks for the fix!

@macjohnny Thanks for the report!

@hugovk hugovk merged commit 3a27118 into python-pillow:master Mar 7, 2021
@hugovk hugovk added the Bug Any unexpected behavior, until confirmed feature. label Mar 7, 2021
@radarhere radarhere deleted the rectangle branch March 7, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect border color in corners when drawing rectangles with border color with opacity < 1
3 participants