Version: 3.1.5
Loading...
Searching...
No Matches

#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-2.x86_64/src/wxWidgets-3.1.5/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

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

See also
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.
 

Constructor & Destructor Documentation

◆ wxDCPenChanger()

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::~wxDCPenChanger ( )

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