Skip to content

Commit b19f0cc

Browse files
Merge pull request #1 from adafruit/master
Updating from Main
2 parents 5d8bffe + a31e025 commit b19f0cc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

adafruit_display_shapes/circle.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,22 @@ def __init__(self, x0, y0, r, *, fill=None, outline=None, stroke=1):
5353
outline=outline,
5454
stroke=stroke,
5555
)
56+
self.r = r
57+
58+
@property
59+
def x0(self):
60+
"""The x-position of the center of the circle."""
61+
return self.x + self.r
62+
63+
@property
64+
def y0(self):
65+
"""The y-position of the center of the circle."""
66+
return self.y + self.r
67+
68+
@x0.setter
69+
def x0(self, x0):
70+
self.x = x0 - self.r
71+
72+
@y0.setter
73+
def y0(self, y0):
74+
self.y = y0 - self.r

0 commit comments

Comments
 (0)