QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
28 #define POINTS_TO_MM 2.83464567
29 #define INCH_TO_MM 25.4
32 : mFlags(
Qgis::RenderContextFlag::DrawEditingInfo |
Qgis::RenderContextFlag::UseAdvancedEffects |
Qgis::RenderContextFlag::DrawSelection |
Qgis::RenderContextFlag::UseRenderingOptimization )
45 , mPainter( rh.mPainter )
46 , mMaskPainter( rh.mMaskPainter )
47 , mCoordTransform( rh.mCoordTransform )
48 , mDistanceArea( rh.mDistanceArea )
49 , mExtent( rh.mExtent )
50 , mOriginalMapExtent( rh.mOriginalMapExtent )
51 , mMapToPixel( rh.mMapToPixel )
52 , mRenderingStopped( rh.mRenderingStopped )
53 , mFeedback( rh.mFeedback )
54 , mScaleFactor( rh.mScaleFactor )
55 , mDpiTarget( rh.mDpiTarget )
56 , mRendererScale( rh.mRendererScale )
57 , mSymbologyReferenceScale( rh.mSymbologyReferenceScale )
58 , mLabelingEngine( rh.mLabelingEngine )
59 , mLabelSink( rh.mLabelSink )
60 , mSelectionColor( rh.mSelectionColor )
61 , mVectorSimplifyMethod( rh.mVectorSimplifyMethod )
62 , mExpressionContext( rh.mExpressionContext )
63 , mGeometry( rh.mGeometry )
64 , mFeatureFilterProvider( rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->clone() : nullptr )
65 , mSegmentationTolerance( rh.mSegmentationTolerance )
66 , mSegmentationToleranceType( rh.mSegmentationToleranceType )
67 , mTransformContext( rh.mTransformContext )
68 , mPathResolver( rh.mPathResolver )
69 , mTextRenderFormat( rh.mTextRenderFormat )
70 , mRenderedFeatureHandlers( rh.mRenderedFeatureHandlers )
71 , mHasRenderedFeatureHandlers( rh.mHasRenderedFeatureHandlers )
72 , mCustomRenderingFlags( rh.mCustomRenderingFlags )
73 , mDisabledSymbolLayers()
74 , mClippingRegions( rh.mClippingRegions )
75 , mFeatureClipGeometry( rh.mFeatureClipGeometry )
76 , mTextureOrigin( rh.mTextureOrigin )
77 , mZRange( rh.mZRange )
79 , mDevicePixelRatio( rh.mDevicePixelRatio )
80 , mImageFormat( rh.mImageFormat )
81 , mRendererUsage( rh.mRendererUsage )
82 , mFrameRate( rh.mFrameRate )
83 , mCurrentFrame( rh.mCurrentFrame )
84 , mSymbolLayerClipPaths( rh.mSymbolLayerClipPaths )
86 , mHasTransformContext( rh.mHasTransformContext )
94 mPainter = rh.mPainter;
95 mMaskPainter = rh.mMaskPainter;
96 mCoordTransform = rh.mCoordTransform;
98 mOriginalMapExtent = rh.mOriginalMapExtent;
99 mMapToPixel = rh.mMapToPixel;
100 mRenderingStopped = rh.mRenderingStopped;
101 mFeedback = rh.mFeedback;
102 mScaleFactor = rh.mScaleFactor;
103 mDpiTarget = rh.mDpiTarget;
104 mRendererScale = rh.mRendererScale;
105 mSymbologyReferenceScale = rh.mSymbologyReferenceScale;
106 mLabelingEngine = rh.mLabelingEngine;
107 mLabelSink = rh.mLabelSink;
108 mSelectionColor = rh.mSelectionColor;
109 mVectorSimplifyMethod = rh.mVectorSimplifyMethod;
110 mExpressionContext = rh.mExpressionContext;
111 mGeometry = rh.mGeometry;
112 mFeatureFilterProvider.reset( rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->clone() :
nullptr );
113 mSegmentationTolerance = rh.mSegmentationTolerance;
114 mSegmentationToleranceType = rh.mSegmentationToleranceType;
115 mDistanceArea = rh.mDistanceArea;
116 mTransformContext = rh.mTransformContext;
117 mPathResolver = rh.mPathResolver;
118 mTextRenderFormat = rh.mTextRenderFormat;
119 mRenderedFeatureHandlers = rh.mRenderedFeatureHandlers;
120 mHasRenderedFeatureHandlers = rh.mHasRenderedFeatureHandlers;
121 mCustomRenderingFlags = rh.mCustomRenderingFlags;
122 mClippingRegions = rh.mClippingRegions;
123 mFeatureClipGeometry = rh.mFeatureClipGeometry;
124 mTextureOrigin = rh.mTextureOrigin;
125 mZRange = rh.mZRange;
127 mDevicePixelRatio = rh.mDevicePixelRatio;
128 mImageFormat = rh.mImageFormat;
130 mRendererUsage = rh.mRendererUsage;
131 mFrameRate = rh.mFrameRate;
132 mCurrentFrame = rh.mCurrentFrame;
133 mSymbolLayerClipPaths = rh.mSymbolLayerClipPaths;
137 mHasTransformContext = rh.mHasTransformContext;
158 if (
painter &&
painter->renderHints() & QPainter::SmoothPixmapTransform )
161 #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
162 if (
painter &&
painter->renderHints() & QPainter::LosslessImageRendering )
178 #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
187 if ( !mHasTransformContext )
188 QgsDebugMsgLevel( QStringLiteral(
"No QgsCoordinateTransformContext context set for transform" ), 4 );
190 return mTransformContext;
195 mTransformContext = context;
197 mHasTransformContext =
true;
221 mFlags &= ~(
static_cast< int >( flag ) );
231 return mFlags.testFlag( flag );
289 ctx.mFrameRate = mapSettings.
frameRate();
354 mFeatureFilterProvider.reset( ffp->
clone() );
358 mFeatureFilterProvider.reset(
nullptr );
364 return mFeatureFilterProvider.get();
369 double conversionFactor = 1.0;
370 bool isMapUnitHack =
false;
374 conversionFactor = mScaleFactor;
400 conversionFactor = 1.0 / mup;
404 conversionFactor = 1.0;
411 isMapUnitHack =
true;
417 conversionFactor = 1.0;
423 conversionFactor = 1.0;
427 double convertedSize = size * conversionFactor;
433 convertedSize = std::max( convertedSize, scale.
minSizeMM * mScaleFactor );
435 convertedSize = std::min( convertedSize, scale.
maxSizeMM * mScaleFactor );
441 convertedSize = std::clamp( convertedSize, 10.0, 100.0 );
445 const double symbologyReferenceScaleFactor = mSymbologyReferenceScale > 0 ? mSymbologyReferenceScale / mRendererScale : 1;
446 convertedSize *= symbologyReferenceScaleFactor;
459 convertedSize = std::min( convertedSize, 100.0 );
463 convertedSize = std::min<double>( convertedSize, 30 );
467 convertedSize = std::min<double>( convertedSize, 50 );
472 return convertedSize;
479 const double symbologyReferenceScaleFactor = mSymbologyReferenceScale > 0 ? mSymbologyReferenceScale / mRendererScale : 1;
492 double minSizeMU = std::numeric_limits<double>::lowest();
495 minSizeMU = scale.
minSizeMM * mScaleFactor * mup;
499 minSizeMU = std::max( minSizeMU, size * ( mRendererScale / scale.
minScale ) );
501 size = std::max( size, minSizeMU );
503 double maxSizeMU = std::numeric_limits<double>::max();
506 maxSizeMU = scale.
maxSizeMM * mScaleFactor * mup;
510 maxSizeMU = std::min( maxSizeMU, size * ( mRendererScale / scale.
maxScale ) );
512 size = std::min( size, maxSizeMU );
518 return size * mScaleFactor * mup / symbologyReferenceScaleFactor;
522 return size * mScaleFactor * mup /
POINTS_TO_MM / symbologyReferenceScaleFactor;
526 return size * mScaleFactor * mup *
INCH_TO_MM / symbologyReferenceScaleFactor;
530 return size * mup / symbologyReferenceScaleFactor;
544 const double symbologyReferenceScaleFactor = mSymbologyReferenceScale > 0 ? mSymbologyReferenceScale / mRendererScale : 1;
546 switch ( outputUnit )
554 return sizeInMapUnits;
558 return sizeInMapUnits / ( mScaleFactor * mup ) * symbologyReferenceScaleFactor;
562 return sizeInMapUnits / ( mScaleFactor * mup /
POINTS_TO_MM ) * symbologyReferenceScaleFactor;
566 return sizeInMapUnits / ( mScaleFactor * mup *
INCH_TO_MM ) * symbologyReferenceScaleFactor;
570 return sizeInMapUnits / mup * symbologyReferenceScaleFactor;
601 pointCenter = mCoordTransform.
transform( pointCenter );
604 const int multiplier = meters < 0 ? -1 : 1;
622 return mRenderedFeatureHandlers;
627 return mClippingRegions;
632 return mFeatureClipGeometry;
642 return mTextureOrigin;
647 mTextureOrigin = origin;
672 return mDevicePixelRatio;
677 mDevicePixelRatio = ratio;
697 return mCurrentFrame;
702 mCurrentFrame = frame;
707 mSymbolLayerClipPaths[ symbolLayer ].append( path );
712 return mSymbolLayerClipPaths[ symbolLayer ];
QList< QgsRenderedFeatureHandlerInterface * > renderedFeatureHandlers() const
Returns the list of rendered feature handlers to use while rendering map layers.
void setImageFormat(QImage::Format format)
Sets QImage format which should be used for QImages created during rendering.
void setCurrentFrame(long long frame)
Sets the current frame of the map, for maps which are part of an animation.
@ RenderPartialOutput
Whether to make extra effort to update map image with partially rendered layers (better for interacti...
QSize deviceOutputSize() const
Returns the device output size of the render.
@ NoSimplification
No simplification can be applied.
@ RenderSymbolPreview
The render is for a symbol preview only and map based properties may not be available,...
void setFlags(Qgis::RenderContextFlags flags)
Set combination of flags that will be used for rendering.
void setPainterFlagsUsingContext(QPainter *painter=nullptr) const
Sets relevant flags on a destination painter, using the flags and settings currently defined for the ...
@ HighQualityImageTransforms
Enable high quality image transformations, which results in better appearance of scaled or rotated ra...
@ UseRenderingOptimization
Enable vector simplification and other rendering optimizations.
void setDpiTarget(double dpi)
Sets the targeted dpi for rendering.
Contains information about the context in which a coordinate transform is executed.
void setFrameRate(double rate)
Sets the frame rate of the map (in frames per second), for maps which are part of an animation.
@ SkipSymbolRendering
Disable symbol rendering while still drawing labels if enabled (since QGIS 3.24)
RenderUnit
Rendering size units.
QgsGeometry featureClipGeometry() const
Returns the geometry to use to clip features at render time.
double mapUnitsPerPixel() const
Returns the current map units per pixel.
void setDevicePixelRatio(float ratio)
Sets the device pixel ratio.
QSize outputSize() const
Returns the size of the resulting map image, in pixels.
@ ForceVectorOutput
Vector graphics should not be cached and drawn as raster images.
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
@ DrawEditingInfo
Enable drawing of vertex markers for layers in editing mode.
double extentBuffer() const
Returns the buffer in map units to use around the visible extent for rendering symbols whose correspo...
void setFeatureClipGeometry(const QgsGeometry &geometry)
Sets a geometry to use to clip features at render time.
@ DistanceUnknownUnit
Unknown distance unit.
#define QgsDebugMsgLevel(str, level)
void setSegmentationTolerance(double tolerance)
Sets the segmentation tolerance applied when rendering curved geometries.
@ UseAdvancedEffects
Enable layer opacity and blending effects.
bool drawEditingInformation() const
Returns true if edit markers should be drawn during the render operation.
bool isTemporal() const
Returns true if the object's temporal range is enabled, and the object will be filtered when renderin...
double dpiTarget() const
Returns the target DPI (dots per inch) to be taken into consideration when rendering.
float devicePixelRatio() const
Returns the device pixel ratio.
QgsPointXY center() const SIP_HOLDGIL
Returns the center point of the rectangle.
@ RenderMapTile
Draw map such that there are no problems between adjacent tiles.
bool showSelection() const
Returns true if vector selections should be shown in the rendered map.
void setIsTemporal(bool enabled)
Sets whether the temporal range is enabled (i.e.
void setPainter(QPainter *p)
Sets the destination QPainter for the render operation.
@ RenderPoints
Points (e.g., for font sizes)
void setShowSelection(bool showSelection)
Sets whether vector selections should be shown in the rendered map.
void setZRange(const QgsDoubleRange &range)
Sets the range of z-values which should be rendered.
@ ShadowOffset
Shadow offset.
QString ellipsoid() const
Returns ellipsoid's acronym.
bool testFlag(Qgis::RenderContextFlag flag) const
Check whether a particular flag is enabled.
Qgis::RenderContextFlags flags() const
Returns combination of flags used for rendering.
void addSymbolLayerClipPath(const QgsSymbolLayer *symbolLayer, QPainterPath path)
Add a clip path to be applied to the symbolLayer before rendering.
@ RenderPercentage
Percentage of another measurement (e.g., canvas size, feature size)
double convertToMapUnits(double size, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &scale=QgsMapUnitScale()) const
Converts a size from the specified units to map units.
const QgsDateTimeRange & temporalRange() const
Returns the datetime range for the object.
@ DrawSymbolBounds
Draw bounds of symbols (for debugging/testing)
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
QgsCoordinateReferenceSystem sourceCrs() const
Returns the source spatial reference system.
Contains information about the context of a rendering operation.
@ RenderMillimeters
Millimeters.
double minSizeMM
The minimum size in millimeters, or 0.0 if unset.
RenderSubcomponentProperty
Rendering subcomponent properties.
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
QVariantMap customRenderingFlags() const
Returns any custom rendering flags.
void setSimplifyHints(SimplifyHints simplifyHints)
Sets the simplification hints of the vector layer managed.
long long currentFrame() const
Returns the current frame number of the map (in frames per second), for maps which are part of an ani...
const QgsRectangle & extent() const
When rendering a map layer, calling this method returns the "clipping" extent for the layer (in the l...
double frameRate() const
Returns the frame rate of the map (in frames per second), for maps which are part of an animation.
@ UseRenderingOptimization
Enable vector simplification and other rendering optimizations.
@ DistanceKilometers
Kilometers.
double frameRate() const
Returns the frame rate of the map, for maps which are part of an animation.
void setSegmentationToleranceType(QgsAbstractGeometry::SegmentationToleranceType type)
Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
A rectangle specified with double values.
double measureLineProjected(const QgsPointXY &p1, double distance=1, double azimuth=M_PI_2, QgsPointXY *projectedPoint=nullptr) const
Calculates the distance from one point with distance in meters and azimuth (direction) When the sourc...
@ Antialiasing
Enable anti-aliasing for map rendering.
@ RenderPreviewJob
Render is a 'canvas preview' render, and shortcuts should be taken to ensure fast rendering.
static Q_INVOKABLE double fromUnitToUnitFactor(QgsUnitTypes::DistanceUnit fromUnit, QgsUnitTypes::DistanceUnit toUnit)
Returns the conversion factor between the specified distance units.
Qgis::RendererUsage rendererUsage() const
Returns the rendering usage.
bool setEllipsoid(const QString &ellipsoid)
Sets the ellipsoid by its acronym.
@ DrawEditingInfo
Enable drawing of vertex markers for layers in editing mode.
bool useAdvancedEffects() const
Returns true if advanced effects such as blend modes such be used.
bool forceVectorOutput() const
Returns true if rendering operations should use vector operations instead of any faster raster shortc...
QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType() const
Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
bool testFlag(Qgis::MapSettingsFlag flag) const
Check whether a particular flag is enabled.
@ DistanceDegrees
Degrees, for planar geographic CRS distance measurements.
@ RenderPreviewJob
Render is a 'canvas preview' render, and shortcuts should be taken to ensure fast rendering.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
const QgsFeatureFilterProvider * featureFilterProvider() const
Gets the filter feature provider used for additional filtering of rendered features.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
void setExtent(const QgsRectangle &extent)
When rendering a map layer, calling this method sets the "clipping" extent for the layer (in the laye...
void setFlag(Qgis::RenderContextFlag flag, bool on=true)
Enable or disable a particular flag (other flags are not affected)
void setCoordinateTransform(const QgsCoordinateTransform &t)
Sets the current coordinate transform for the context.
void setVectorSimplifyMethod(const QgsVectorSimplifyMethod &simplifyMethod)
Sets the simplification setting to use when rendering vector layers.
void setRenderingStopped(bool stopped)
Sets whether the rendering operation has been stopped and any ongoing rendering should be canceled im...
@ DrawSymbolBounds
Draw bounds of symbols (for debugging/testing)
QgsDoubleRange zRange() const
Returns the range of z-values which will be visible in the map.
QSize outputSize() const
Returns the size of the resulting rendered image, in pixels.
~QgsRenderContext() override
void setMapToPixel(const QgsMapToPixel &mtp)
Sets the context's map to pixel transform, which transforms between map coordinates and device coordi...
@ DistanceFeet
Imperial feet.
@ ForceVectorOutput
Vector graphics should not be cached and drawn as raster images.
void setFeatureFilterProvider(const QgsFeatureFilterProvider *ffp)
Set a filter feature provider used for additional filtering of rendered features.
QgsRenderContext & operator=(const QgsRenderContext &rh)
@ SkipSymbolRendering
Disable symbol rendering while still drawing labels if enabled (since QGIS 3.24)
double scale() const
Returns the calculated map scale.
void setFeedback(QgsFeedback *feedback)
Attach a feedback object that can be queried regularly during rendering to check if rendering should ...
Struct for storing maximum and minimum scales for measurements in map units.
QList< QPainterPath > symbolLayerClipPaths(const QgsSymbolLayer *symbolLayer) const
Returns clip paths to be applied to the symbolLayer before rendering.
@ Render3DMap
Render is for a 3D map.
@ RenderPartialOutput
Whether to make extra effort to update map image with partially rendered layers (better for interacti...
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.
RenderContextFlag
Flags which affect rendering operations.
const QgsExpressionContext & expressionContext() const
Gets the expression context.
@ HighQualityImageTransforms
Enable high quality image transformations, which results in better appearance of scaled or rotated ra...
@ RenderBlocking
Render and load remote sources in the same thread to ensure rendering remote sources (svg and images)...
QColor selectionColor() const
Returns the color that is used for drawing of selected vector features.
void setSelectionColor(const QColor &color)
Sets the color to use when rendering selected features.
Qgis::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
double segmentationTolerance() const
Gets the segmentation tolerance applied when rendering curved geometries.
void setRendererScale(double scale)
Sets the renderer map scale.
QgsDoubleRange zRange() const
Returns the range of z-values which should be rendered.
void setUseRenderingOptimization(bool enabled)
Sets whether the rendering optimization (geometry simplification) should be executed.
A class to represent a 2D point.
double convertToPainterUnits(double size, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &scale=QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property=Qgis::RenderSubcomponentProperty::Generic) const
Converts a size from the specified units to painter units (pixels).
void setForceVectorOutput(bool force)
Sets whether rendering operations should use vector operations instead of any faster raster shortcuts...
QgsCoordinateReferenceSystem destinationCrs() const
Returns the destination coordinate reference system for the map render.
void setTransformContext(const QgsCoordinateTransformContext &context)
Sets the context's coordinate transform context, which stores various information regarding which dat...
@ Antialiasing
Use antialiasing while drawing.
@ RenderBlocking
Render and load remote sources in the same thread to ensure rendering remote sources (svg and images)...
QPointF textureOrigin() const
Returns the texture origin, which should be used as a brush transform when rendering using QBrush obj...
QgsFeedback * feedback() const
Returns the feedback object that can be queried regularly during rendering to check if rendering shou...
QgsRange which stores a range of double values.
bool maxSizeMMEnabled
Whether the maximum size in mm should be respected.
QgsUnitTypes::DistanceUnit mapUnits
const QgsAbstractGeometry * geometry() const
Returns pointer to the unsegmentized geometry.
void setDrawEditingInformation(bool b)
Sets whether edit markers should be drawn during the render operation.
A geometry is the spatial representation of a feature.
@ DistanceMillimeters
Millimeters.
double maxSizeMM
The maximum size in millimeters, or 0.0 if unset.
@ DistanceCentimeters
Centimeters.
QgsCoordinateTransformContext transformContext() const
Returns the context's coordinate transform context, which stores various information regarding which ...
virtual QgsFeatureFilterProvider * clone() const =0
Create a clone of the feature filter provider.
@ DrawSelection
Whether vector selections should be shown in the rendered map.
static QgsRenderContext fromQPainter(QPainter *painter)
Creates a default render context given a pixel based QPainter destination.
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
double computeMapUnitsPerPixel(const QgsRenderContext &c) const
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the ...
@ DrawSelection
Whether vector selections should be shown in the rendered map.
@ RenderMetersInMapUnits
Meters value as Map units.
@ RenderUnknownUnit
Mixed or unknown units.
@ DistanceYards
Imperial yards.
QList< QgsRenderedFeatureHandlerInterface * > renderedFeatureHandlers() const
Returns the list of rendered feature handlers to use while rendering the map settings.
Abstract interface for use by classes that filter the features or attributes of a layer.
QList< QgsMapClippingRegion > clippingRegions() const
Returns the list of clipping regions to apply during the render.
double convertMetersToMapUnits(double meters) const
Convert meter distances to active MapUnit values for QgsUnitTypes::RenderMetersInMapUnits.
@ DistanceMiles
Terrestrial miles.
void setTemporalRange(const QgsDateTimeRange &range)
Sets the temporal range for the object.
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.
The Qgis class provides global constants for use throughout the application.
QString ellipsoidAcronym() const
Returns the ellipsoid acronym for the ellipsoid used by the CRS.
@ DistanceNauticalMiles
Nautical miles.
QList< QgsMapClippingRegion > clippingRegions() const
Returns the list of clipping regions to apply to the map.
void setUseAdvancedEffects(bool enabled)
Used to enable or disable advanced effects such as blend modes.
@ Render3DMap
Render is for a 3D map.
void grow(double delta)
Grows the rectangle in place by the specified amount.
double minScale
The minimum scale, or 0.0 if unset.
void setTextRenderFormat(Qgis::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
double outputDpi() const
Returns the DPI (dots per inch) used for conversion between real world units (e.g.
void setOutputSize(QSize size)
Sets the size of the resulting rendered image, in pixels.
QPainter * painter()
Returns the destination QPainter for the render operation.
double maxScale
The maximum scale, or 0.0 if unset.
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
QgsRectangle visibleExtent() const
Returns the actual extent derived from requested extent that takes output image size into account.
@ GlowSpread
Glow spread size.
bool minSizeMMEnabled
Whether the minimum size in mm should be respected.
long long currentFrame() const
Returns the current frame number of the map, for maps which are part of an animation.
void setTextureOrigin(const QPointF &origin)
Sets the texture origin, which should be used as a brush transform when rendering using QBrush object...
@ UseAdvancedEffects
Enable layer opacity and blending effects.
bool useRenderingOptimization() const
Returns true if the rendering optimization (geometry simplification) can be executed.
const QgsMapToPixel & mapToPixel() const
@ RenderMapUnits
Map units.
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
Base class for objects with an associated (optional) temporal range.
bool isValid() const
Returns true if the object is valid (i.e.
void setScaleFactor(double factor)
Sets the scaling factor for the render to convert painter units to physical sizes.
@ LosslessImageRendering
Render images losslessly whenever possible, instead of the default lossy jpeg rendering used for some...
@ LosslessImageRendering
Render images losslessly whenever possible, instead of the default lossy jpeg rendering used for some...
double convertFromMapUnits(double sizeInMapUnits, QgsUnitTypes::RenderUnit outputUnit) const
Converts a size from map units to the specified units.
void setMapExtent(const QgsRectangle &extent)
Sets the original extent of the map being rendered.
float devicePixelRatio() const
Returns the device pixel ratio.
@ Generic
Generic subcomponent property.
@ RenderMapTile
Draw map such that there are no problems between adjacent tiles.