1- """imgbrowse - Display pictures using img"""
1+ GetPortBounds () """imgbrowse - Display pictures using img"""
22
33import FrameWork
44import EasyDialogs
@@ -88,16 +88,16 @@ def do_update(self, *args):
8888 currect = self .fitrect ()
8989 print 'PICT:' , self .pictrect
9090 print 'WIND:' , currect
91- print 'ARGS:' , (self .pixmap , self .wid .GetWindowPort ().portBits , self .pictrect ,
91+ print 'ARGS:' , (self .pixmap , self .wid .GetWindowPort ().GetPortBitMapForCopyBits () , self .pictrect ,
9292 currect , QuickDraw .srcCopy , None )
9393 self .info ()
94- Qd .CopyBits (self .pixmap , self .wid .GetWindowPort ().portBits , self .pictrect ,
94+ Qd .CopyBits (self .pixmap , self .wid .GetWindowPort ().GetPortBitMapForCopyBits () , self .pictrect ,
9595 currect , QuickDraw .srcCopy , None )
9696
9797 def fitrect (self ):
9898 """Return self.pictrect scaled to fit in window"""
9999 graf = self .wid .GetWindowPort ()
100- screenrect = graf .portRect
100+ screenrect = graf .GetPortBounds ()
101101 picwidth = self .pictrect [2 ] - self .pictrect [0 ]
102102 picheight = self .pictrect [3 ] - self .pictrect [1 ]
103103 if picwidth > screenrect [2 ] - screenrect [0 ]:
@@ -113,7 +113,7 @@ def fitrect(self):
113113
114114 def info (self ):
115115 graf = self .wid .GetWindowPort ()
116- bits = graf .portBits
116+ bits = graf .GetPortBitMapForCopyBits ()
117117 mac_image .dumppixmap (bits .pixmap_data )
118118
119119main ()
0 commit comments