Skip to content

Commit 2491de2

Browse files
committed
allow stroke parameter for Circle()
1 parent 6b64c9f commit 2491de2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

adafruit_display_shapes/circle.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@ class Circle(RoundRect):
5454
``None`` for transparent.
5555
:param outline: The outline of the rounded-corner rectangle. Can be a hex value for a color or
5656
``None`` for no outline.
57+
:param stroke: Used for the outline. Will not change the radius.
5758
5859
"""
5960

60-
def __init__(self, x0, y0, r, *, fill=None, outline=None):
61+
def __init__(self, x0, y0, r, *, fill=None, outline=None, stroke=1):
6162
super().__init__(
62-
x0 - r, y0 - r, 2 * r + 1, 2 * r + 1, r, fill=fill, outline=outline
63+
x0 - r,
64+
y0 - r,
65+
2 * r + 1,
66+
2 * r + 1,
67+
r,
68+
fill=fill,
69+
outline=outline,
70+
stroke=stroke,
6371
)

0 commit comments

Comments
 (0)