wxBrush::wxBrush( const wxBitmap &stippleBitmap )
{
m_refData = new wxBrushRefData();
- M_BRUSHDATA->m_style = wxSTIPPLE;
M_BRUSHDATA->m_colour = *wxBLACK;
+
M_BRUSHDATA->m_stipple = stippleBitmap;
+ if (M_BRUSHDATA->m_stipple.GetMask())
+ M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+ else
+ M_BRUSHDATA->m_style = wxSTIPPLE;
+
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
return *this;
}
-bool wxBrush::operator == ( const wxBrush& brush )
+bool wxBrush::operator == ( const wxBrush& brush ) const
{
return m_refData == brush.m_refData;
}
-bool wxBrush::operator != ( const wxBrush& brush )
+bool wxBrush::operator != ( const wxBrush& brush ) const
{
return m_refData != brush.m_refData;
}
{
Unshare();
M_BRUSHDATA->m_stipple = stipple;
+ if (M_BRUSHDATA->m_stipple.GetMask())
+ {
+ M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+ }
+ else
+ {
+ M_BRUSHDATA->m_style = wxSTIPPLE;
+ }
}
void wxBrush::Unshare()