MCPcopy Index your code
hub / github.com/RustPython/RustPython / subsample

Method subsample

Lib/tkinter/__init__.py:4336–4345  ·  view source on GitHub ↗

Return a new PhotoImage based on the same image as this widget but use only every Xth or Yth pixel. If Y is not given, the default value is the same as X. The FROM_COORDS option specifies a rectangular sub-region of the source image to be copied, as in the copy() me

(self, x, y='', *, from_coords=None)

Source from the content-addressed store, hash-verified

4334 return self.copy(zoom=(x, y), from_coords=from_coords)
4335
4336 def subsample(self, x, y='', *, from_coords=None):
4337 """Return a new PhotoImage based on the same image as this widget
4338 but use only every Xth or Yth pixel. If Y is not given, the
4339 default value is the same as X.
4340
4341 The FROM_COORDS option specifies a rectangular sub-region of the
4342 source image to be copied, as in the copy() method.
4343 """
4344 if y=='': y=x
4345 return self.copy(subsample=(x, y), from_coords=from_coords)
4346
4347 def copy_replace(self, sourceImage, *, from_coords=None, to=None, shrink=False,
4348 zoom=None, subsample=None, compositingrule=None):

Callers

nothing calls this directly

Calls 1

copyMethod · 0.95

Tested by

no test coverage detected