22 , mFlags( FlagAntialiasing | FlagUseAdvancedEffects )
30 if (
flags == mFlags )
39 Flags newFlags = mFlags;
45 if ( newFlags == mFlags )
59 return mFlags.testFlag( flag );
64 QgsRenderContext::Flags
flags = QgsRenderContext::Flags();
88 return mMeasurementConverter.
dpi();
98 mGridVisible = visible;
103 return mBoundingBoxesVisible;
108 mBoundingBoxesVisible = visible;
113 mPagesVisible = visible;
118 return mExportThemes;
128 if ( scales == mPredefinedScales )
131 mPredefinedScales = scales;
133 std::sort( mPredefinedScales.begin(), mPredefinedScales.end() );
139 return mFeatureFilterProvider;
Abstract interface for use by classes that filter the features or attributes of a layer.
double dpi() const
Returns the Dots per inch (DPI) of the measurement converter.
void setDpi(const double dpi)
Sets the dots per inch (dpi) for the measurement converter.
void setDpi(double dpi)
Sets the dpi for outputting the layout.
void dpiChanged()
Emitted when the context's DPI is changed.
QgsRenderContext::Flags renderContextFlags() const
Returns the combination of render context flags matched to the layout context's settings.
void setGridVisible(bool visible)
Sets whether the page grid should be visible.
void predefinedScalesChanged()
Emitted when the list of predefined scales changes.
void setFeatureFilterProvider(QgsFeatureFilterProvider *featureFilterProvider)
Sets feature filter provider to featureFilterProvider.
bool boundingBoxesVisible() const
Returns true if the item bounding boxes should be drawn.
QgsLayoutRenderContext::Flags flags() const
Returns the current combination of flags used for rendering the layout.
bool gridVisible() const
Returns true if the page grid should be drawn.
QStringList exportThemes() const
Returns a list of map themes to use during the export.
QgsFeatureFilterProvider * featureFilterProvider() const
Returns the possibly NULL feature filter provider.
void flagsChanged(QgsLayoutRenderContext::Flags flags)
Emitted whenever the context's flags change.
void setFlag(QgsLayoutRenderContext::Flag flag, bool on=true)
Enables or disables a particular rendering flag for the layout.
QgsLayoutRenderContext(QgsLayout *layout)
Constructor for QgsLayoutRenderContext.
double dpi() const
Returns the dpi for outputting the layout.
Flag
Flags for controlling how a layout is rendered.
@ FlagUseAdvancedEffects
Enable advanced effects such as blend modes.
@ FlagLosslessImageRendering
Render images losslessly whenever possible, instead of the default lossy jpeg rendering used for some...
@ FlagAntialiasing
Use antialiasing when drawing items.
void setPredefinedScales(const QVector< qreal > &scales)
Sets the list of predefined scales to use with the layout.
void setFlags(QgsLayoutRenderContext::Flags flags)
Sets the combination of flags that will be used for rendering the layout.
void setExportThemes(const QStringList &themes)
Sets a list of map themes to use during the export.
bool testFlag(Flag flag) const
Check whether a particular rendering flag is enabled for the layout.
void setPagesVisible(bool visible)
Sets whether the page items should be visible in the layout.
void setBoundingBoxesVisible(bool visible)
Sets whether the item bounding boxes should be visible.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
@ ForceVectorOutput
Vector graphics should not be cached and drawn as raster images.
@ Antialiasing
Use antialiasing while drawing.
@ UseAdvancedEffects
Enable layer opacity and blending effects.
@ LosslessImageRendering
Render images losslessly whenever possible, instead of the default lossy jpeg rendering used for some...
void setSimplifyHints(SimplifyHints simplifyHints)
Sets the simplification hints of the vector layer managed.
@ NoSimplification
No simplification can be applied.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)