#include "wx/brush.h"
#include "wx/mgl/private.h"
-#include "wx/mgl/dcmemory.h"
+#include "wx/dcmemory.h"
// ---------------------------------------------------------------------------
if ( pix != NULL )
{
- mem.SelectObject(bitmap);
+ mem.SelectObjectAsSource(bitmap);
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
if ( mask && bitmap.GetMask() )
{
- mem.SelectObject(bitmap.GetMask()->GetBitmap());
+ mem.SelectObjectAsSource(bitmap.GetMask()->GetBitmap());
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
// wxBrush
//-----------------------------------------------------------------------------
-class wxBrushRefData: public wxObjectRefData
+class wxBrushRefData : public wxGDIRefData
{
public:
wxBrushRefData();
wxBrushRefData(const wxBrushRefData& data);
- bool operator == (const wxBrushRefData& data) const
+ virtual bool IsOk() const { return m_colour.IsOk(); }
+
+ bool operator==(const wxBrushRefData& data) const
{
return (m_style == data.m_style &&
- m_stipple.IsRefTo(&data.m_stipple) &&
+ m_stipple.IsSameAs(data.m_stipple) &&
m_colour == data.m_colour);
}
return m_refData != brush.m_refData;
}
-bool wxBrush::IsOk() const
-{
- return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
-}
-
int wxBrush::GetStyle() const
{
if (m_refData == NULL)
M_BRUSHDATA->m_style = wxSTIPPLE;
}
-wxObjectRefData *wxBrush::CreateRefData() const
+wxGDIRefData *wxBrush::CreateGDIRefData() const
{
return new wxBrushRefData;
}
-wxObjectRefData *wxBrush::CloneRefData(const wxObjectRefData *data) const
+wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const
{
return new wxBrushRefData(*(wxBrushRefData *)data);
}