QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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
133 QPainter *previewRenderPainter() {return mPreviewRenderPainter;}
134
135#ifndef SIP_RUN
136
145 const QPainter *previewRenderPainter() const { return mPreviewRenderPainter; }
146#endif
147
157 void setPainterFlagsUsingContext( QPainter *painter = nullptr ) const;
158
168 QPainter *maskPainter( int id = 0 ) { return mMaskPainter.value( id, nullptr ); }
169
170 // TODO QGIS 4 : remove the V2 from method name
171
182 Q_DECL_DEPRECATED void setDisabledSymbolLayers( const QSet<const QgsSymbolLayer *> &symbolLayers ) SIP_DEPRECATED;
183
193 void setDisabledSymbolLayersV2( const QSet<QString> &symbolLayers );
194
205 Q_DECL_DEPRECATED QSet<const QgsSymbolLayer *> disabledSymbolLayers() const SIP_DEPRECATED;
206
216 QSet<QString> disabledSymbolLayersV2() const;
217
227 bool isSymbolLayerEnabled( const QgsSymbolLayer *layer ) const;
228
239 QgsCoordinateTransform coordinateTransform() const {return mCoordTransform;}
240
245 const QgsDistanceArea &distanceArea() const { return mDistanceArea; }
246
255 QgsCoordinateTransformContext transformContext() const;
256
265 void setTransformContext( const QgsCoordinateTransformContext &context );
266
274 const QgsPathResolver &pathResolver() const { return mPathResolver; }
275
283 void setPathResolver( const QgsPathResolver &resolver ) { mPathResolver = resolver; }
284
300 const QgsRectangle &extent() const { return mExtent; }
301
312 QgsRectangle mapExtent() const { return mOriginalMapExtent; }
313
319 const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}
320
327 double scaleFactor() const {return mScaleFactor;}
328
335 double dpiTarget() const {return mDpiTarget;}
336
346 bool renderingStopped() const {return mRenderingStopped;}
347
359 void setFeedback( QgsFeedback *feedback );
360
369 QgsFeedback *feedback() const;
370
377 bool forceVectorOutput() const;
378
384 bool useAdvancedEffects() const;
385
391 void setUseAdvancedEffects( bool enabled );
392
398 bool drawEditingInformation() const;
399
405 double rendererScale() const {return mRendererScale;}
406
407
423 double symbologyReferenceScale() const { return mSymbologyReferenceScale; }
424
429 QgsLabelingEngine *labelingEngine() const { return mLabelingEngine; } SIP_SKIP
430
436 QgsLabelSink *labelSink() const { return mLabelSink; } SIP_SKIP
437
443 QColor selectionColor() const { return mSelectionColor; }
444
452 bool showSelection() const;
453
454 //setters
455
466 void setCoordinateTransform( const QgsCoordinateTransform &t );
467
473 void setMapToPixel( const QgsMapToPixel &mtp ) {mMapToPixel = mtp;}
474
487 void setExtent( const QgsRectangle &extent ) {mExtent = extent;}
488
499 void setMapExtent( const QgsRectangle &extent ) { mOriginalMapExtent = extent; }
500
506 void setDrawEditingInformation( bool b );
507
518 void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}
519
525 void setDistanceArea( const QgsDistanceArea &distanceArea ) {mDistanceArea = distanceArea ;}
526
533 void setScaleFactor( double factor ) {mScaleFactor = factor;}
534
541 void setDpiTarget( double dpi ) {mDpiTarget = dpi;}
542
548 void setRendererScale( double scale ) {mRendererScale = scale;}
549
565 void setSymbologyReferenceScale( double scale ) { mSymbologyReferenceScale = scale; }
566
573 void setPainter( QPainter *p ) {mPainter = p;}
574
585 void setPreviewRenderPainter( QPainter *painter ) { mPreviewRenderPainter = painter; }
586
594 void setMaskPainter( QPainter *p, int id = 0 ) { mMaskPainter[id] = p; }
595
602 void setForceVectorOutput( bool force );
603
608 void setLabelingEngine( QgsLabelingEngine *engine ) { mLabelingEngine = engine; } SIP_SKIP
609
616 void setLabelSink( QgsLabelSink *sink ) { mLabelSink = sink; } SIP_SKIP
617
623 void setSelectionColor( const QColor &color ) { mSelectionColor = color; }
624
632 void setShowSelection( bool showSelection );
633
639 bool useRenderingOptimization() const;
640
646 void setUseRenderingOptimization( bool enabled );
647
656 const QgsVectorSimplifyMethod &vectorSimplifyMethod() const { return mVectorSimplifyMethod; }
657
671 void setVectorSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mVectorSimplifyMethod = simplifyMethod; }
672
679 void setExpressionContext( const QgsExpressionContext &context ) { mExpressionContext = context; }
680
687 QgsExpressionContext &expressionContext() { return mExpressionContext; }
688
696 const QgsExpressionContext &expressionContext() const { return mExpressionContext; } SIP_SKIP
697
699 const QgsAbstractGeometry *geometry() const { return mGeometry; }
701 void setGeometry( const QgsAbstractGeometry *geometry ) { mGeometry = geometry; }
702
709 void setFeatureFilterProvider( const QgsFeatureFilterProvider *ffp );
710
717 const QgsFeatureFilterProvider *featureFilterProvider() const;
718
725 void setSegmentationTolerance( double tolerance ) { mSegmentationTolerance = tolerance; }
726
731 double segmentationTolerance() const { return mSegmentationTolerance; }
732
739 void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ) { mSegmentationToleranceType = type; }
740
746
747 // Conversions
748
760 double convertToPainterUnits( double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property = Qgis::RenderSubcomponentProperty::Generic ) const;
761
768 double convertToMapUnits( double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale = QgsMapUnitScale() ) const;
769
775 double convertFromMapUnits( double sizeInMapUnits, Qgis::RenderUnit outputUnit ) const;
776
783 double convertMetersToMapUnits( double meters ) const;
784
792 {
793 return mTextRenderFormat;
794 }
795
803 {
804 mTextRenderFormat = format;
805 }
806
812 QList<QgsRenderedFeatureHandlerInterface *> renderedFeatureHandlers() const;
813
819 bool hasRenderedFeatureHandlers() const { return mHasRenderedFeatureHandlers; }
820
829 void setMaskIdProvider( QgsMaskIdProvider *provider ) { mMaskIdProvider = provider; }
830
836 const QgsMaskIdProvider *maskIdProvider() const { return mMaskIdProvider; }
837
843 void setCurrentMaskId( int id ) { mCurrentMaskId = id; }
844
851 int currentMaskId() const { return mCurrentMaskId; }
852
862 void setIsGuiPreview( bool preview ) { mIsGuiPreview = preview; }
863
874 bool isGuiPreview() const { return mIsGuiPreview; }
875
882 QVariantMap customRenderingFlags() const { return mCustomRenderingFlags; }
883
891 void setCustomRenderingFlag( const QString &flag, const QVariant &value ) { mCustomRenderingFlags[flag] = value; }
892
899 void clearCustomRenderingFlag( const QString &flag ) { mCustomRenderingFlags.remove( flag ); }
900
908 QList< QgsMapClippingRegion > clippingRegions() const;
909
924 QgsGeometry featureClipGeometry() const;
925
935 void setFeatureClipGeometry( const QgsGeometry &geometry );
936
944 QPointF textureOrigin() const;
945
953 void setTextureOrigin( const QPointF &origin );
954
959 void addSymbolLayerClipPath( const QString &symbolLayerId, QPainterPath path );
960
965 QList<QPainterPath> symbolLayerClipPaths( const QString &symbolLayerId ) const;
966
973 QgsDoubleRange zRange() const;
974
981 void setZRange( const QgsDoubleRange &range );
982
991 QSize outputSize() const;
992
999 void setOutputSize( QSize size );
1000
1009 float devicePixelRatio() const;
1010
1019 void setDevicePixelRatio( float ratio );
1020
1032 QSize deviceOutputSize() const;
1033
1041 void setImageFormat( QImage::Format format ) { mImageFormat = format; }
1042
1050 QImage::Format imageFormat() const { return mImageFormat; }
1051
1058 Qgis::RendererUsage rendererUsage() const {return mRendererUsage;}
1059
1069 void setRendererUsage( Qgis::RendererUsage usage ) {mRendererUsage = usage;}
1070
1079 double frameRate() const;
1080
1089 void setFrameRate( double rate );
1090
1099 long long currentFrame() const;
1100
1109 void setCurrentFrame( long long frame );
1110
1111
1118 QgsElevationMap *elevationMap() const;
1119
1128 void setElevationMap( QgsElevationMap *map );
1129
1130 private:
1131
1132 Qgis::RenderContextFlags mFlags;
1133
1135 QPainter *mPainter = nullptr;
1136
1138 QPainter *mPreviewRenderPainter = nullptr;
1139
1146 QMap<int, QPainter *> mMaskPainter;
1147
1153 QgsMaskIdProvider *mMaskIdProvider = nullptr;
1154
1159 int mCurrentMaskId = -1;
1160
1165 bool mIsGuiPreview = false;
1166
1168 QgsCoordinateTransform mCoordTransform;
1169
1175 QgsDistanceArea mDistanceArea;
1176
1177 QgsRectangle mExtent;
1178 QgsRectangle mOriginalMapExtent;
1179
1180 QgsMapToPixel mMapToPixel;
1181
1183 bool mRenderingStopped = false;
1184
1186 QgsFeedback *mFeedback = nullptr;
1187
1189 double mScaleFactor = 1.0;
1190
1192 double mDpiTarget = -1.0;
1193
1195 double mRendererScale = 1.0;
1196
1197 double mSymbologyReferenceScale = -1;
1198
1200 QgsLabelingEngine *mLabelingEngine = nullptr;
1201
1203 QgsLabelSink *mLabelSink = nullptr;
1204
1206 QColor mSelectionColor;
1207
1209 QgsVectorSimplifyMethod mVectorSimplifyMethod;
1210
1212 QgsExpressionContext mExpressionContext;
1213
1215 const QgsAbstractGeometry *mGeometry = nullptr;
1216
1218 std::unique_ptr< QgsFeatureFilterProvider > mFeatureFilterProvider;
1219
1220 double mSegmentationTolerance = M_PI_2 / 90;
1221
1223
1224 QgsCoordinateTransformContext mTransformContext;
1225
1226 QgsPathResolver mPathResolver;
1227
1229 QList< QgsRenderedFeatureHandlerInterface * > mRenderedFeatureHandlers;
1230 bool mHasRenderedFeatureHandlers = false;
1231 QVariantMap mCustomRenderingFlags;
1232
1233 QSet<QString> mDisabledSymbolLayers;
1234
1235 QList< QgsMapClippingRegion > mClippingRegions;
1236 QgsGeometry mFeatureClipGeometry;
1237
1238 QPointF mTextureOrigin;
1239
1240 QgsDoubleRange mZRange;
1241
1242 QSize mSize;
1243 float mDevicePixelRatio = 1.0;
1244 QImage::Format mImageFormat = QImage::Format_ARGB32_Premultiplied;
1245
1247
1248 double mFrameRate = -1;
1249 long long mCurrentFrame = -1;
1250
1252 QMap< QString, QList<QPainterPath> > mSymbolLayerClipPaths;
1253
1254#ifdef QGISDEBUG
1255 bool mHasTransformContext = false;
1256#endif
1257
1258 QgsElevationMap *mElevationMap = nullptr;
1259};
1260
1261#ifndef SIP_RUN
1262
1275{
1276 public:
1277
1284 QgsScopedRenderContextPainterSwap( QgsRenderContext &context, QPainter *temporaryPainter )
1285 : mContext( context )
1286 , mPreviousPainter( context.painter() )
1287 {
1288 mContext.setPainter( temporaryPainter );
1289 }
1290
1294 void reset()
1295 {
1296 if ( !mReleased )
1297 {
1298 mContext.setPainter( mPreviousPainter );
1299 mReleased = true;
1300 }
1301 }
1302
1310
1311 private:
1312
1313 QgsRenderContext &mContext;
1314 QPainter *mPreviousPainter = nullptr;
1315 bool mReleased = false;
1316};
1317
1318
1331{
1332 public:
1333
1342 : mContext( context )
1343 {
1344 if ( mContext.painter() )
1345 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1346 }
1347
1352 {
1353 if ( mContext.painter() )
1354 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1355 }
1356
1357 private:
1358
1359 QgsRenderContext &mContext;
1360};
1361
1362
1375{
1376 public:
1377
1386 : mContext( context )
1387 {
1388 if ( mContext.painter() )
1389 mContext.painter()->scale( 1.0 / mContext.scaleFactor(), 1.0 / mContext.scaleFactor() );
1390 }
1391
1396 {
1397 if ( mContext.painter() )
1398 mContext.painter()->scale( mContext.scaleFactor(), mContext.scaleFactor() );
1399 }
1400
1401 private:
1402
1403 QgsRenderContext &mContext;
1404};
1405
1406
1419{
1420 public:
1421
1427 QgsScopedQPainterState( QPainter *painter )
1428 : mPainter( painter )
1429 {
1430 mPainter->save();
1431 }
1432
1437 {
1438 mPainter->restore();
1439 }
1440
1441 private:
1442
1443 QPainter *mPainter = nullptr;
1444};
1445
1446
1458{
1459 public:
1460
1467 : mContext( &context )
1468 , mOriginalScale( context.symbologyReferenceScale() )
1469 {
1470 mContext->setSymbologyReferenceScale( scale );
1471 }
1472
1477 : mContext( o.mContext )
1478 , mOriginalScale( o.mOriginalScale )
1479 {
1480 o.mContext = nullptr;
1481 }
1482
1487 {
1488 if ( mContext )
1489 mContext->setSymbologyReferenceScale( mOriginalScale );
1490 }
1491
1492 private:
1493
1494 QgsRenderContext *mContext = nullptr;
1495 double mOriginalScale = 0;
1496};
1497
1498
1499#endif
1500
1501#endif
RenderSubcomponentProperty
Rendering subcomponent properties.
Definition qgis.h:2210
@ Generic
Generic subcomponent property.
TextRenderFormat
Flags which control how map layer renderers behave.
Definition qgis.h:2055
@ AlwaysOutlines
Always render text using path objects (AKA outlines/curves). This setting guarantees the best quality...
RenderUnit
Rendering size units.
Definition qgis.h:3627
RenderContextFlag
Flags which affect rendering operations.
Definition qgis.h:2000
RendererUsage
Usage of the renderer.
Definition qgis.h:2548
@ 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.
Abstract base class that can be used to intercept rendered labels from a labeling / rendering job.
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.
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.
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.
const QPainter * previewRenderPainter() const
Returns the const destination QPainter for temporary in-progress preview renders.
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.
void setPreviewRenderPainter(QPainter *painter)
Sets the destination painter for temporary in-progress preview renders.
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).
QPainter * previewRenderPainter()
Returns the const destination QPainter for temporary in-progress preview renders.
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