summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-03-11 20:31:02 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-03-11 20:31:02 (GMT)
commita55553d7e3f86d5f2475720823ec2ac7f944e3e6 (patch)
tree110b69582acf78372714348008bf9eed3a6e2a65 /Lib/tkinter
parentf915e0e3935768affa90ef1ac4965593067ea6c6 (diff)
parentca0250a87805d7f1f52d04a9dffa0944b2f13278 (diff)
downloadcpython-a55553d7e3f86d5f2475720823ec2ac7f944e3e6.zip
cpython-a55553d7e3f86d5f2475720823ec2ac7f944e3e6.tar.gz
cpython-a55553d7e3f86d5f2475720823ec2ac7f944e3e6.tar.bz2
Merge with 3.5
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index ffd4b4b..da2fd53 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)