Public Member Functions | |
TextPen (Canvas &canvas, COLORREF color) | |
Constructor taking a Canvas and a COLORREF. | |
~TextPen () | |
Automatically restores the old TextColor. |
Constructor takes a COLORREF. (Use the RGB macro.
Class ensures that the previous text color is restored on object destruction.
Related classes
Constructor taking a Canvas and a COLORREF.
Build a COLORREF argument with windows.h's RGB( red, green, blue )
~TextPen | ( | ) |
Automatically restores the old TextColor.
Since this is a RAII structure it ensures the old pen is restored upon destruction. Be careful though since if this oulives the Canvas object given undefined behaviour will occur!