diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-03-11 15:31:02 -0500 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-03-11 15:31:02 -0500 |
commit | ee87dabe7ae0054eef9a12fb32a2fe3d40457c9e (patch) | |
tree | fcf2a329b456497ca7faada4cafad50b7377e417 /Lib/tkinter | |
parent | 1a0cdfda27cb573c92027fb9b7e6baa3f3128747 (diff) | |
parent | f436858ee71b768b2f69f26ca9284b9692cfdee0 (diff) | |
download | cpython-ee87dabe7ae0054eef9a12fb32a2fe3d40457c9e.tar.gz |
Merge with 3.5
Diffstat (limited to 'Lib/tkinter')
-rw-r--r-- | Lib/tkinter/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index ffd4b4bc68..da2fd53b88 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -3406,16 +3406,20 @@ class PhotoImage(Image): destImage = PhotoImage(master=self.tk) self.tk.call(destImage, 'copy', self.name) return destImage - def zoom(self,x,y=''): + def zoom(self, x, y=''): """Return a new PhotoImage with the same image as this widget - but zoom it with X and Y.""" + 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. + """ destImage = PhotoImage(master=self.tk) if y=='': y=x self.tk.call(destImage, 'copy', self.name, '-zoom',x,y) return destImage - def subsample(self,x,y=''): + def subsample(self, x, y=''): """Return a new PhotoImage based on the same image as this widget - but use only every Xth or Yth pixel.""" + but use only every Xth or Yth pixel. If y is not given, the + default value is the same as x. + """ destImage = PhotoImage(master=self.tk) if y=='': y=x self.tk.call(destImage, 'copy', self.name, '-subsample',x,y) |