Public Member Functions | |
HdcModeSetter (Canvas &canvas, int mode) | |
Constructor setting the ROP2 of the given Device Context. | |
~HdcModeSetter () | |
Automatically resets the ROP2. |
The ROP2 mode is used for telling windows which type of brush you want while painting.
this class ensures we reset the ROP2 mode after we have fiinished with it.
Used in combination with e.g. UpdateCanvas or PaintCanvas.
Supported modes are those supported in Windows API
HdcModeSetter | ( | Canvas & | canvas, | |
int | mode | |||
) |
Constructor setting the ROP2 of the given Device Context.
The mode is any of the above enums.
~HdcModeSetter | ( | ) |
Automatically resets the ROP2.
Resets the mode back to what it was before this object was created. Note this object cannot have longer lifetime than the Canvas given to the Constructor since this will cause undefined behavior.