X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..f8c5636c42238296eb67bf73d1da3c5acb010fee:/src/gtk1/brush.cpp diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index 2f945402ce..70a2790e4a 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -65,10 +65,15 @@ wxBrush::wxBrush( const wxColour &colour, int style ) 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 ); } @@ -91,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush ) 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; } @@ -161,6 +166,14 @@ void wxBrush::SetStipple( const wxBitmap& stipple ) { 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()