#endif
#include "wx/dc.h"
+#include "wx/dcmemory.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
m_font = *wxNORMAL_FONT;
m_brush = *wxTRANSPARENT_BRUSH;
m_backgroundBrush = *wxWHITE_BRUSH;
+
+ m_isInteractive = FALSE;
// m_palette = wxAPP_COLOURMAP;
};
{
};
+void wxDC::DrawBitmap( const wxBitmap& bitmap, long x, long y, bool useMask )
+{
+ if (!bitmap.Ok())
+ return;
+
+ wxMemoryDC memDC;
+ memDC.SelectObject(bitmap);
+
+/* Not sure if we need this. The mask should leave the
+ * masked areas as per the original background of this DC.
+ if (useMask)
+ {
+ // There might be transparent areas, so make these
+ // the same colour as this DC
+ memDC.SetBackground(* GetBackground());
+ memDC.Clear();
+ }
+*/
+
+ Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), & memDC, 0, 0, wxCOPY, useMask);
+
+ memDC.SelectObject(wxNullBitmap);
+};
+
+
void wxDC::DrawPoint( wxPoint& point )
{
DrawPoint( point.x, point.y );
};
};
-void wxDC::DrawSpline( wxList *points )
-{
- DrawOpenSpline( points );
-};
-
void wxDC::DrawSpline( int n, wxPoint points[] )
{
wxList list;
{
// this is a bit artificial, but we need to force wxDC to think
// the pen has changed
- wxPen* pen = GetPen();
+ wxPen* pen = & GetPen();
wxPen tempPen;
m_pen = tempPen;
- SetPen(pen);
+ SetPen(* pen);
}
};