void wxGenericBrush::Set( const wxGenericBrush& brush ) { wxCHECK_RET(Ok() && brush.Ok(), wxT("Invalid generic brush")); SetColour(brush.GetColour()); M_GBRUSHDATA->m_style = brush.GetStyle(); wxBitmap* stipple = brush.GetStipple(); if (stipple && stipple->Ok()) M_GBRUSHDATA->m_stipple = *stipple; }
bool wxGenericBrush::IsSameAs(const wxGenericBrush& brush) const { wxCHECK_MSG(Ok() && brush.Ok(), 1, wxT("Invalid generic brush")); wxGenericBrushRefData *bData = (wxGenericBrushRefData*)brush.GetRefData(); return (M_GBRUSHDATA->m_colour == bData->m_colour) && (M_GBRUSHDATA->m_style == bData->m_style) && #if wxCHECK_VERSION(2,7,2) (M_GBRUSHDATA->m_stipple.IsSameAs(bData->m_stipple)); #else (M_GBRUSHDATA->m_stipple == bData->m_stipple); #endif // wxCHECK_VERSION(2,7,2) }
bool wxGenericBrush::IsSameAs(const wxGenericBrush& brush) const { wxCHECK_MSG(Ok() && brush.Ok(), 1, wxT("Invalid generic brush")); wxGenericBrushRefData *bData = (wxGenericBrushRefData*)brush.GetRefData(); #if wxCHECK_VERSION(2,7,0) // FIXME: Hack for wx2.7; how do we test wxBitmap for equality now? return (M_GBRUSHDATA->m_colour == bData->m_colour) && (M_GBRUSHDATA->m_style == bData->m_style); #else return (M_GBRUSHDATA->m_colour == bData->m_colour) && (M_GBRUSHDATA->m_style == bData->m_style) && (M_GBRUSHDATA->m_stipple == bData->m_stipple); #endif }