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

Method mouse_up

imagepy/menus/Edit/edit_plg.py:26–37  ·  view source on GitHub ↗
(self, ips, x, y, btn, **key)

Source from the content-addressed store, hash-verified

24 self.ox, self.oy = x, y
25
26 def mouse_up(self, ips, x, y, btn, **key):
27 if self.moving == True:
28 self.moving = False
29 ci = ClipBoardManager.img
30 img = ips.img
31 #ips.roi.draged(ci.shape[1]/2,ci.shape[0]/2, ips.size[1]/2, ips.size[0]/2, True)
32 #ips.roi = IPy.clipboard[1].affine(np.eye(2), ((np.array(ips.size)-ci.shape[:2])[::-1]/2))
33 x,y = (np.array(ips.size)-ci.shape[:2])/2+(self.cy,self.cx)
34 bliter.blit(img, ci, y, x)
35
36 ips.reset(True)
37 ips.update()
38
39 def mouse_move(self, ips, x, y, btn, **key):
40 if self.moving==True and btn!=None:

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected