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

Method mouse_move

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

Source from the content-addressed store, hash-verified

33 if self.moving : self.plg.preview(ips, self.para)
34
35 def mouse_move(self, ips, x, y, btn, **key):
36 lim = 5.0/key['canvas'].get_scale()
37 if btn==None:
38 self.cursor = wx.CURSOR_CROSS
39 if isinstance(self.snap(x, y, lim), str):
40 self.cursor = wx.CURSOR_HAND
41 elif self.moving==True:
42 self.plg.lt+=x-self.ox
43 self.plg.rt+=x-self.ox
44 self.plg.bm+=y-self.oy
45 self.plg.tp+=y-self.oy
46 self.ox, self.oy = x, y
47 self.plg.count()
48 self.plg.dialog.reset()
49 ips.update()
50 elif self.moving != False:
51 print("scale_tol.ScaleTool.mouse_move")
52 if 'l' in self.moving:self.plg.lt = x
53 if 'r' in self.moving:self.plg.rt = x
54 if 't' in self.moving:self.plg.tp = y
55 if 'b' in self.moving:self.plg.bm = y
56 self.plg.count()
57 self.plg.dialog.reset()
58 ips.update()
59
60class Plugin(Filter):
61 modal = False

Callers

nothing calls this directly

Calls 5

snapMethod · 0.95
get_scaleMethod · 0.80
countMethod · 0.45
resetMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected