QGIS API Documentation 3.27.0-Master (f261cc1f8b)
qgsrendercontext.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrendercontext.h
3 ------------------
4 begin : March 16, 2008
5 copyright : (C) 2008 by Marco Hugentobler
6 email : marco dot hugentobler at karto dot baug dot ethz dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSRENDERCONTEXT_H
19#define QGSRENDERCONTEXT_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include <QColor>
24#include <QPainter>
25#include <QPainterPath>
26#include <memory>
27
31#include "qgslabelsink.h"
32#include "qgsmaptopixel.h"
33#include "qgsmapunitscale.h"
34#include "qgsrectangle.h"
36#include "qgsdistancearea.h"
38#include "qgspathresolver.h"
40
41class QPainter;
44class QgsMapSettings;
46class QgsSymbolLayer;
49
50
59class CORE_EXPORT QgsRenderContext : public QgsTemporalRangeObject
60{
61 public:
64
66 QgsRenderContext &operator=( const QgsRenderContext &rh );
67
72 void setFlags( Qgis::RenderContextFlags flags );
73
78 void setFlag( Qgis::RenderContextFlag flag, bool on = true );
79
84 Qgis::RenderContextFlags flags() const;
85
90 bool testFlag( Qgis::RenderContextFlag flag ) const;
91
96 static QgsRenderContext fromMapSettings( const QgsMapSettings &mapSettings );
97
104 static QgsRenderContext fromQPainter( QPainter *painter );
105
106 //getters
107
112 QPainter *painter() {return mPainter;}
113
114#ifndef SIP_RUN
115
121 const QPainter *painter() const { return mPainter; }
122#endif
123
133 void setPainterFlagsUsingContext( QPainter *painter = nullptr ) const;
134
144 QPainter *maskPainter( int id = 0 ) { return mMaskPainter.value( id, nullptr ); }
145
155 QSet<const QgsSymbolLayer *> disabledSymbolLayers() const { return mDisabledSymbolLayers; }
156
166 bool isSymbolLayerEnabled( const QgsSymbolLayer *layer ) const { return ! mDisabledSymbolLayers.contains( layer ); }
167
178 QgsCoordinateTransform coordinateTransform() const {return mCoordTransform;}
179
184 const QgsDistanceArea &distanceArea() const { return mDistanceArea; }
185
194 QgsCoordinateTransformContext transformContext() const;
195
204 void setTransformContext( const QgsCoordinateTransformContext &context );
205
213 const QgsPathResolver &pathResolver() const { return mPathResolver; }
214
222 void setPathResolver( const QgsPathResolver &resolver ) { mPathResolver = resolver; }
223
239 const QgsRectangle &extent() const { return mExtent; }
240
251 QgsRectangle mapExtent() const { return mOriginalMapExtent; }
252
258 const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}
259
266 double scaleFactor() const {return mScaleFactor;}
267
274 double dpiTarget() const {return mDpiTarget;}
275
285 bool renderingStopped() const {return mRenderingStopped;}
286
298 void setFeedback( QgsFeedback *feedback );
299
308 QgsFeedback *feedback() const;
309
316 bool forceVectorOutput() const;
317
323 bool useAdvancedEffects() const;
324
330 void setUseAdvancedEffects( bool enabled );
331
337 bool drawEditingInformation() const;
338
344 double rendererScale() const {return mRendererScale;}
345
346
362 double symbologyReferenceScale() const { return mSymbologyReferenceScale; }
363
368 QgsLabelingEngine *labelingEngine() const { return mLabelingEngine; } SIP_SKIP
369
375 QgsLabelSink *labelSink() const { return mLabelSink; } SIP_SKIP
376
382 QColor selectionColor() const { return mSelectionColor; }
383
391 bool showSelection() const;
392
393 //setters
394
405 void setCoordinateTransform( const QgsCoordinateTransform &t );
406
412 void setMapToPixel( const QgsMapToPixel &mtp ) {mMapToPixel = mtp;}
413
426 void setExtent( const QgsRectangle &extent ) {mExtent = extent;}
427
438 void setMapExtent( const QgsRectangle &extent ) { mOriginalMapExtent = extent; }
439
445 void setDrawEditingInformation( bool b );
446
457 void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}
458
464 void setDistanceArea( const QgsDistanceArea &distanceArea ) {mDistanceArea = distanceArea ;}
465
472 void setScaleFactor( double factor ) {mScaleFactor = factor;}
473
480 void setDpiTarget( double dpi ) {mDpiTarget = dpi;}
481
487 void setRendererScale( double scale ) {mRendererScale = scale;}
488
504 void setSymbologyReferenceScale( double scale ) { mSymbologyReferenceScale = scale; }
505
512 void setPainter( QPainter *p ) {mPainter = p;}
513
521 void setMaskPainter( QPainter *p, int id = 0 ) { mMaskPainter[id] = p; }
522
532 void setDisabledSymbolLayers( const QSet<const QgsSymbolLayer *> &symbolLayers ) { mDisabledSymbolLayers = symbolLayers; }
533
540 void setForceVectorOutput( bool force );
541
546 void setLabelingEngine( QgsLabelingEngine *engine ) { mLabelingEngine = engine; } SIP_SKIP
547
554 void setLabelSink( QgsLabelSink *sink ) { mLabelSink = sink; } SIP_SKIP
555
561 void setSelectionColor( const QColor &color ) { mSelectionColor = color; }
562
570 void setShowSelection( bool showSelection );
571
577 bool useRenderingOptimization() const;
578
584 void setUseRenderingOptimization( bool enabled );
585
594 const QgsVectorSimplifyMethod &vectorSimplifyMethod() const { return mVectorSimplifyMethod; }
595
609 void setVectorSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mVectorSimplifyMethod = simplifyMethod; }
610
617 void setExpressionContext( const QgsExpressionContext &context ) { mExpressionContext = context; }
618
625 QgsExpressionContext &expressionContext() { return mExpressionContext; }
626
634 const QgsExpressionContext &expressionContext() const { return mExpressionContext; } SIP_SKIP
635
637 const QgsAbstractGeometry *geometry() const { return mGeometry; }
639 void setGeometry( const QgsAbstractGeometry *geometry ) { mGeometry = geometry; }
640
647 void setFeatureFilterProvider( const QgsFeatureFilterProvider *ffp );
648
655 const QgsFeatureFilterProvider *featureFilterProvider() const;
656
663 void setSegmentationTolerance( double tolerance ) { mSegmentationTolerance = tolerance; }
664
669 double segmentationTolerance() const { return mSegmentationTolerance; }
670
677 void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ) { mSegmentationToleranceType = type; }
678
684
685 // Conversions
686
698 double convertToPainterUnits( double size, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property = Qgis::RenderSubcomponentProperty::Generic ) const;
699
706 double convertToMapUnits( double size, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale() ) const;
707
713 double convertFromMapUnits( double sizeInMapUnits, QgsUnitTypes::RenderUnit outputUnit ) const;
714
721 double convertMetersToMapUnits( double meters ) const;
722
730 {
731 return mTextRenderFormat;
732 }
733
741 {
742 mTextRenderFormat = format;
743 }
744
750 QList<QgsRenderedFeatureHandlerInterface *> renderedFeatureHandlers() const;
751
757 bool hasRenderedFeatureHandlers() const { return mHasRenderedFeatureHandlers; }
758
767 void setMaskIdProvider( QgsMaskIdProvider *provider ) { mMaskIdProvider = provider; }
768
774 const QgsMaskIdProvider *maskIdProvider() const { return mMaskIdProvider; }
775
781 void setCurrentMaskId( int id ) { mCurrentMaskId = id; }
782
789 int currentMaskId() const { return mCurrentMaskId; }
790
800 void setIsGuiPreview( bool preview ) { mIsGuiPreview = preview; }
801
812 bool isGuiPreview() const { return mIsGuiPreview; }
813
820 QVariantMap customRenderingFlags() const { return mCustomRenderingFlags; }
821
829 void setCustomRenderingFlag( const QString &flag, const QVariant &value ) { mCustomRenderingFlags[flag] = value; }
830
837 void clearCustomRenderingFlag( const QString &flag ) { mCustomRenderingFlags.remove( flag ); }
838
846 QList< QgsMapClippingRegion > clippingRegions() const;
847
862 QgsGeometry featureClipGeometry() const;
863
873 void setFeatureClipGeometry( const QgsGeometry &geometry );
874
882 QPointF textureOrigin() const;
883
891 void setTextureOrigin( const QPointF &origin );
892
893#ifndef SIP_RUN
894
899 void addSymbolLayerClipPath( const QgsSymbolLayer *symbolLayer, QPainterPath path );
900
905 QList<QPainterPath> symbolLayerClipPaths( const QgsSymbolLayer *symbolLayer ) const;
906
907#endif
908
915 QgsDoubleRange zRange() const;
916
923 void setZRange( const QgsDoubleRange &range );
924
933 QSize outputSize() const;
934
941 void setOutputSize( QSize size );
942
951 float devicePixelRatio() const;
952
961 void setDevicePixelRatio( float ratio );
962
974 QSize deviceOutputSize() const;
975
983 void setImageFormat( QImage::Format format ) { mImageFormat = format; }
984
992 QImage::Format imageFormat() const { return mImageFormat; }
993
1000 Qgis::RendererUsage rendererUsage() const {return mRendererUsage;}
1001
1011 void setRendererUsage( Qgis::RendererUsage usage ) {mRendererUsage = usage;}
1012
1021 double frameRate() const;
1022
1031 void setFrameRate( double rate );
1032
1041 long long currentFrame() const;
1042
1051 void setCurrentFrame( long long frame );
1052
1053 private:
1054
1055 Qgis::RenderContextFlags mFlags;
1056
1058 QPainter *mPainter = nullptr;
1059
1066 QMap<int, QPainter *> mMaskPainter;
1067
1073 QgsMaskIdProvider *mMaskIdProvider = nullptr;
1074
1079 int mCurrentMaskId = -1;
1080
1085 bool mIsGuiPreview = false;
1086
1088 QgsCoordinateTransform mCoordTransform;
1089
1095 QgsDistanceArea mDistanceArea;
1096
1097 QgsRectangle mExtent;
1098 QgsRectangle mOriginalMapExtent;
1099
1100 QgsMapToPixel mMapToPixel;
1101
1103 bool mRenderingStopped = false;
1104
1106 QgsFeedback *mFeedback = nullptr;
1107
1109 double mScaleFactor = 1.0;
1110
1112 double mDpiTarget = -1.0;
1113
1115 double mRendererScale = 1.0;
1116
1117 double mSymbologyReferenceScale = -1;
1118
1120 QgsLabelingEngine *mLabelingEngine = nullptr;
1121
1123 QgsLabelSink *mLabelSink = nullptr;
1124
1126 QColor mSelectionColor;
1127
1129 QgsVectorSimplifyMethod mVectorSimplifyMethod;
1130
1132 QgsExpressionContext mExpressionContext;
1133
1135 const QgsAbstractGeometry *mGeometry = nullptr;
1136
1138 std::unique_ptr< QgsFeatureFilterProvider > mFeatureFilterProvider;
1139
1140 double mSegmentationTolerance = M_PI_2 / 90;
1141
1143
1144 QgsCoordinateTransformContext mTransformContext;
1145
1146 QgsPathResolver mPathResolver;
1147
1148 Qgis::TextRenderFormat mTextRenderFormat = Qgis::TextRenderFormat::AlwaysOutlines;
1149 QList< QgsRenderedFeatureHandlerInterface * > mRenderedFeatureHandlers;
1150 bool mHasRenderedFeatureHandlers = false;
1151 QVariantMap mCustomRenderingFlags;
1152
1153 QSet<const QgsSymbolLayer *> mDisabledSymbolLayers;
1154
1155 QList< QgsMapClippingRegion > mClippingRegions;
1156 QgsGeometry mFeatureClipGeometry;
1157
1158 QPointF mTextureOrigin;
1159
1160 QgsDoubleRange mZRange;
1161
1162 QSize mSize;
1163 float mDevicePixelRatio = 1.0;
1164 QImage::Format mImageFormat = QImage::Format_ARGB32_Premultiplied;
1165
1167
1168 double mFrameRate = -1;
1169 long long mCurrentFrame = -1;
1170
1172 QMap< const QgsSymbolLayer *, QList<QPainterPath> > mSymbolLayerClipPaths;
1173
1174#ifdef QGISDEBUG
1175 bool mHasTransformContext = false;
1176#endif
1177};
1178
1179#ifndef SIP_RUN
1180
1193{
1194 public:
1195
1202 QgsScopedRenderContextPainterSwap( QgsRenderContext &context, QPainter *temporaryPainter )
1203 : mContext( context )
1204 , mPreviousPainter( context.painter() )
1205 {
1206 mContext.setPainter( temporaryPainter );
1207 }
1208
1212 void reset()
1213 {
1214 if ( !mReleased )
1215 {
1216 mContext.setPainter( mPreviousPainter );
1217 mReleased = true;
1218 }
1219 }
1220
1225 {
1226 reset();
1227 }
1228
1229 private:
1230
1231 QgsRenderContext &mContext;
1232 QPainter *mPreviousPainter = nullptr;
1233 bool mReleased = false;
1234};
1235
1236
1249{
1250 public:
1251
1260 : mContext( context )
1261 {
1262 if ( mContext.painter() )
1263 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1264 }
1265
1270 {
1271 if ( mContext.painter() )
1272 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1273 }
1274
1275 private:
1276
1277 QgsRenderContext &mContext;
1278};
1279
1280
1293{
1294 public:
1295
1304 : mContext( context )
1305 {
1306 if ( mContext.painter() )
1307 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1308 }
1309
1314 {
1315 if ( mContext.painter() )
1316 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1317 }
1318
1319 private:
1320
1321 QgsRenderContext &mContext;
1322};
1323
1324
1337{
1338 public:
1339
1345 QgsScopedQPainterState( QPainter *painter )
1346 : mPainter( painter )
1347 {
1348 mPainter->save();
1349 }
1350
1355 {
1356 mPainter->restore();
1357 }
1358
1359 private:
1360
1361 QPainter *mPainter = nullptr;
1362};
1363
1364
1376{
1377 public:
1378
1385 : mContext( &context )
1386 , mOriginalScale( context.symbologyReferenceScale() )
1387 {
1388 mContext->setSymbologyReferenceScale( scale );
1389 }
1390
1395 : mContext( o.mContext )
1396 , mOriginalScale( o.mOriginalScale )
1397 {
1398 o.mContext = nullptr;
1399 }
1400
1405 {
1406 if ( mContext )
1407 mContext->setSymbologyReferenceScale( mOriginalScale );
1408 }
1409
1410 private:
1411
1412 QgsRenderContext *mContext = nullptr;
1413 double mOriginalScale = 0;
1414};
1415
1416
1417#endif
1418
1419#endif
RenderSubcomponentProperty
Rendering subcomponent properties.
Definition: qgis.h:1396
@ Generic
Generic subcomponent property.
TextRenderFormat
Options for rendering text.
Definition: qgis.h:1384
RenderContextFlag
Flags which affect rendering operations.
Definition: qgis.h:1350
RendererUsage
Usage of the renderer.
Definition: qgis.h:1700
@ Unknown
Renderer used for unknown usage.
Abstract base class for all geometries.
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle.
@ MaximumAngle
Maximum angle between generating radii (lines from arc center to output vertices)
Contains information about the context in which a coordinate transform is executed.
Class for doing transforms between two map coordinate systems.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
QgsRange which stores a range of double values.
Definition: qgsrange.h:203
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract interface for use by classes that filter the features or attributes of a layer.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:125
Abstract base class that can be used to intercept rendered labels from a labeling / rendering job.
Definition: qgslabelsink.h:38
The QgsLabelingEngine class provides map labeling functionality.
A map clipping region (in map coordinates and CRS).
The QgsMapSettings class contains configuration for rendering of the map.
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:39
Struct for storing maximum and minimum scales for measurements in map units.
This class allows the creation of mask ids based on the different label layers and to give a mask id ...
Resolves relative paths into absolute paths and vice versa.
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Contains information about the context of a rendering operation.
const QgsMaskIdProvider * maskIdProvider() const
Returns the mask id provider attached to the context.
void setMapExtent(const QgsRectangle &extent)
Sets the original extent of the map being rendered.
double scaleFactor() const
Returns the scaling factor for the render to convert painter units to physical sizes.
void setRenderingStopped(bool stopped)
Sets whether the rendering operation has been stopped and any ongoing rendering should be canceled im...
void setDistanceArea(const QgsDistanceArea &distanceArea)
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Qgis::RendererUsage rendererUsage() const
Returns the renderer usage.
void setScaleFactor(double factor)
Sets the scaling factor for the render to convert painter units to physical sizes.
bool hasRenderedFeatureHandlers() const
Returns true if the context has any rendered feature handlers.
void setImageFormat(QImage::Format format)
Sets QImage format which should be used for QImages created during rendering.
void setSegmentationToleranceType(QgsAbstractGeometry::SegmentationToleranceType type)
Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
double symbologyReferenceScale() const
Returns the symbology reference scale.
double segmentationTolerance() const
Gets the segmentation tolerance applied when rendering curved geometries.
const QPainter * painter() const
Returns the const destination QPainter for the render operation.
void clearCustomRenderingFlag(const QString &flag)
Clears the specified custom rendering flag.
const QgsDistanceArea & distanceArea() const
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
QPainter * painter()
Returns the destination QPainter for the render operation.
double rendererScale() const
Returns the renderer map scale.
QgsExpressionContext & expressionContext()
Gets the expression context.
void setTextRenderFormat(Qgis::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
void setGeometry(const QgsAbstractGeometry *geometry)
Sets pointer to original (unsegmentized) geometry.
void setVectorSimplifyMethod(const QgsVectorSimplifyMethod &simplifyMethod)
Sets the simplification setting to use when rendering vector layers.
QVariantMap customRenderingFlags() const
Gets custom rendering flags.
QgsLabelSink * labelSink() const
Returns the associated label sink, or nullptr if not set.
bool isGuiPreview() const
Returns the Gui preview mode.
const QgsRectangle & extent() const
When rendering a map layer, calling this method returns the "clipping" extent for the layer (in the l...
void setCurrentMaskId(int id)
Stores a mask id as the "current" one.
void setDisabledSymbolLayers(const QSet< const QgsSymbolLayer * > &symbolLayers)
When rendering a map layer in a second pass (for selective masking), some symbol layers may be disabl...
void setDpiTarget(double dpi)
Sets the targeted dpi for rendering.
~QgsRenderContext() override
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
void setIsGuiPreview(bool preview)
Sets GUI preview mode.
void setLabelSink(QgsLabelSink *sink)
Assigns the label sink which will take over responsibility for handling labels.
const QgsExpressionContext & expressionContext() const
Gets the expression context (const version).
Qgis::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
QgsRectangle mapExtent() const
Returns the original extent of the map being rendered.
void setSymbologyReferenceScale(double scale)
Sets the symbology reference scale.
double dpiTarget() const
Returns the targeted DPI for rendering.
const QgsVectorSimplifyMethod & vectorSimplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
void setMaskIdProvider(QgsMaskIdProvider *provider)
Attaches a mask id provider to the context.
QColor selectionColor() const
Returns the color to use when rendering selected features.
void setExtent(const QgsRectangle &extent)
When rendering a map layer, calling this method sets the "clipping" extent for the layer (in the laye...
QPainter * maskPainter(int id=0)
Returns a mask QPainter for the render operation.
void setMapToPixel(const QgsMapToPixel &mtp)
Sets the context's map to pixel transform, which transforms between map coordinates and device coordi...
QSet< const QgsSymbolLayer * > disabledSymbolLayers() const
When rendering a map layer in a second pass (for selective masking), some symbol layers may be disabl...
int currentMaskId() const
Returns the current mask id, which can be used with maskPainter()
void setCustomRenderingFlag(const QString &flag, const QVariant &value)
Sets a custom rendering flag.
void setPainter(QPainter *p)
Sets the destination QPainter for the render operation.
bool isSymbolLayerEnabled(const QgsSymbolLayer *layer) const
When rendering a map layer in a second pass (for selective masking), some symbol layers may be disabl...
void setMaskPainter(QPainter *p, int id=0)
Sets a mask QPainter for the render operation.
void setLabelingEngine(QgsLabelingEngine *engine)
Assigns the labeling engine.
bool renderingStopped() const
Returns true if the rendering operation has been stopped and any ongoing rendering should be canceled...
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.
void setRendererScale(double scale)
Sets the renderer map scale.
QgsLabelingEngine * labelingEngine() const
Gets access to new labeling engine (may be nullptr).
void setRendererUsage(Qgis::RendererUsage usage)
Sets the renderer usage.
QgsCoordinateTransform coordinateTransform() const
Returns the current coordinate transform for the context.
QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType() const
Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
const QgsAbstractGeometry * geometry() const
Returns pointer to the unsegmentized geometry.
QImage::Format imageFormat() const
Returns the QImage format which should be used for QImages created during rendering.
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
void setSelectionColor(const QColor &color)
Sets the color to use when rendering selected features.
void setSegmentationTolerance(double tolerance)
Sets the segmentation tolerance applied when rendering curved geometries.
An interface for classes which provider custom handlers for features rendered as part of a map render...
Scoped object for saving and restoring a QPainter object's state.
QgsScopedQPainterState(QPainter *painter)
Constructor for QgsScopedQPainterState.
~QgsScopedQPainterState()
Restores the painter back to its original state.
Scoped object for temporary replacement of a QgsRenderContext destination painter.
QgsScopedRenderContextPainterSwap(QgsRenderContext &context, QPainter *temporaryPainter)
Constructor for QgsScopedRenderContextPainterSwap.
~QgsScopedRenderContextPainterSwap()
Returns the destination painter for the context back to the original QPainter object.
void reset()
Resets the destination painter for the context back to the original QPainter object.
Scoped object for temporary override of the symbologyReferenceScale property of a QgsRenderContext.
QgsScopedRenderContextReferenceScaleOverride(QgsScopedRenderContextReferenceScaleOverride &&o) noexcept
Move constructor.
~QgsScopedRenderContextReferenceScaleOverride()
Returns the render context back to the original reference scale.
QgsScopedRenderContextReferenceScaleOverride(QgsRenderContext &context, double scale)
Constructor for QgsScopedRenderContextReferenceScaleOverride.
Scoped object for temporary scaling of a QgsRenderContext for millimeter based rendering.
~QgsScopedRenderContextScaleToMm()
Returns the destination painter back to pixel based units.
QgsScopedRenderContextScaleToMm(QgsRenderContext &context)
Constructor for QgsScopedRenderContextScaleToMm.
Scoped object for temporary scaling of a QgsRenderContext for pixel based rendering.
QgsScopedRenderContextScaleToPixels(QgsRenderContext &context)
Constructor for QgsScopedRenderContextScaleToPixels.
~QgsScopedRenderContextScaleToPixels()
Returns the destination painter back to millimeter based units.
Base class for objects with an associated (optional) temporal range.
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:168
This class contains information how to simplify geometries fetched from a vector layer.
#define SIP_SKIP
Definition: qgis_sip.h:126