X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e6858cdcb9278b36446466c346d984e7e306553..af4d748440f97aa6e37ab44dfc3fd14b7f42868e:/src/dfb/brush.cpp diff --git a/src/dfb/brush.cpp b/src/dfb/brush.cpp index 51a295f997..e636ecc33e 100644 --- a/src/dfb/brush.cpp +++ b/src/dfb/brush.cpp @@ -48,7 +48,7 @@ public: if ( style != wxSOLID && style != wxTRANSPARENT ) { wxFAIL_MSG( wxT("only wxSOLID and wxTRANSPARENT styles are supported") ); - style = wxSOLID; + style = wxBRUSHSTYLE_SOLID; } m_style = style; @@ -69,6 +69,13 @@ wxBrush::wxBrush(const wxColour &colour, wxBrushStyle style) m_refData = new wxBrushRefData(colour, style); } +#if FUTURE_WXWIN_COMPATIBILITY_3_0 +wxBrush::wxBrush(const wxColour& col, int style) +{ + m_refData = new wxBrushRefData(col, (wxBrushStyle)style); +} +#endif + wxBrush::wxBrush(const wxBitmap &stippleBitmap) { wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") ); @@ -84,22 +91,14 @@ bool wxBrush::operator==(const wxBrush& brush) const wxBrushStyle wxBrush::GetStyle() const { - if (m_refData == NULL) - { - wxFAIL_MSG( wxT("invalid brush") ); - return 0; - } + wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, _T("invalid brush") ); return M_BRUSHDATA->m_style; } -wxColour& wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { - if (m_refData == NULL) - { - wxFAIL_MSG( wxT("invalid brush") ); - return wxNullColour; - } + wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") ); return M_BRUSHDATA->m_colour; }