Skip to content

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