Hey that looks pretty dope

This commit is contained in:
XANTRONIX 2023-12-31 21:57:38 -05:00
parent 8d304bf663
commit bd6c5fe168
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ import cairo
from hexagram.gauge import Gauge from hexagram.gauge import Gauge
ANGLE_OFFSET = 1.658 ANGLE_OFFSET = math.pi / 2
class Dial(Gauge): class Dial(Gauge):
__slots = 'x', 'y', 'radius', 'min_angle', 'max_angle', 'max_value', __slots = 'x', 'y', 'radius', 'min_angle', 'max_angle', 'max_value',

View file

@ -29,4 +29,4 @@ class Speedo(Dial):
cr.set_source_rgb(1, 1, 1) cr.set_source_rgb(1, 1, 1)
for speed in range(0, int(self.max_value)+1, 20): for speed in range(0, int(self.max_value)+1, 20):
self.draw_number(cr, 0.75, speed, "%02d" % int(speed)) self.draw_number(cr, 0.75, speed, "%d" % int(speed))