added the display_label method including the implementation of the visual path from the knobs to the label
This commit is contained in:
4
knob.py
4
knob.py
@ -21,8 +21,8 @@ class Knob:
|
||||
|
||||
def get_pointer_position(self):
|
||||
angle = (self.value * 0.8 * 2 + 0.7) * math.pi
|
||||
x = self.radius * math.cos(angle) + self.position[0]
|
||||
y = self.radius * math.sin(angle) + self.position[1]
|
||||
x = (self.radius - 5) * math.cos(angle) + self.position[0]
|
||||
y = (self.radius - 5) * math.sin(angle) + self.position[1]
|
||||
return(x, y)
|
||||
|
||||
def display(self):
|
||||
|
||||
Reference in New Issue
Block a user