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

Method set_ips

imagepy/ui/canvas.py:120–126  ·  view source on GitHub ↗
(self, ips)

Source from the content-addressed store, hash-verified

118 self.zoom(self.scales[self.scaleidx], 0, 0)
119
120 def set_ips(self, ips):
121 samesize = tuple(ips.img.shape[:2]) == self.imgsize
122 if ips==self.ips and samesize:return
123 self.imgsize = tuple(ips.img.shape[:2])
124 self.ips = ips
125 self.imgbox = [0,0,ips.size[1],ips.size[0]]
126 self.self_fit()
127
128 def zoom(self, k, x, y):
129 # print 'scale', k

Callers 4

on_idleMethod · 0.95
imageplus.pyFile · 0.45
canvas.pyFile · 0.45
mouse_downMethod · 0.45

Calls 1

self_fitMethod · 0.95

Tested by

no test coverage detected