QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsScopedRenderContextScaleToPixels Class Reference

Scoped object for temporary scaling of a QgsRenderContext for pixel based rendering. More...

#include <qgsrendercontext.h>

Public Member Functions

 QgsScopedRenderContextScaleToPixels (QgsRenderContext &context)
 Constructor for QgsScopedRenderContextScaleToPixels.
 
 ~QgsScopedRenderContextScaleToPixels ()
 Returns the destination painter back to millimeter based units.
 

Detailed Description

Scoped object for temporary scaling of a QgsRenderContext for pixel based rendering.

Temporarily scales the destination QPainter for a QgsRenderContext to use pixel based units for the lifetime of the object, before returning it to millimeter based units on destruction.

Note
Not available in Python bindings
Since
QGIS 3.14

Definition at line 1455 of file qgsrendercontext.h.

Constructor & Destructor Documentation

◆ QgsScopedRenderContextScaleToPixels()

QgsScopedRenderContextScaleToPixels::QgsScopedRenderContextScaleToPixels ( QgsRenderContext context)
inline

Constructor for QgsScopedRenderContextScaleToPixels.

Rescales the destination painter (see QgsRenderContext::painter() ) to use pixel based units.

Warning
It is the caller's responsibility to ensure that context is initially scaled to use millimeter based units!

Definition at line 1466 of file qgsrendercontext.h.

◆ ~QgsScopedRenderContextScaleToPixels()

QgsScopedRenderContextScaleToPixels::~QgsScopedRenderContextScaleToPixels ( )
inline

Returns the destination painter back to millimeter based units.

Definition at line 1476 of file qgsrendercontext.h.


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