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

Method mouse_move

imagepy/tools/Standard/point_tol.py:35–46  ·  view source on GitHub ↗
(self, ips, x, y, btn, **key)

Source from the content-addressed store, hash-verified

33 self.curobj = None
34
35 def mouse_move(self, ips, x, y, btn, **key):
36 if ips.roi==None:return
37 lim = 5.0/key['canvas'].get_scale()
38 if btn==None:
39 self.cursor = wx.CURSOR_CROSS
40 self.onobj = ips.roi.snap(x, y, ips.cur, lim)
41 if self.onobj!=None:
42 self.cursor = wx.CURSOR_HAND
43 elif btn==1:
44 ips.roi.draged(self.odx, self.ody, x, y, ips.cur, self.curobj)
45 ips.update()
46 self.odx, self.ody = x, y
47
48 def mouse_wheel(self, ips, x, y, d, **key):
49 lim = 5.0/key['canvas'].get_scale()

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