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

Method run

imagepy/menus/Edit/edit_plg.py:51–65  ·  view source on GitHub ↗
(self, ips, imgs, para = None)

Source from the content-addressed store, hash-verified

49 note = ['all']
50
51 def run(self, ips, imgs, para = None):
52 if ClipBoardManager.img == None:return
53 ips.snapshot()
54 ips.roi = ClipBoardManager.roi
55 ci = ClipBoardManager.img
56 img = ips.img
57 #ips.roi.draged(ci.shape[1]/2,ci.shape[0]/2, ips.size[1]/2, ips.size[0]/2, True)
58 ips.roi = ClipBoardManager.roi.affine(np.eye(2),
59 ((np.array(ips.size)-ci.shape[:2])[::-1]/2))
60
61 x,y = (np.array(ips.size)-ci.shape[:2])/2
62 bliter.blit(img, ci, y, x)
63 ips.reset(True)
64 ips.tool = PasteMove()
65 #nimg.affine_transform(img, np.eye(2), output=buf, offset=()
66
67class Clear(Filter):
68 title = 'Clear'

Callers

nothing calls this directly

Calls 4

PasteMoveClass · 0.85
affineMethod · 0.80
snapshotMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected