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

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

#include <qgsrendercontext.h>

Public Member Functions

 QgsScopedRenderContextScaleToMm (QgsRenderContext &context)
 Constructor for QgsScopedRenderContextScaleToMm. More...
 
 ~QgsScopedRenderContextScaleToMm ()
 Returns the destination painter back to pixel based units. More...
 

Detailed Description

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

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

Note
Not available in Python bindings
Since
QGIS 3.14

Definition at line 1306 of file qgsrendercontext.h.

Constructor & Destructor Documentation

◆ QgsScopedRenderContextScaleToMm()

QgsScopedRenderContextScaleToMm::QgsScopedRenderContextScaleToMm ( QgsRenderContext context)
inline

Constructor for QgsScopedRenderContextScaleToMm.

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

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

Definition at line 1317 of file qgsrendercontext.h.

◆ ~QgsScopedRenderContextScaleToMm()

QgsScopedRenderContextScaleToMm::~QgsScopedRenderContextScaleToMm ( )
inline

Returns the destination painter back to pixel based units.

Definition at line 1327 of file qgsrendercontext.h.


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