Phoenix Logo

phoenix_title wx.DCPenChanger

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


class_hierarchy Class Hierarchy

Inheritance diagram for class DCPenChanger:

method_summary Methods Summary

__init__ Sets pen on the given dc, storing the old one.
__enter__  
__exit__  

api Class API



class wx.DCPenChanger(object)

Possible constructors:

DCPenChanger(dc, pen)

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


Methods



__init__(self, dc, pen)

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

Parameters:
  • dc (wx.DC) – The DC where the pen must be temporary set.
  • pen (wx.Pen) – The pen to set.


__enter__(self)


__exit__(self, exc_type, exc_val, exc_tb)