Table Of Contents

Previous topic

DC

Next topic

DCClipper

This Page

phoenix_title DCBrushChanger

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


class_hierarchy Inheritance Diagram

Inheritance diagram for class DCBrushChanger

Inheritance diagram of DCBrushChanger


method_summary Methods Summary

__init__ Sets brush on the given dc, storing the old one.
__enter__  
__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)

Methods



__init__(self, dc, brush)

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

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


__enter__(self)


__exit__(self, exc_type, exc_val, exc_tb)