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

If left and right sides meet in ImageDraw.rounded_rectangle(), do not draw rectangle to fill gap #8304

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Aug 15, 2024

Resolves #8303

rounded_rectangle() draws

  1. the corners
  2. a vertical rectangle to join the left and right sides
  3. a rectangle on the left to join the top left and lower left corners
  4. a rectangle on the right to join the top right and lower right corners

The code from the issue is failing in step 2 when there is no gap between the left and the right sides. So this PR skips that step if it isn't needed.

@hugovk hugovk merged commit 394e850 into python-pillow:main Aug 15, 2024
51 checks passed
@radarhere radarhere deleted the rounded_rectangle branch August 15, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImageDraw.rounded_rectangle: wrong ValueError
2 participants