Hi
I' am sending a python file that shows a problem I have, trying to save a
drawing on a canvas to a file. I' am using the recommended method that
appears on the wiki:
def SaveToFile(self,file_name,file_type):
context = wxClientDC(self)
memory = wxMemoryDC()
x,y = self.pxsize
x = x + 1
y = y + 1
bitmap = wxEmptyBitmap(x,y,-1)
memory.SelectObject(bitmap)
memory.Blit(0,0,x,y,context,0,0)
memory.SelectObject(wxNullBitmap)
bitmap.SaveFile(file_name,file_type)
In my app I need to select the menu "File->Save Image" to save the current
view. On windows (98 and XP at least) this works very well, but on linux the
area of the drawing covered by the menu is not saved (I got a white area).
Using Python 2.2.1, wxPython 2.3.3.1
Tested on windows 98 an XP
Tested on Linux Mandrake 9.0
I know I can avoid this problem using the keyboard, but the menu is the
logic way to go.
Some ideas?
Thanks in advance
Cristian
CerCanvasEN.py (6.33 KB)