Table Of Contents

Previous topic

DCOverlay

Next topic

DCTextColourChanger

This Page

phoenix_title DCPenChanger

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


class_hierarchy Inheritance Diagram

Inheritance diagram for class DCPenChanger

Inheritance diagram of DCPenChanger


method_summary Methods Summary

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

api Class API



class DCPenChanger(object)

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

Possible constructors:

DCPenChanger(dc, pen)

Methods



__init__(self, dc, pen)

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

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


__enter__(self)


__exit__(self, exc_type, exc_val, exc_tb)