MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / zoom

Method zoom

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:4171–4179  ·  view source on GitHub ↗

Return a new PhotoImage with the same image as this widget but zoom it with a factor of x in the X direction and y in the Y direction. If y is not given, the default value is the same as x.

(self, x, y='')

Source from the content-addressed store, hash-verified

4169 return destImage
4170
4171 def zoom(self, x, y=''):
4172 """Return a new PhotoImage with the same image as this widget
4173 but zoom it with a factor of x in the X direction and y in the Y
4174 direction. If y is not given, the default value is the same as x.
4175 """
4176 destImage = PhotoImage(master=self.tk)
4177 if y=='': y=x
4178 self.tk.call(destImage, 'copy', self.name, '-zoom',x,y)
4179 return destImage
4180
4181 def subsample(self, x, y=''):
4182 """Return a new PhotoImage based on the same image as this widget

Callers 1

test_zoomMethod · 0.80

Calls 2

PhotoImageClass · 0.85
callMethod · 0.80

Tested by 1

test_zoomMethod · 0.64