From: Kevin A. <ka...@us...> - 2005-08-11 06:26:42
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14775 Modified Files: graphic.py Log Message: added saveWindowScreenshot function Index: graphic.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/graphic.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** graphic.py 24 Oct 2004 22:01:19 -0000 1.17 --- graphic.py 11 Aug 2005 06:26:32 -0000 1.18 *************** *** 77,80 **** --- 77,93 ---- + def saveWindowScreenshot(w, path): + bmp = wx.EmptyBitmap(w.size[0], w.size[1]) + memdc = wx.MemoryDC() + memdc.SelectObject(bmp) + dc = wx.WindowDC(w) + memdc.BlitPointSize((0, 0), w.size, dc, (0, 0)) + bmp.SaveFile(path, bitmapType(path)) + dc = None + memdc.SelectObject(wx.NullBitmap) + memdc = None + bmp = None + + class Bitmap : |