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

Added ImageDraw circle() #8085

Merged
merged 12 commits into from
May 28, 2024
Merged

Added ImageDraw circle() #8085

merged 12 commits into from
May 28, 2024

Conversation

void4
Copy link
Contributor

@void4 void4 commented May 26, 2024

Resolves #8083

Implements the ImageDraw.circle feature as described and desired in the issue

src/PIL/ImageDraw.py Outdated Show resolved Hide resolved
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Please could you add unit tests, and mention this in the release notes?

docs/reference/ImageDraw.rst Outdated Show resolved Hide resolved
docs/reference/ImageDraw.rst Outdated Show resolved Hide resolved
docs/reference/ImageDraw.rst Outdated Show resolved Hide resolved
void4 and others added 3 commits May 27, 2024 13:18
…te it is new

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
src/PIL/ImageDraw.py Outdated Show resolved Hide resolved
…[float] instead of Coords, radius to float

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@void4
Copy link
Contributor Author

void4 commented May 27, 2024

Please could you add unit tests, and mention this in the release notes?

I've added it to the release notes but am not quite sure how the unit tests work, especially the parametrization :/

@radarhere radarhere mentioned this pull request May 27, 2024
@radarhere
Copy link
Member

I've created void4#1 with my suggestion for a test - I've copied test_ellipse() and made some modifications to update it.

To provide some information though, parametrization is essentially a loop - it runs the test with different items from a sequence. The idea is that if a particular scenario fails, pytest will clearly let us know which item from the parametrization sequence is the culprit. If you're interested more info, you can read up at https://docs.pytest.org/en/7.4.x/how-to/parametrize.html

@void4
Copy link
Contributor Author

void4 commented May 27, 2024

Thank you - merged :)

@hugovk hugovk merged commit fdf103c into python-pillow:main May 28, 2024
56 checks passed
@hugovk
Copy link
Member

hugovk commented May 28, 2024

Thank you!

@radarhere radarhere changed the title Add function and documentation to draw circle Added ImageDraw.circle() May 28, 2024
@radarhere radarhere changed the title Added ImageDraw.circle() Added ImageDraw circle() May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing ImageDraw.Draw.circle function
4 participants