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

Method center

imagepy/ui/canvas.py:148–152  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

146 self.update(True)
147
148 def center(self, x, y):
149 k = self.scales[self.scaleidx]
150 self.imgbox[0] = self.box[2]/2 - x*k
151 self.imgbox[1] = self.box[3]/2 - y*k
152 lay(self.box, self.imgbox)
153
154 def on_size(self, event):
155 self.reInitBuffer = True

Callers 1

on_handleMethod · 0.80

Calls 1

layFunction · 0.85

Tested by

no test coverage detected