|
From: Kevin A. <ka...@us...> - 2004-10-10 02:32:28
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28014/components Modified Files: bitmapcanvas.py Log Message: added (x, y) and (width, height) args to getBitmap with smart defaults Index: bitmapcanvas.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/bitmapcanvas.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** bitmapcanvas.py 10 Oct 2004 01:20:20 -0000 1.44 --- bitmapcanvas.py 10 Oct 2004 02:32:18 -0000 1.45 *************** *** 460,469 **** evt.Skip() ! def getBitmap(self): ! size = self.GetClientSizeTuple() memory = wx.MemoryDC() ! bitmap = wx.EmptyBitmap(size[0], size[1]) memory.SelectObject(bitmap) ! memory.BlitPointSize((0, 0), size, self._bufImage, (0, 0)) memory.SelectObject(wx.NullBitmap) return bitmap --- 460,473 ---- evt.Skip() ! def getBitmap(self, xy=(0, 0), widthHeight=(-1, -1)): ! w, h = self.GetClientSizeTuple() ! if widthHeight[0] != -1: ! w = widthHeight[0] ! if widthHeight[1] != -1: ! h = widthHeight[1] memory = wx.MemoryDC() ! bitmap = wx.EmptyBitmap(w, h) memory.SelectObject(bitmap) ! memory.BlitPointSize((0, 0), (w, h), self._bufImage, xy) memory.SelectObject(wx.NullBitmap) return bitmap |