def GetDeltaAngle(self): radius = 60.0 pos = wx.GetMousePosition() d = pos - self.motion_reference self.motion_reference = pos self.CalcRotationVector(d.x, d.y) arc = math.sqrt(d.x**2 + d.y**2) return arc / radius
def OnLeftDown(self, evt): self.motion_reference = wx.GetMousePosition() self.dragging = True