Update src/PIL/ImageDraw.py - set circle argument xy to type Sequence[float] instead of Coords, radius to float

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
void4 2024-05-27 13:27:56 +02:00 committed by GitHub
parent 9b7556228e
commit 8db5fbead1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,7 +181,9 @@ class ImageDraw:
if ink is not None and ink != fill and width != 0:
self.draw.draw_ellipse(xy, ink, 0, width)
def circle(self, xy: Coords, radius, fill=None, outline=None, width=1) -> None:
def circle(
self, xy: Sequence[float], radius: float, fill=None, outline=None, width=1
) -> None:
"""Draw a circle given center coordinates and a radius."""
ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius)
self.ellipse(ellipse_xy, fill, outline, width)