Phoenix Logo

phoenix_title wx.DCBrushChanger

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


class_hierarchy Class Hierarchy

Inheritance diagram for class DCBrushChanger:

method_summary Methods Summary

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

api Class API



class wx.DCBrushChanger(object)

Possible constructors:

DCBrushChanger(dc, brush)

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


Methods



__init__(self, dc, brush)

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

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


__enter__(self)


__exit__(self, exc_type, exc_val, exc_tb)