X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf6824d93de87e00c2a7659e9c405ecf9bf87d5c..d9af3670ee77b9ff4cc46416137ffc92a9ce973d:/src/mgl/brush.cpp diff --git a/src/mgl/brush.cpp b/src/mgl/brush.cpp index 749af4a4f0..b8f6073f38 100644 --- a/src/mgl/brush.cpp +++ b/src/mgl/brush.cpp @@ -16,7 +16,7 @@ #include "wx/brush.h" #include "wx/mgl/private.h" -#include "wx/mgl/dcmemory.h" +#include "wx/dcmemory.h" // --------------------------------------------------------------------------- @@ -70,13 +70,15 @@ void wxBitmapToPixPattern(const wxBitmap& bitmap, // 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.IsSameAs(data.m_stipple) && @@ -164,11 +166,6 @@ bool wxBrush::operator != (const wxBrush& brush) const 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) @@ -252,12 +249,12 @@ void wxBrush::SetStipple(const wxBitmap& stipple) 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); }