timepie circle at the middle bigger
@@ -23,7 +23,7 @@ class TimePie:
self.overlayimg = scorebarbg[0].crop((self.x - extended, self.y - extended, self.x + extended, self.y + extended))
def add_to_frame(self, np_img, background, cur_time, scorebarh, scorebaralpha, inbreak):
- ratio = (cur_time-self.starttime)/(self.endtime-self.starttime)
+ ratio = (cur_time-self.starttime)/max(self.endtime-self.starttime, 1)
color = (125, 125, 125, 255)
if ratio < 0:
color = (80, 125, 80, 255)
@@ -35,6 +35,6 @@ class TimePie:
if self.settings.settings["In-game interface"] or inbreak:
cv2.ellipse(np_img, (self.x, self.y), axes, angle, startangle, endangle, color, -1, cv2.LINE_AA)
cv2.circle(np_img, (self.x, self.y), self.radius, (255, 255, 255, 255), thickness=1, lineType=cv2.LINE_AA)
- cv2.circle(np_img, (self.x, self.y), min(1, int(self.scale)), (255, 255, 255, 255), thickness=-1, lineType=cv2.LINE_AA)
+ cv2.circle(np_img, (self.x, self.y), max(1, int(self.scale)), (255, 255, 255, 255), thickness=-1, lineType=cv2.LINE_AA)
imageproc.add(self.overlayimg, background, self.x, self.y - scorebarh, alpha=scorebaralpha)
