.. include:: headings.inc .. _DCBrushChanger: ========================================================================================================================================== |phoenix_title| **DCBrushChanger** ========================================================================================================================================== :ref:`DCBrushChanger` is a small helper class for setting a brush on a :ref:`DC` and unsetting it automatically in the destructor, restoring the previous one. .. seealso:: :meth:`DC.SetBrush` , :ref:`DCFontChanger`, :ref:`DCTextColourChanger`, :ref:`DCPenChanger`, :ref:`DCClipper` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **DCBrushChanger** .. raw:: html

Inheritance diagram of DCBrushChanger

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~DCBrushChanger.__init__` Sets `brush` on the given `dc`, storing the old one. :meth:`~DCBrushChanger.__enter__` :meth:`~DCBrushChanger.__exit__` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: DCBrushChanger(object) DCBrushChanger is a small helper class for setting a brush on a DC and unsetting it automatically in the destructor, restoring the previous one. **Possible constructors**:: DCBrushChanger(dc, brush) .. method:: __init__(self, dc, brush) Sets `brush` on the given `dc`, storing the old one. :param `dc`: The DC where the brush must be temporary set. :type `dc`: DC :param `brush`: The brush to set. :type `brush`: Brush .. method:: __enter__(self) .. method:: __exit__(self, exc_type, exc_val, exc_tb)