27 : mFlags( DrawEditingInfo | UseAdvancedEffects | DrawSelection | UseRenderingOptimization )
29 , mCoordTransform( nullptr )
30 , mRenderingStopped( false )
32 , mRasterScaleFactor( 1.0 )
33 , mRendererScale( 1.0 )
34 , mLabelingEngine( nullptr )
35 , mLabelingEngine2( nullptr )
36 , mGeometry( nullptr )
37 , mFeatureFilterProvider( nullptr )
38 , mSegmentationTolerance(
M_PI_2 / 90 )
46 , mPainter( rh.mPainter )
47 , mCoordTransform( rh.mCoordTransform )
48 , mExtent( rh.mExtent )
49 , mMapToPixel( rh.mMapToPixel )
50 , mRenderingStopped( rh.mRenderingStopped )
51 , mScaleFactor( rh.mScaleFactor )
52 , mRasterScaleFactor( rh.mRasterScaleFactor )
53 , mRendererScale( rh.mRendererScale )
54 , mLabelingEngine( rh.mLabelingEngine )
55 , mLabelingEngine2( rh.mLabelingEngine2 )
56 , mSelectionColor( rh.mSelectionColor )
57 , mVectorSimplifyMethod( rh.mVectorSimplifyMethod )
58 , mExpressionContext( rh.mExpressionContext )
59 , mGeometry( rh.mGeometry )
60 , mFeatureFilterProvider( rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->clone() : nullptr )
61 , mSegmentationTolerance( rh.mSegmentationTolerance )
62 , mSegmentationToleranceType( rh.mSegmentationToleranceType )
69 mPainter = rh.mPainter;
70 mCoordTransform = rh.mCoordTransform;
72 mMapToPixel = rh.mMapToPixel;
73 mRenderingStopped = rh.mRenderingStopped;
74 mScaleFactor = rh.mScaleFactor;
75 mRasterScaleFactor = rh.mRasterScaleFactor;
76 mRendererScale = rh.mRendererScale;
77 mLabelingEngine = rh.mLabelingEngine;
78 mLabelingEngine2 = rh.mLabelingEngine2;
79 mSelectionColor = rh.mSelectionColor;
80 mVectorSimplifyMethod = rh.mVectorSimplifyMethod;
81 mExpressionContext = rh.mExpressionContext;
82 mGeometry = rh.mGeometry;
83 mFeatureFilterProvider = rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->
clone() :
nullptr;
84 mSegmentationTolerance = rh.mSegmentationTolerance;
85 mSegmentationToleranceType = rh.mSegmentationToleranceType;
91 delete mFeatureFilterProvider;
92 mFeatureFilterProvider =
nullptr;
115 return mFlags.testFlag( flag );
205 delete mFeatureFilterProvider;
206 mFeatureFilterProvider =
nullptr;
210 mFeatureFilterProvider = ffp->
clone();
void setForceVectorOutput(bool force)
Enable layer transparency and blending effects.
void setRenderingStopped(bool stopped)
Enable vector simplification and other rendering optimizations.
virtual QgsFeatureFilterProvider * clone() const =0
Create a clone of the feature filter provider.
const QgsExpressionContext & expressionContext() const
Gets the expression context.
Use antialiasing while drawing.
void setRendererScale(double scale)
Whether to make extra effort to update map image with partially rendered layers (better for interacti...
Abstract base class for all geometries.
Flags flags() const
Return combination of flags used for rendering.
Enable layer transparency and blending effects.
Whether vector selections should be shown in the rendered map.
void setSimplifyHints(const SimplifyHints &simplifyHints)
Sets the simplification hints of the vector layer managed.
void setExtent(const QgsRectangle &extent)
QgsRectangle visibleExtent() const
Return the actual extent derived from requested extent that takes takes output image size into accoun...
Vector graphics should not be cached and drawn as raster images.
The QgsMapSettings class contains configuration for rendering of the map.
void setCoordinateTransform(const QgsCoordinateTransform *t)
Sets coordinate transformation.
void setSelectionColor(const QColor &color)
No simplification can be applied.
void setUseAdvancedEffects(bool enabled)
Used to enable or disable advanced effects such as blend modes.
void setScaleFactor(double factor)
QgsRenderContext & operator=(const QgsRenderContext &rh)
Whether vector selections should be shown in the rendered map.
double scale() const
Return the calculated scale of the map.
void setDrawEditingInformation(bool b)
Enable anti-aliasing for map rendering.
bool drawEditingInformation() const
Draw bounds of symbols (for debugging/testing)
Abstract interface for use by classes that filter the features of a layer.
const QgsMapToPixel & mapToPixel() const
Draw bounds of symbols (for debugging/testing)
Vector graphics should not be cached and drawn as raster images.
Enable drawing of vertex markers for layers in editing mode.
bool forceVectorOutput() const
void setSegmentationTolerance(double tolerance)
Sets the segmentation tolerance applied when rendering curved geometries.
bool useRenderingOptimization() const
Returns true if the rendering optimization (geometry simplification) can be executed.
Draw map such that there are no problems between adjacent tiles.
double outputDpi() const
Return DPI used for conversion between real world units (e.g.
Contains information about the context of a rendering operation.
double segmentationTolerance() const
Gets the segmentation tolerance applied when rendering curved geometries.
Whether to make extra effort to update map image with partially rendered layers (better for interacti...
QgsAbstractGeometryV2::SegmentationToleranceType segmentationToleranceType() const
Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
static QgsRenderContext fromMapSettings(const QgsMapSettings &mapSettings)
create initialized QgsRenderContext instance from given QgsMapSettings
bool useAdvancedEffects() const
Returns true if advanced effects such as blend modes such be used.
void setMapToPixel(const QgsMapToPixel &mtp)
void setUseRenderingOptimization(bool enabled)
bool showSelection() const
Returns true if vector selections should be shown in the rendered map.
void setFlag(Flag flag, bool on=true)
Enable or disable a particular flag (other flags are not affected)
void setFeatureFilterProvider(const QgsFeatureFilterProvider *ffp)
Set a filter feature provider used for additional filtering of rendered features. ...
void setFlags(const QgsRenderContext::Flags &flags)
Set combination of flags that will be used for rendering.
Enable vector simplification and other rendering optimizations.
void setRasterScaleFactor(double factor)
bool testFlag(Flag flag) const
Check whether a particular flag is enabled.
QColor selectionColor() const
Get color that is used for drawing of selected vector features.
void setShowSelection(const bool showSelection)
Sets whether vector selections should be shown in the rendered map.
bool testFlag(Flag flag) const
Check whether a particular flag is enabled.
Draw map such that there are no problems between adjacent tiles.
Flag
Enumeration of flags that affect rendering operations.
Enable drawing of vertex markers for layers in editing mode.
void setSegmentationToleranceType(QgsAbstractGeometryV2::SegmentationToleranceType type)
Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.