Introduced wxDCPenChanger and wxDCBrushChanger.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-05-22 14:25:35 +00:00
parent 75d6ba569d
commit 4660e6acfc
2 changed files with 72 additions and 12 deletions

View File

@@ -232,12 +232,13 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
int flags)
{
// store settings
wxPen pen(dc.GetPen());
wxBrush brush(dc.GetBrush());
wxDCPenChanger penChanger(dc);
wxDCBrushChanger brushChanger(dc);
// white background
dc.SetPen(*wxGREY_PEN);
dc.SetBrush(*wxWHITE_BRUSH);
penChanger.Set(*wxGREY_PEN);
brushChanger.Set(*wxWHITE_BRUSH);
dc.DrawRectangle(rect);
// black lines
@@ -257,9 +258,6 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
dc.DrawLine(xMiddle, yMiddle - halfHeight,
xMiddle, yMiddle + halfHeight + 1);
}
dc.SetPen(pen);
dc.SetBrush(brush);
}
// ----------------------------------------------------------------------------