Skip to content

Commit 75efc25

Browse files
authored
Merge pull request #43 from CedarGroveStudios/main
Add Line.color setter/getter
2 parents 313c17c + 042f2f0 commit 75efc25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

adafruit_display_shapes/line.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@ class Line(Polygon):
4040

4141
def __init__(self, x0, y0, x1, y1, color):
4242
super().__init__([(x0, y0), (x1, y1)], outline=color)
43+
44+
@property
45+
def color(self):
46+
"""The line color value. Can be a hex value for a color or
47+
``None`` for no line color."""
48+
return self.outline
49+
50+
@color.setter
51+
def color(self, color):
52+
self.outline = color

0 commit comments

Comments
 (0)