*ask for help by printing a <wx._gdi.Bitmap; proxy of C++ wxBitmap instance at _78e43601_p_wxBitmap>*
dear reader,
i ask kindly for your input and help
*I draw to an EmptyBitmap (self._buffer) a few things.*
something like that:
def MakeBufferBitmap(self):
# Initialize the buffer bitmap. No real DC is needed at this point.
self._buffer = wx.EmptyBitmap(self.ScrolledWindowMaxWidth, self.ScrolledWindowMaxHeight)
dc = wx.BufferedDC(None, self._buffer)
dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
dc.Clear()
return dc
*When the user presses a SHOW button I show this:*
def TEST(self):
#dc = wx.BufferedDC(wx.ClientDC(self), self._buffer) # Short version
print self._buffer # <wx._gdi.Bitmap; proxy of C++ wxBitmap instance at _78e43601_p_wxBitmap>
dc = wx.MemoryDC()
dc.SelectObject(self._buffer)
wx.ClientDC(self).Blit(0, 0, self.ScrolledWindowMaxWidth, self.ScrolledWindowMaxHeight, dc, 0, 0)
*When the user presses a SAVE_image button I save this:*
def Save_AS_Image(self,FileName,FileType):
## This will save the contents of the buffer
## to the specified file. See the wxWindows docs for
## wxBitmap::SaveFile for the details
self._buffer.SaveFile(FileName,FileType)
*When the user presses a PrintPriewView button I want to PrintPreview this and afterwards print it:
*How can I print preview / preview the drawing on self._buffer
Thanks so much - small code would be helpful because I'm a wxpython beginner.
MrJanes