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

Method to_panel_coor

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

Source from the content-addressed store, hash-verified

278 return (x/self.get_scale(), y/self.get_scale())
279
280 def to_panel_coor(self, x, y):
281 x = x * self.get_scale() + self.imgbox[0] + self.box[0]
282 y = y * self.get_scale() + self.imgbox[1] + self.box[1]
283 return x,y
284
285 def on_update(self):
286 pass

Callers 4

mouse_downMethod · 0.80
mouse_moveMethod · 0.80
mouse_downMethod · 0.80
mouse_moveMethod · 0.80

Calls 1

get_scaleMethod · 0.95

Tested by

no test coverage detected