Skip to content

Commit

Permalink
Update src/PIL/ImageDraw.py - set circle argument xy to type Sequence…
Browse files Browse the repository at this point in the history
…[float] instead of Coords, radius to float

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
  • Loading branch information
void4 and radarhere committed May 27, 2024
1 parent 9b75562 commit 8db5fbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PIL/ImageDraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def ellipse(self, xy: Coords, fill=None, outline=None, width=1) -> None:
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)
Expand Down

0 comments on commit 8db5fbe

Please sign in to comment.