M_BRUSHDATA->m_colour = colour;
}
+#if FUTURE_WXWIN_COMPATIBILITY_3_0
+wxBrush::wxBrush(const wxColour& col, int style)
+{
+ m_refData = new wxBrushRefData;
+ M_BRUSHDATA->m_style = (wxBrushStyle)style;
+ M_BRUSHDATA->m_colour = colour;
+}
+#endif
+
wxBrush::wxBrush(const wxBitmap &stippleBitmap)
{
- wxCHECK_RET( stippleBitmap.Ok(), _T("invalid bitmap") );
+ wxCHECK_RET( stippleBitmap.Ok(), wxT("invalid bitmap") );
wxCHECK_RET( stippleBitmap.GetWidth() == 8 && stippleBitmap.GetHeight() == 8,
- _T("stipple bitmap must be 8x8") );
+ wxT("stipple bitmap must be 8x8") );
m_refData = new wxBrushRefData();
M_BRUSHDATA->m_colour = *wxBLACK;
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;
}
wxBitmap *wxBrush::GetStipple() const
{
- if (m_refData == NULL)
- {
- wxFAIL_MSG( wxT("invalid brush") );
- return &wxNullBitmap;
- }
+ wxCHECK_MSG( Ok(), NULL, wxT("invalid brush") );
return &M_BRUSHDATA->m_stipple;
}
{
AllocExclusive();
- wxCHECK_RET( stipple.Ok(), _T("invalid bitmap") );
+ wxCHECK_RET( stipple.Ok(), wxT("invalid bitmap") );
wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
- _T("stipple bitmap must be 8x8") );
+ wxT("stipple bitmap must be 8x8") );
M_BRUSHDATA->m_stipple = stipple;
wxBitmapToPixPattern(stipple, &(M_BRUSHDATA->m_pixPattern),