Files
frontend-dev/frontend/views/draw_utils.py
Jannes Magnusson 7a3329e8f2 add button manager
2025-10-18 16:21:01 +02:00

13 lines
557 B
Python

def draw_clock(draw, position, radius=16, width=1):
"""Draw a simple clock icon at the given position"""
x, y = position
draw.circle((x, y), radius, outline='black', width=width)
draw.line((x, y - radius + 2, x, y), fill='black', width=width) # Hour hand
draw.line((x, y, x + radius * 3 / 4, y), fill='black', width=width) # Minute hand
def draw_long_press(draw, position):
"""Draw a long press button icon at the given position"""
x, y = position
for i in range(0, 5, 2):
draw.circle((x + i, y), 2, fill='black')