QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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;
49class QgsElevationMap;
50
51
60class CORE_EXPORT QgsRenderContext : public QgsTemporalRangeObject
61{
62 public:
65
67 QgsRenderContext &operator=( const QgsRenderContext &rh );
68
73 void setFlags( Qgis::RenderContextFlags flags );
74
79 void setFlag( Qgis::RenderContextFlag flag, bool on = true );
80
85 Qgis::RenderContextFlags flags() const;
86
91 bool testFlag( Qgis::RenderContextFlag flag ) const;
92
97 static QgsRenderContext fromMapSettings( const QgsMapSettings &mapSettings );
98
105 static QgsRenderContext fromQPainter( QPainter *painter );
106
107 //getters
108
113 QPainter *painter() {return mPainter;}
114
115#ifndef SIP_RUN
116
122 const QPainter *painter() const { return mPainter; }
123#endif
124
134 void setPainterFlagsUsingContext( QPainter *painter = nullptr ) const;
135
145 QPainter *maskPainter( int id = 0 ) { return mMaskPainter.value( id, nullptr ); }
146
147 // TODO QGIS 4 : remove the V2 from method name
148
159 Q_DECL_DEPRECATED void setDisabledSymbolLayers( const QSet<const QgsSymbolLayer *> &symbolLayers ) SIP_DEPRECATED;
160
170 void setDisabledSymbolLayersV2( const QSet<QString> &symbolLayers );
171
182 Q_DECL_DEPRECATED QSet<const QgsSymbolLayer *> disabledSymbolLayers() const SIP_DEPRECATED;
183
193 QSet<QString> disabledSymbolLayersV2() const;
194
204 bool isSymbolLayerEnabled( const QgsSymbolLayer *layer ) const;
205
216 QgsCoordinateTransform coordinateTransform() const {return mCoordTransform;}
217
222 const QgsDistanceArea &distanceArea() const { return mDistanceArea; }
223
232 QgsCoordinateTransformContext transformContext() const;
233
242 void setTransformContext( const QgsCoordinateTransformContext &context );
243
251 const QgsPathResolver &pathResolver() const { return mPathResolver; }
252
260 void setPathResolver( const QgsPathResolver &resolver ) { mPathResolver = resolver; }
261
277 const QgsRectangle &extent() const { return mExtent; }
278
289 QgsRectangle mapExtent() const { return mOriginalMapExtent; }
290
296 const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}
297
304 double scaleFactor() const {return mScaleFactor;}
305
312 double dpiTarget() const {return mDpiTarget;}
313
323 bool renderingStopped() const {return mRenderingStopped;}
324
336 void setFeedback( QgsFeedback *feedback );
337
346 QgsFeedback *feedback() const;
347
354 bool forceVectorOutput() const;
355
361 bool useAdvancedEffects() const;
362
368 void setUseAdvancedEffects( bool enabled );
369
375 bool drawEditingInformation() const;
376
382 double rendererScale() const {return mRendererScale;}
383
384
400 double symbologyReferenceScale() const { return mSymbologyReferenceScale; }
401
406 QgsLabelingEngine *labelingEngine() const { return mLabelingEngine; } SIP_SKIP
407
413 QgsLabelSink *labelSink() const { return mLabelSink; } SIP_SKIP
414
420 QColor selectionColor() const { return mSelectionColor; }
421
429 bool showSelection() const;
430
431 //setters
432
443 void setCoordinateTransform( const QgsCoordinateTransform &t );
444
450 void setMapToPixel( const QgsMapToPixel &mtp ) {mMapToPixel = mtp;}
451
464 void setExtent( const QgsRectangle &extent ) {mExtent = extent;}
465
476 void setMapExtent( const QgsRectangle &extent ) { mOriginalMapExtent = extent; }
477
483 void setDrawEditingInformation( bool b );
484
495 void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}
496
502 void setDistanceArea( const QgsDistanceArea &distanceArea ) {mDistanceArea = distanceArea ;}
503
510 void setScaleFactor( double factor ) {mScaleFactor = factor;}
511
518 void setDpiTarget( double dpi ) {mDpiTarget = dpi;}
519
525 void setRendererScale( double scale ) {mRendererScale = scale;}
526
542 void setSymbologyReferenceScale( double scale ) { mSymbologyReferenceScale = scale; }
543
550 void setPainter( QPainter *p ) {mPainter = p;}
551
559 void setMaskPainter( QPainter *p, int id = 0 ) { mMaskPainter[id] = p; }
560
567 void setForceVectorOutput( bool force );
568
573 void setLabelingEngine( QgsLabelingEngine *engine ) { mLabelingEngine = engine; } SIP_SKIP
574
581 void setLabelSink( QgsLabelSink *sink ) { mLabelSink = sink; } SIP_SKIP
582
588 void setSelectionColor( const QColor &color ) { mSelectionColor = color; }
589
597 void setShowSelection( bool showSelection );
598
604 bool useRenderingOptimization() const;
605
611 void setUseRenderingOptimization( bool enabled );
612
621 const QgsVectorSimplifyMethod &vectorSimplifyMethod() const { return mVectorSimplifyMethod; }
622
636 void setVectorSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mVectorSimplifyMethod = simplifyMethod; }
637
644 void setExpressionContext( const QgsExpressionContext &context ) { mExpressionContext = context; }
645
652 QgsExpressionContext &expressionContext() { return mExpressionContext; }
653
661 const QgsExpressionContext &expressionContext() const { return mExpressionContext; } SIP_SKIP
662
664 const QgsAbstractGeometry *geometry() const { return mGeometry; }
666 void setGeometry( const QgsAbstractGeometry *geometry ) { mGeometry = geometry; }
667
674 void setFeatureFilterProvider( const QgsFeatureFilterProvider *ffp );
675
682 const QgsFeatureFilterProvider *featureFilterProvider() const;
683
690 void setSegmentationTolerance( double tolerance ) { mSegmentationTolerance = tolerance; }
691
696 double segmentationTolerance() const { return mSegmentationTolerance; }
697
704 void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ) { mSegmentationToleranceType = type; }
705
711
712 // Conversions
713
725 double convertToPainterUnits( double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property = Qgis::RenderSubcomponentProperty::Generic ) const;
726
733 double convertToMapUnits( double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale() ) const;
734
740 double convertFromMapUnits( double sizeInMapUnits, Qgis::RenderUnit outputUnit ) const;
741
748 double convertMetersToMapUnits( double meters ) const;
749
757 {
758 return mTextRenderFormat;
759 }
760
768 {
769 mTextRenderFormat = format;
770 }
771
777 QList<QgsRenderedFeatureHandlerInterface *> renderedFeatureHandlers() const;
778
784 bool hasRenderedFeatureHandlers() const { return mHasRenderedFeatureHandlers; }
785
794 void setMaskIdProvider( QgsMaskIdProvider *provider ) { mMaskIdProvider = provider; }
795
801 const QgsMaskIdProvider *maskIdProvider() const { return mMaskIdProvider; }
802
808 void setCurrentMaskId( int id ) { mCurrentMaskId = id; }
809
816 int currentMaskId() const { return mCurrentMaskId; }
817
827 void setIsGuiPreview( bool preview ) { mIsGuiPreview = preview; }
828
839 bool isGuiPreview() const { return mIsGuiPreview; }
840
847 QVariantMap customRenderingFlags() const { return mCustomRenderingFlags; }
848
856 void setCustomRenderingFlag( const QString &flag, const QVariant &value ) { mCustomRenderingFlags[flag] = value; }
857
864 void clearCustomRenderingFlag( const QString &flag ) { mCustomRenderingFlags.remove( flag ); }
865
873 QList< QgsMapClippingRegion > clippingRegions() const;
874
889 QgsGeometry featureClipGeometry() const;
890
900 void setFeatureClipGeometry( const QgsGeometry &geometry );
901
909 QPointF textureOrigin() const;
910
918 void setTextureOrigin( const QPointF &origin );
919
924 void addSymbolLayerClipPath( const QString &symbolLayerId, QPainterPath path );
925
930 QList<QPainterPath> symbolLayerClipPaths( const QString &symbolLayerId ) const;
931
938 QgsDoubleRange zRange() const;
939
946 void setZRange( const QgsDoubleRange &range );
947
956 QSize outputSize() const;
957
964 void setOutputSize( QSize size );
965
974 float devicePixelRatio() const;
975
984 void setDevicePixelRatio( float ratio );
985
997 QSize deviceOutputSize() const;
998
1006 void setImageFormat( QImage::Format format ) { mImageFormat = format; }
1007
1015 QImage::Format imageFormat() const { return mImageFormat; }
1016
1023 Qgis::RendererUsage rendererUsage() const {return mRendererUsage;}
1024
1034 void setRendererUsage( Qgis::RendererUsage usage ) {mRendererUsage = usage;}
1035
1044 double frameRate() const;
1045
1054 void setFrameRate( double rate );
1055
1064 long long currentFrame() const;
1065
1074 void setCurrentFrame( long long frame );
1075
1076
1083 QgsElevationMap *elevationMap() const;
1084
1093 void setElevationMap( QgsElevationMap *map );
1094
1095 private:
1096
1097 Qgis::RenderContextFlags mFlags;
1098
1100 QPainter *mPainter = nullptr;
1101
1108 QMap<int, QPainter *> mMaskPainter;
1109
1115 QgsMaskIdProvider *mMaskIdProvider = nullptr;
1116
1121 int mCurrentMaskId = -1;
1122
1127 bool mIsGuiPreview = false;
1128
1130 QgsCoordinateTransform mCoordTransform;
1131
1137 QgsDistanceArea mDistanceArea;
1138
1139 QgsRectangle mExtent;
1140 QgsRectangle mOriginalMapExtent;
1141
1142 QgsMapToPixel mMapToPixel;
1143
1145 bool mRenderingStopped = false;
1146
1148 QgsFeedback *mFeedback = nullptr;
1149
1151 double mScaleFactor = 1.0;
1152
1154 double mDpiTarget = -1.0;
1155
1157 double mRendererScale = 1.0;
1158
1159 double mSymbologyReferenceScale = -1;
1160
1162 QgsLabelingEngine *mLabelingEngine = nullptr;
1163
1165 QgsLabelSink *mLabelSink = nullptr;
1166
1168 QColor mSelectionColor;
1169
1171 QgsVectorSimplifyMethod mVectorSimplifyMethod;
1172
1174 QgsExpressionContext mExpressionContext;
1175
1177 const QgsAbstractGeometry *mGeometry = nullptr;
1178
1180 std::unique_ptr< QgsFeatureFilterProvider > mFeatureFilterProvider;
1181
1182 double mSegmentationTolerance = M_PI_2 / 90;
1183
1185
1186 QgsCoordinateTransformContext mTransformContext;
1187
1188 QgsPathResolver mPathResolver;
1189
1190 Qgis::TextRenderFormat mTextRenderFormat = Qgis::TextRenderFormat::AlwaysOutlines;
1191 QList< QgsRenderedFeatureHandlerInterface * > mRenderedFeatureHandlers;
1192 bool mHasRenderedFeatureHandlers = false;
1193 QVariantMap mCustomRenderingFlags;
1194
1195 QSet<QString> mDisabledSymbolLayers;
1196
1197 QList< QgsMapClippingRegion > mClippingRegions;
1198 QgsGeometry mFeatureClipGeometry;
1199
1200 QPointF mTextureOrigin;
1201
1202 QgsDoubleRange mZRange;
1203
1204 QSize mSize;
1205 float mDevicePixelRatio = 1.0;
1206 QImage::Format mImageFormat = QImage::Format_ARGB32_Premultiplied;
1207
1209
1210 double mFrameRate = -1;
1211 long long mCurrentFrame = -1;
1212
1214 QMap< QString, QList<QPainterPath> > mSymbolLayerClipPaths;
1215
1216#ifdef QGISDEBUG
1217 bool mHasTransformContext = false;
1218#endif
1219
1220 QgsElevationMap *mElevationMap = nullptr;
1221};
1222
1223#ifndef SIP_RUN
1224
1237{
1238 public:
1239
1246 QgsScopedRenderContextPainterSwap( QgsRenderContext &context, QPainter *temporaryPainter )
1247 : mContext( context )
1248 , mPreviousPainter( context.painter() )
1249 {
1250 mContext.setPainter( temporaryPainter );
1251 }
1252
1256 void reset()
1257 {
1258 if ( !mReleased )
1259 {
1260 mContext.setPainter( mPreviousPainter );
1261 mReleased = true;
1262 }
1263 }
1264
1269 {
1270 reset();
1271 }
1272
1273 private:
1274
1275 QgsRenderContext &mContext;
1276 QPainter *mPreviousPainter = nullptr;
1277 bool mReleased = false;
1278};
1279
1280
1293{
1294 public:
1295
1304 : mContext( context )
1305 {
1306 if ( mContext.painter() )
1307 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1308 }
1309
1314 {
1315 if ( mContext.painter() )
1316 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1317 }
1318
1319 private:
1320
1321 QgsRenderContext &mContext;
1322};
1323
1324
1337{
1338 public:
1339
1348 : mContext( context )
1349 {
1350 if ( mContext.painter() )
1351 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1352 }
1353
1358 {
1359 if ( mContext.painter() )
1360 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1361 }
1362
1363 private:
1364
1365 QgsRenderContext &mContext;
1366};
1367
1368
1381{
1382 public:
1383
1389 QgsScopedQPainterState( QPainter *painter )
1390 : mPainter( painter )
1391 {
1392 mPainter->save();
1393 }
1394
1399 {
1400 mPainter->restore();
1401 }
1402
1403 private:
1404
1405 QPainter *mPainter = nullptr;
1406};
1407
1408
1420{
1421 public:
1422
1429 : mContext( &context )
1430 , mOriginalScale( context.symbologyReferenceScale() )
1431 {
1432 mContext->setSymbologyReferenceScale( scale );
1433 }
1434
1439 : mContext( o.mContext )
1440 , mOriginalScale( o.mOriginalScale )
1441 {
1442 o.mContext = nullptr;
1443 }
1444
1449 {
1450 if ( mContext )
1451 mContext->setSymbologyReferenceScale( mOriginalScale );
1452 }
1453
1454 private:
1455
1456 QgsRenderContext *mContext = nullptr;
1457 double mOriginalScale = 0;
1458};
1459
1460
1461#endif
1462
1463#endif
RenderSubcomponentProperty
Rendering subcomponent properties.
Definition: qgis.h:2040
@ Generic
Generic subcomponent property.
TextRenderFormat
Options for rendering text.
Definition: qgis.h:1885
RenderUnit
Rendering size units.
Definition: qgis.h:3441
RenderContextFlag
Flags which affect rendering operations.
Definition: qgis.h:1851
RendererUsage
Usage of the renderer.
Definition: qgis.h:2378
@ 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
Stores digital elevation model in a raster image which may get updated as a part of map layer renderi...
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:164
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 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...
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.
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.
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.
This class contains information how to simplify geometries fetched from a vector layer.
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
#define SIP_SKIP
Definition: qgis_sip.h:126