Added ImageDraw rounded_rectangle method#5208
Merged
hugovk merged 3 commits intopython-pillow:masterfrom Mar 8, 2021
Merged
Conversation
dfc4265 to
16087b2
Compare
1d17c8d to
16fe3a9
Compare
Member
Author
16fe3a9 to
e340319
Compare
|
+1 for this PR, I like the idea. If it's not too slow I think we will use it in our YOLOv5 repo, as then we can achieve uniformity with our iOS app rectangles with rounded corners. |
e340319 to
d1757e3
Compare
Member
|
Please could you add this to the release notes? |
hugovk
reviewed
Mar 7, 2021
docs/reference/ImageDraw.rst
Outdated
| :param fill: Color to use for the fill. | ||
| :param width: The line width, in pixels. | ||
|
|
||
| .. versionadded:: 8.2.0 |
Member
Member
There was a problem hiding this comment.
Did this get missed in the rebase?
Member
Author
There was a problem hiding this comment.
I don't believe so. I suspect if you refresh https://pillow--5208.org.readthedocs.build/en/5208/reference/ImageDraw.html again, it will work.
Member
c8dec79 to
9ce3eba
Compare
Member
Author
|
Ok, I've added release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Resolves #4765 by adding
rounded_rectangle().Like
rectangle(),except with a
radiusargumentIn this implementation, I limit the radius of the corners so that it is not greater than half of the width or the height - so a rounded rectangle might be a circle, but not another ellipse.