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 1 commit into from Mar 7, 2021


Copy link

@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

@macjohnny macjohnny left a comment

Thanks for the quick fix!

Copy link

@hugovk 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
49 of 50 checks passed
@hugovk hugovk added the Bug label Mar 7, 2021
@radarhere radarhere deleted the rectangle branch Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants