if ( style != wxSOLID && style != wxTRANSPARENT )
{
wxFAIL_MSG( wxT("only wxSOLID and wxTRANSPARENT styles are supported") );
- style = wxSOLID;
+ style = wxBRUSHSTYLE_SOLID;
}
m_style = 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") );
wxBrushStyle wxBrush::GetStyle() const
{
- if (m_refData == NULL)
- {
- wxFAIL_MSG( wxT("invalid brush") );
- return 0;
- }
+ wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, wxT("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, wxT("invalid brush") );
return M_BRUSHDATA->m_colour;
}