aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeurig <don@suspectdevices.com>2025-07-02 16:16:11 -0700
committerfeurig <don@suspectdevices.com>2025-07-02 16:16:11 -0700
commit4e1ad4cd2d9161212797165abddcb535877674fd (patch)
tree1215a4f5f1c0bb34db322b7d6b3f7cbb159f1372
parent875775ad68ed77925295be5f40282e2ceee58b2b (diff)
works in the bedroom
-rw-r--r--bin/analogclock.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/analogclock.py b/bin/analogclock.py
index 5b99e39..12f8b21 100644
--- a/bin/analogclock.py
+++ b/bin/analogclock.py
@@ -46,7 +46,7 @@ draw = ImageDraw.Draw(image)
draw.rectangle((0, 0, width, height), outline=0, fill=0)
# Define some constants to allow easy resizing of shapes.
-padding = +16
+padding = +10
top = padding
bottom = height - padding
# Move left to right keeping track of the current x position for drawing shapes.
@@ -58,7 +58,7 @@ font = ImageFont.load_default()
def draw_clock(t: datetime):
center=((bottom-top)/2)+padding
- linefill=(128, 96, 0, 255)
+ linefill=(100, 75, 0, 128)
h=t.hour
m=t.minute
ml = (center - padding) * 0.9 #fix later
@@ -74,9 +74,9 @@ def draw_clock(t: datetime):
hy = -int(math.sin(r) * hl)
print(h, ":" ,m)
- draw.ellipse((top, top, bottom, bottom), fill = 0, outline =linefill)
- draw.line([center,center,center+mx,center+my], fill=linefill, width=0)
- draw.line([center,center,center+hx,center+hy], fill=linefill, width=0)
+ draw.ellipse((top, top, bottom, bottom), fill = 0, outline =linefill, width=2)
+ draw.line([center,center,center+mx,center+my], fill=linefill, width=3)
+ draw.line([center,center,center+hx,center+hy], fill=linefill, width=4)
while True: