QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsPainterSwapper Class Reference

A class to manage painter saving and restoring required for drawing on a different painter (mask painter for example) More...

#include <qgspainterswapper.h>

Public Member Functions

 QgsPainterSwapper (QgsRenderContext &renderContext, QPainter *newPainter)
 QgsPainterSwapper constructor.
 
 ~QgsPainterSwapper ()
 

Detailed Description

A class to manage painter saving and restoring required for drawing on a different painter (mask painter for example)

Since
QGIS 3.12

Definition at line 34 of file qgspainterswapper.h.

Constructor & Destructor Documentation

◆ QgsPainterSwapper()

QgsPainterSwapper::QgsPainterSwapper ( QgsRenderContext renderContext,
QPainter *  newPainter 
)

QgsPainterSwapper constructor.

The constructor replaces the current painter assigned to renderContext, swapping it for the specified newPainter. Upon QgsPainterSwapper destruction, the painter previously assigned to the render context will automatically be restored.

Definition at line 21 of file qgspainterswapper.cpp.

◆ ~QgsPainterSwapper()

QgsPainterSwapper::~QgsPainterSwapper ( )

Definition at line 28 of file qgspainterswapper.cpp.


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