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 =
nullptr;
80 mMeasurementConverter.
setDpi( dpi );
86 return mMeasurementConverter.
dpi();
96 mGridVisible = visible;
101 return mBoundingBoxesVisible;
106 mBoundingBoxesVisible = visible;
111 mPagesVisible = visible;
116 return mExportThemes;
126 if ( scales == mPredefinedScales )
129 mPredefinedScales = scales;
131 std::sort( mPredefinedScales.begin(), mPredefinedScales.end() );
void setPredefinedScales(const QVector< qreal > &scales)
Sets the list of predefined scales to use with the layout.
void setDpi(double dpi)
Sets the dpi for outputting the layout.
Enable layer opacity and blending effects.
void setExportThemes(const QStringList &themes)
Sets a list of map themes to use during the export.
void setFlag(QgsLayoutRenderContext::Flag flag, bool on=true)
Enables or disables a particular rendering flag for the layout.
Use antialiasing while drawing.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Flag
Flags for controlling how a layout is rendered.
void setSimplifyHints(SimplifyHints simplifyHints)
Sets the simplification hints of the vector layer managed.
void flagsChanged(QgsLayoutRenderContext::Flags flags)
Emitted whenever the context's flags change.
void setDpi(const double dpi)
Sets the dots per inch (dpi) for the measurement converter.
bool boundingBoxesVisible() const
Returns true if the item bounding boxes should be drawn.
void setGridVisible(bool visible)
Sets whether the page grid should be visible.
void setPagesVisible(bool visible)
Sets whether the page items should be visible in the layout.
void dpiChanged()
Emitted when the context's DPI is changed.
bool gridVisible() const
Returns true if the page grid should be drawn.
No simplification can be applied.
void setBoundingBoxesVisible(bool visible)
Sets whether the item bounding boxes should be visible.
QgsLayoutRenderContext::Flags flags() const
Returns the current combination of flags used for rendering the layout.
double dpi() const
Returns the dpi for outputting the layout.
QgsRenderContext::Flags renderContextFlags() const
Returns the combination of render context flags matched to the layout context's settings.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Vector graphics should not be cached and drawn as raster images.
void predefinedScalesChanged()
Emitted when the list of predefined scales changes.
Use antialiasing when drawing items.
double dpi() const
Returns the Dots per inch (DPI) of the measurement converter.
void setFlags(QgsLayoutRenderContext::Flags flags)
Sets the combination of flags that will be used for rendering the layout.
Enable advanced effects such as blend modes.
bool testFlag(Flag flag) const
Check whether a particular rendering flag is enabled for the layout.
QStringList exportThemes() const
Returns a list of map themes to use during the export.
QgsLayoutRenderContext(QgsLayout *layout)
Constructor for QgsLayoutRenderContext.