mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
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:
parent
9b7556228e
commit
8db5fbead1
|
@ -181,7 +181,9 @@ class ImageDraw:
|
||||||
if ink is not None and ink != fill and width != 0:
|
if ink is not None and ink != fill and width != 0:
|
||||||
self.draw.draw_ellipse(xy, ink, 0, width)
|
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."""
|
"""Draw a circle given center coordinates and a radius."""
|
||||||
ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius)
|
ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius)
|
||||||
self.ellipse(ellipse_xy, fill, outline, width)
|
self.ellipse(ellipse_xy, fill, outline, width)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user