// wxDrawObject helper class
//-----------------------------------------------------------------------------
-class WXDLLEXPORT wxDrawObject
+class WXDLLIMPEXP_CORE wxDrawObject
{
public:
virtual bool CanDrawBitmap() const = 0;
virtual bool CanGetTextExtent() const = 0;
+ // get Cairo context
+ virtual void* GetCairoContext() const
+ {
+ return NULL;
+ }
+
// query dimension, colour deps, resolution
virtual void DoGetSize(int *width, int *height) const = 0;
#if wxUSE_SPLINES
- virtual void DoDrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord x3, wxCoord y3);
- virtual void DoDrawSpline(int n, wxPoint points[]);
+ void DrawSpline(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord x3, wxCoord y3);
+ void DrawSpline(int n, wxPoint points[]);
+ void DrawSpline(const wxPointList *points) { DoDrawSpline(points); }
+
virtual void DoDrawSpline(const wxPointList *points);
#endif
void DrawSpline(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord x3, wxCoord y3)
- { m_pimpl->DoDrawSpline(x1,y1,x2,y2,x3,y3); }
+ { m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); }
void DrawSpline(int n, wxPoint points[])
- { m_pimpl->DoDrawSpline(n,points); }
+ { m_pimpl->DrawSpline(n,points); }
void DrawSpline(const wxPointList *points)
- { m_pimpl->DoDrawSpline(points); }
+ { m_pimpl->DrawSpline(points); }
#endif // wxUSE_SPLINES
// restore it automatically when the object goes out of scope
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxDCTextColourChanger
+class WXDLLIMPEXP_CORE wxDCTextColourChanger
{
public:
wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { }
// restore it automatically when the object goes out of scope
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxDCPenChanger
+class WXDLLIMPEXP_CORE wxDCPenChanger
{
public:
wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
// restore it automatically when the object goes out of scope
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxDCBrushChanger
+class WXDLLIMPEXP_CORE wxDCBrushChanger
{
public:
wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
// destroys it in the dtor
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxDCClipper
+class WXDLLIMPEXP_CORE wxDCClipper
{
public:
wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc)