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

Method mouse_move

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

Source from the content-addressed store, hash-verified

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

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