Brush updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-12-12 04:47:28 +00:00
parent 730fc65465
commit 15f03b25a6
4 changed files with 248 additions and 159 deletions

View File

@@ -1011,15 +1011,43 @@ void wxDC::SetPen(
m_hOldPen = m_pen.GetPS();
}
}
}
void wxDC::SetBrush(
const wxBrush& rBrush
)
{
// TODO
}
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_brush == rBrush)
return;
m_brush = rBrush;
if (!m_brush.Ok())
return;
if (m_hOldBrush)
m_hOldBrush = 0L;
m_brush = rBrush;
if (!m_brush.Ok())
{
if (m_hOldBrush)
{
m_brush.SetPS((HPS)m_hOldBrush);
}
m_hOldBrush = 0L;
}
if (m_brush.Ok())
{
if (m_brush.GetResourceHandle())
{
m_brush.SetPS(m_hPS);
if (!m_hOldBrush)
m_hOldBrush = m_brush.GetPS();
}
}
} // end of wxDC::SetBrush
void wxDC::SetBackground(const wxBrush& brush)
{