// Purpose: Erase wxWidgets sample
// Author: Robert Roebling, Vadim Zeitlin
// Created: 04/01/98
-// RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling
// (c) 2009 Vadim Zeitlin
// Licence: wxWindows licence
void MyCanvas::DoPaint(wxDC& dc)
{
+ PrepareDC(dc);
+
if ( m_eraseBgInPaint )
{
dc.SetBackground(*wxLIGHT_GREY);
if ( m_useBuffer )
{
wxAutoBufferedPaintDC dc(this);
- PrepareDC(dc);
-
DoPaint(dc);
}
else
{
wxPaintDC dc(this);
- PrepareDC(dc);
-
DoPaint(dc);
}
}