- void Init(wxDC *dc, const wxBitmap &bitmap);
- void Init(wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT);
+ void Init(wxDC *dc,
+ const wxBitmap &buffer=wxNullBitmap,
+ int style = wxBUFFER_CLIENT_AREA)
+ {
+ wxASSERT_MSG( m_dc == 0 && m_buffer == wxNullBitmap,
+ _T("wxBufferedDC already initialised") );
+ m_dc = dc;
+ m_buffer = buffer;
+ m_style = style;
+ UseBuffer();
+ }
+
+ void Init(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
+ {
+ Init(dc, wxBitmap(area.GetWidth(), area.GetHeight()), style);
+ }