Version: 2.9.4
Public Member Functions
wxDCBrushChanger Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/dc.h>


Detailed Description

wxDCBrushChanger is a small helper class for setting a brush on a wxDC and unsetting it automatically in the destructor, restoring the previous one.

Library:  wxCore
Category:  Graphics Device Interface (GDI)
参照:
wxDC::SetBrush(), wxDCFontChanger, wxDCTextColourChanger, wxDCPenChanger, wxDCClipper

Public Member Functions

 wxDCBrushChanger (wxDC &dc, const wxBrush &brush)
 Sets brush on the given dc, storing the old one.
 ~wxDCBrushChanger ()
 Restores the brush originally selected in the DC passed to the ctor.

List of all members.


Constructor & Destructor Documentation

wxDCBrushChanger::wxDCBrushChanger ( wxDC dc,
const wxBrush brush 
)

Sets brush on the given dc, storing the old one.

Parameters:
dcThe DC where the brush must be temporary set.
brushThe brush to set.
wxDCBrushChanger::~wxDCBrushChanger ( )

Restores the brush originally selected in the DC passed to the ctor.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines