Version: 2.9.4
Public Member Functions
wxDCPenChanger Class Reference

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


Detailed Description

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

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

Public Member Functions

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

List of all members.


Constructor & Destructor Documentation

wxDCPenChanger::wxDCPenChanger ( wxDC dc,
const wxPen pen 
)

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

Parameters:
dcThe DC where the pen must be temporary set.
penThe pen to set.
wxDCPenChanger::~wxDCPenChanger ( )

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

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines