QGIS API Documentation 3.27.0-Master (95e00c50d2)
Public Member Functions | List of all members
QgsScopedRenderContextPainterSwap Class Reference

Scoped object for temporary replacement of a QgsRenderContext destination painter. More...

#include <qgsrendercontext.h>

Public Member Functions

 QgsScopedRenderContextPainterSwap (QgsRenderContext &context, QPainter *temporaryPainter)
 Constructor for QgsScopedRenderContextPainterSwap. More...
 
 ~QgsScopedRenderContextPainterSwap ()
 Returns the destination painter for the context back to the original QPainter object. More...
 
void reset ()
 Resets the destination painter for the context back to the original QPainter object. More...
 

Detailed Description

Scoped object for temporary replacement of a QgsRenderContext destination painter.

Temporarily swaps out the destination QPainter object for a QgsRenderContext for the lifetime of the object, before replacing it to the original painter on destruction.

Note
Not available in Python bindings
Since
QGIS 3.14

Definition at line 1192 of file qgsrendercontext.h.

Constructor & Destructor Documentation

◆ QgsScopedRenderContextPainterSwap()

QgsScopedRenderContextPainterSwap::QgsScopedRenderContextPainterSwap ( QgsRenderContext context,
QPainter *  temporaryPainter 
)
inline

Constructor for QgsScopedRenderContextPainterSwap.

Swaps the destination painter for context (set QgsRenderContext::setPainter() ) to temporaryPainter.

Definition at line 1202 of file qgsrendercontext.h.

◆ ~QgsScopedRenderContextPainterSwap()

QgsScopedRenderContextPainterSwap::~QgsScopedRenderContextPainterSwap ( )
inline

Returns the destination painter for the context back to the original QPainter object.

Definition at line 1224 of file qgsrendercontext.h.

Member Function Documentation

◆ reset()

void QgsScopedRenderContextPainterSwap::reset ( )
inline

Resets the destination painter for the context back to the original QPainter object.

Definition at line 1212 of file qgsrendercontext.h.


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