// global variables
// ---------------------------------------------------------------------------
-extern WXDLLEXPORT_DATA(int) wxPageNumber;
-
// ---------------------------------------------------------------------------
// wxDC is the device context - object on which any drawing is done
// ---------------------------------------------------------------------------
ResetClipping();
}
- ~wxDCBase() { }
+ virtual ~wxDCBase() { }
#if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( virtual void BeginDrawing() );
#include "wx/x11/dc.h"
#elif defined(__WXMGL__)
#include "wx/mgl/dc.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/dc.h"
#elif defined(__WXMAC__)
#include "wx/mac/dc.h"
#elif defined(__WXCOCOA__)
class WXDLLEXPORT wxDCPenChanger
{
public:
- wxDCPenChanger(wxDC& dc) : m_dc(dc), m_penOld() { }
+ wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
+ {
+ m_dc.SetPen(pen);
+ }
~wxDCPenChanger()
{
m_dc.SetPen(m_penOld);
}
- void Set(const wxPen& pen)
- {
- if ( !m_penOld.Ok() )
- m_penOld = m_dc.GetPen();
- m_dc.SetPen(pen);
- }
-
private:
wxDC& m_dc;
class WXDLLEXPORT wxDCBrushChanger
{
public:
- wxDCBrushChanger(wxDC& dc) : m_dc(dc), m_brushOld() { }
+ wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
+ {
+ m_dc.SetBrush(brush);
+ }
~wxDCBrushChanger()
{
m_dc.SetBrush(m_brushOld);
}
- void Set(const wxBrush& brush)
- {
- if ( !m_brushOld.Ok() )
- m_brushOld = m_dc.GetBrush();
- m_dc.SetBrush(brush);
- }
-
private:
wxDC& m_dc;