patches for wxSTIPPLE_MASK_OPAQUE from Klass Holwerda

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-24 15:58:33 +00:00
parent bf3dab485a
commit de2d2cdc86
7 changed files with 166 additions and 16 deletions

View File

@@ -65,9 +65,16 @@ 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 );
}
@@ -161,6 +168,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()