summaryrefslogtreecommitdiffstats
path: root/Mac/Demo/imgbrowse
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
commit362c7cd07bd32f94e80e5ca954834cfbc1709953 (patch)
tree8f929854033e856a2bf29d9167da8c98f754a416 /Mac/Demo/imgbrowse
parent202355a333b98213449b30dcbfa620be86c96085 (diff)
downloadcpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.zip
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.gz
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.bz2
Lots of minor tweaks for the pep252 checkins, mainly because Qd
attributes are no longer supported.
Diffstat (limited to 'Mac/Demo/imgbrowse')
-rw-r--r--Mac/Demo/imgbrowse/imgbrowse.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mac/Demo/imgbrowse/imgbrowse.py b/Mac/Demo/imgbrowse/imgbrowse.py
index c67f4e8..b54f82b 100644
--- a/Mac/Demo/imgbrowse/imgbrowse.py
+++ b/Mac/Demo/imgbrowse/imgbrowse.py
@@ -1,4 +1,4 @@
-"""imgbrowse - Display pictures using img"""
+GetPortBounds()"""imgbrowse - Display pictures using img"""
import FrameWork
import EasyDialogs
@@ -88,16 +88,16 @@ class imgwindow(FrameWork.Window):
currect = self.fitrect()
print 'PICT:', self.pictrect
print 'WIND:', currect
- print 'ARGS:', (self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect,
+ print 'ARGS:', (self.pixmap, self.wid.GetWindowPort().GetPortBitMapForCopyBits(), self.pictrect,
currect, QuickDraw.srcCopy, None)
self.info()
- Qd.CopyBits(self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect,
+ Qd.CopyBits(self.pixmap, self.wid.GetWindowPort().GetPortBitMapForCopyBits(), self.pictrect,
currect, QuickDraw.srcCopy, None)
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
graf = self.wid.GetWindowPort()
- screenrect = graf.portRect
+ screenrect = graf.GetPortBounds()
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
if picwidth > screenrect[2] - screenrect[0]:
@@ -113,7 +113,7 @@ class imgwindow(FrameWork.Window):
def info(self):
graf = self.wid.GetWindowPort()
- bits = graf.portBits
+ bits = graf.GetPortBitMapForCopyBits()
mac_image.dumppixmap(bits.pixmap_data)
main()