QGIS API Documentation  3.37.0-Master (a5b4d9743e8)
Public Member Functions | List of all members
QgsScopedQPainterState Class Reference

Scoped object for saving and restoring a QPainter object's state. More...

#include <qgsrendercontext.h>

Public Member Functions

 QgsScopedQPainterState (QPainter *painter)
 Constructor for QgsScopedQPainterState. More...
 
 ~QgsScopedQPainterState ()
 Restores the painter back to its original state. More...
 

Detailed Description

Scoped object for saving and restoring a QPainter object's state.

Temporarily saves the QPainter state for the lifetime of the object, before restoring it on destruction.

Note
Not available in Python bindings
Since
QGIS 3.16

Definition at line 1394 of file qgsrendercontext.h.

Constructor & Destructor Documentation

◆ QgsScopedQPainterState()

QgsScopedQPainterState::QgsScopedQPainterState ( QPainter *  painter)
inline

Constructor for QgsScopedQPainterState.

Saves the specified painter state.

Definition at line 1403 of file qgsrendercontext.h.

◆ ~QgsScopedQPainterState()

QgsScopedQPainterState::~QgsScopedQPainterState ( )
inline

Restores the painter back to its original state.

Definition at line 1412 of file qgsrendercontext.h.


The documentation for this class was generated from the following file: