X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51b7f9464da7980f9854c39b7c4a8b8d98b2f691..a6526c73b1dddeec2fd74a370702305e46b60c7a:/src/mgl/brush.cpp diff --git a/src/mgl/brush.cpp b/src/mgl/brush.cpp index b151db8a0a..b8f6073f38 100644 --- a/src/mgl/brush.cpp +++ b/src/mgl/brush.cpp @@ -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); }