MCPcopy Create free account
hub / github.com/Image-Py/imagepy / mouse_move

Method mouse_move

imagepy/tools/Draw/magic_tol.py:76–86  ·  view source on GitHub ↗
(self, ips, x, y, btn, **key)

Source from the content-addressed store, hash-verified

74 ips.update()
75
76 def mouse_move(self, ips, x, y, btn, **key):
77 if ips.roi==None:return
78 lim = 5.0/key['canvas'].get_scale()
79 if btn==None:
80 self.cursor = wx.CURSOR_CROSS
81 if ips.roi.snap(x, y, lim)!=None:
82 self.cursor = wx.CURSOR_HAND
83 elif btn==1:
84 if self.curobj: ips.roi.draged(self.odx, self.ody, x, y, self.curobj)
85 ips.update()
86 self.odx, self.ody = x, y
87
88 def mouse_wheel(self, ips, x, y, d, **key):
89 pass

Callers

nothing calls this directly

Calls 4

get_scaleMethod · 0.80
snapMethod · 0.45
dragedMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected