Draw slightly bigger black circle underneath colored circles

This commit is contained in:
Admar Schoonen 2023-05-26 23:24:55 +02:00
parent 82f4be8309
commit bfebe037d7
1 changed files with 11 additions and 3 deletions

View File

@ -609,20 +609,28 @@ class MyClockWidget(FloatLayout):
color = self.aqi_colors[idx]
if color != [0.0, 0.0, 0.0]:
self.draw_list_curr_frame.append(["Color", face_plate.canvas, color[0], color[1], color[2]])
# Draw black circle
R = face_plate.size[0] / 2
r = R / 10 * 1.05
coord_x = 0.5 + location*math.sin(2 * math.pi * i/12)
coord_y = 0.5 + location*math.cos(2 * math.pi * i/12)
p = [face_plate.pos[0] + 2 * R * coord_x - r, face_plate.pos[1] + 2 * R * coord_y - r]
self.draw_list_curr_frame.append(["Color", face_plate.canvas, 0, 0, 0])
self.draw_list_curr_frame.append(["Ellipse", face_plate.canvas, [2 * r, 2 * r], p])
# Draw slightly smaller colored circle
r = R / 10
coord_x = 0.5 + location*math.sin(2 * math.pi * i/12)
coord_y = 0.5 + location*math.cos(2 * math.pi * i/12)
p = [face_plate.pos[0] + 2 * R * coord_x - r, face_plate.pos[1] + 2 * R * coord_y - r]
#self.draw_list_curr_frame.append(["Circle", face_plate.canvas, p, r / 10])
self.draw_list_curr_frame.append(["Color", face_plate.canvas, color[0], color[1], color[2]])
self.draw_list_curr_frame.append(["Ellipse", face_plate.canvas, [2 * r, 2 * r], p])
def draw_rain_expectation(self):
self.draw_rain_aqi_expectation(self.rain, self.rain_thresholds, 0.45)
def draw_aqi_expectation(self):
self.draw_rain_aqi_expectation(self.paqi, self.paqi_thresholds, 0.35)
self.draw_rain_aqi_expectation(self.paqi, self.paqi_thresholds, 0.32)
def draw_face(self):
self.draw_numbers()