wxWidgets: wxDCBrushChanger Class Reference

| Version: 3.0.5

Public Member Functions | List of all members
wxDCBrushChanger Class Reference
Class List by Category » Graphics Device Interface (GDI)

`#include </home/Hamish/wxwidgets/wxWidgets3.0-3.0.5.1-1.src/wxWidgets3.0-3.0.5.1-1.i686/src/wxWidgets-3.0.5.1/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

<>< =''>:</>&;&;< =''>\ </></>

See also
  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. More...
| ~wxDCBrushChanger ()
| Restores the brush originally selected in the DC passed to the ctor. More...

## Constructor & Destructor Documentation

## ◆ wxDCBrushChanger()

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

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

Parameters

  dc | The DC where the brush must be temporary set.
  brush | The brush to set.

## ◆ ~wxDCBrushChanger()

wxDCBrushChanger::~wxDCBrushChanger | ( |  | ) |

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