Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greatly optimise selective masking vector exports #57799

Merged
merged 13 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions python/PyQt6/core/auto_additions/qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,10 @@
QgsSymbol.DynamicRotation = Qgis.SymbolRenderHint.DynamicRotation
QgsSymbol.DynamicRotation.is_monkey_patched = True
QgsSymbol.DynamicRotation.__doc__ = "Rotation of symbol may be changed during rendering and symbol should not be cached"
Qgis.SymbolRenderHint.__doc__ = "Flags controlling behavior of symbols during rendering\n\n.. versionadded:: 3.20\n\n" + '* ``DynamicRotation``: ' + Qgis.SymbolRenderHint.DynamicRotation.__doc__
QgsSymbol.IsSymbolLayerSubSymbol = Qgis.SymbolRenderHint.IsSymbolLayerSubSymbol
QgsSymbol.IsSymbolLayerSubSymbol.is_monkey_patched = True
QgsSymbol.IsSymbolLayerSubSymbol.__doc__ = "Symbol is being rendered as a sub-symbol of a QgsSymbolLayer (since QGIS 3.38)"
Qgis.SymbolRenderHint.__doc__ = "Flags controlling behavior of symbols during rendering\n\n.. versionadded:: 3.20\n\n" + '* ``DynamicRotation``: ' + Qgis.SymbolRenderHint.DynamicRotation.__doc__ + '\n' + '* ``IsSymbolLayerSubSymbol``: ' + Qgis.SymbolRenderHint.IsSymbolLayerSubSymbol.__doc__
# --
Qgis.SymbolRenderHint.baseClass = Qgis
Qgis.SymbolRenderHints = lambda flags=0: Qgis.SymbolRenderHint(flags)
Expand Down Expand Up @@ -669,7 +672,8 @@
SymbolPreviewFlags = Qgis # dirty hack since SIP seems to introduce the flags in module
# monkey patching scoped based enum
Qgis.SymbolLayerFlag.DisableFeatureClipping.__doc__ = "If present, indicates that features should never be clipped to the map extent during rendering"
Qgis.SymbolLayerFlag.__doc__ = "Flags controlling behavior of symbol layers\n\n.. note::\n\n These differ from Qgis.SymbolLayerUserFlag in that Qgis.SymbolLayerFlag flags are used to reflect the inbuilt properties\n of a symbol layer type, whereas Qgis.SymbolLayerUserFlag are optional, user controlled flags which can be toggled\n for a symbol layer.\n\n.. versionadded:: 3.22\n\n" + '* ``DisableFeatureClipping``: ' + Qgis.SymbolLayerFlag.DisableFeatureClipping.__doc__
Qgis.SymbolLayerFlag.CanCalculateMaskGeometryPerFeature.__doc__ = "If present, indicates that mask geometry can safely be calculated per feature for the symbol layer. This avoids using the entire symbol layer's mask geometry for every feature rendered, considerably simplifying vector exports and resulting in much smaller file sizes. (Since QGIS 3.38)"
Qgis.SymbolLayerFlag.__doc__ = "Flags controlling behavior of symbol layers\n\n.. note::\n\n These differ from Qgis.SymbolLayerUserFlag in that Qgis.SymbolLayerFlag flags are used to reflect the inbuilt properties\n of a symbol layer type, whereas Qgis.SymbolLayerUserFlag are optional, user controlled flags which can be toggled\n for a symbol layer.\n\n.. versionadded:: 3.22\n\n" + '* ``DisableFeatureClipping``: ' + Qgis.SymbolLayerFlag.DisableFeatureClipping.__doc__ + '\n' + '* ``CanCalculateMaskGeometryPerFeature``: ' + Qgis.SymbolLayerFlag.CanCalculateMaskGeometryPerFeature.__doc__
# --
Qgis.SymbolLayerFlag.baseClass = Qgis
Qgis.SymbolLayerFlags = lambda flags=0: Qgis.SymbolLayerFlag(flags)
Expand Down Expand Up @@ -2308,7 +2312,10 @@
QgsMapSettings.RecordProfile = Qgis.MapSettingsFlag.RecordProfile
QgsMapSettings.RecordProfile.is_monkey_patched = True
QgsMapSettings.RecordProfile.__doc__ = "Enable run-time profiling while rendering (since QGIS 3.34)"
Qgis.MapSettingsFlag.__doc__ = "Flags which adjust the way maps are rendered.\n\n.. versionadded:: 3.22\n\n" + '* ``Antialiasing``: ' + Qgis.MapSettingsFlag.Antialiasing.__doc__ + '\n' + '* ``DrawEditingInfo``: ' + Qgis.MapSettingsFlag.DrawEditingInfo.__doc__ + '\n' + '* ``ForceVectorOutput``: ' + Qgis.MapSettingsFlag.ForceVectorOutput.__doc__ + '\n' + '* ``UseAdvancedEffects``: ' + Qgis.MapSettingsFlag.UseAdvancedEffects.__doc__ + '\n' + '* ``DrawLabeling``: ' + Qgis.MapSettingsFlag.DrawLabeling.__doc__ + '\n' + '* ``UseRenderingOptimization``: ' + Qgis.MapSettingsFlag.UseRenderingOptimization.__doc__ + '\n' + '* ``DrawSelection``: ' + Qgis.MapSettingsFlag.DrawSelection.__doc__ + '\n' + '* ``DrawSymbolBounds``: ' + Qgis.MapSettingsFlag.DrawSymbolBounds.__doc__ + '\n' + '* ``RenderMapTile``: ' + Qgis.MapSettingsFlag.RenderMapTile.__doc__ + '\n' + '* ``RenderPartialOutput``: ' + Qgis.MapSettingsFlag.RenderPartialOutput.__doc__ + '\n' + '* ``RenderPreviewJob``: ' + Qgis.MapSettingsFlag.RenderPreviewJob.__doc__ + '\n' + '* ``RenderBlocking``: ' + Qgis.MapSettingsFlag.RenderBlocking.__doc__ + '\n' + '* ``LosslessImageRendering``: ' + Qgis.MapSettingsFlag.LosslessImageRendering.__doc__ + '\n' + '* ``Render3DMap``: ' + Qgis.MapSettingsFlag.Render3DMap.__doc__ + '\n' + '* ``HighQualityImageTransforms``: ' + Qgis.MapSettingsFlag.HighQualityImageTransforms.__doc__ + '\n' + '* ``SkipSymbolRendering``: ' + Qgis.MapSettingsFlag.SkipSymbolRendering.__doc__ + '\n' + '* ``ForceRasterMasks``: ' + Qgis.MapSettingsFlag.ForceRasterMasks.__doc__ + '\n' + '* ``RecordProfile``: ' + Qgis.MapSettingsFlag.RecordProfile.__doc__
QgsMapSettings.AlwaysUseGlobalMasks = Qgis.MapSettingsFlag.AlwaysUseGlobalMasks
QgsMapSettings.AlwaysUseGlobalMasks.is_monkey_patched = True
QgsMapSettings.AlwaysUseGlobalMasks.__doc__ = "When applying clipping paths for selective masking, always use global (\"entire map\") paths, instead of calculating local clipping paths per rendered feature. This results in considerably more complex vector exports in all current Qt versions. This flag only applies to vector map exports. (Since QGIS 3.38)"
Qgis.MapSettingsFlag.__doc__ = "Flags which adjust the way maps are rendered.\n\n.. versionadded:: 3.22\n\n" + '* ``Antialiasing``: ' + Qgis.MapSettingsFlag.Antialiasing.__doc__ + '\n' + '* ``DrawEditingInfo``: ' + Qgis.MapSettingsFlag.DrawEditingInfo.__doc__ + '\n' + '* ``ForceVectorOutput``: ' + Qgis.MapSettingsFlag.ForceVectorOutput.__doc__ + '\n' + '* ``UseAdvancedEffects``: ' + Qgis.MapSettingsFlag.UseAdvancedEffects.__doc__ + '\n' + '* ``DrawLabeling``: ' + Qgis.MapSettingsFlag.DrawLabeling.__doc__ + '\n' + '* ``UseRenderingOptimization``: ' + Qgis.MapSettingsFlag.UseRenderingOptimization.__doc__ + '\n' + '* ``DrawSelection``: ' + Qgis.MapSettingsFlag.DrawSelection.__doc__ + '\n' + '* ``DrawSymbolBounds``: ' + Qgis.MapSettingsFlag.DrawSymbolBounds.__doc__ + '\n' + '* ``RenderMapTile``: ' + Qgis.MapSettingsFlag.RenderMapTile.__doc__ + '\n' + '* ``RenderPartialOutput``: ' + Qgis.MapSettingsFlag.RenderPartialOutput.__doc__ + '\n' + '* ``RenderPreviewJob``: ' + Qgis.MapSettingsFlag.RenderPreviewJob.__doc__ + '\n' + '* ``RenderBlocking``: ' + Qgis.MapSettingsFlag.RenderBlocking.__doc__ + '\n' + '* ``LosslessImageRendering``: ' + Qgis.MapSettingsFlag.LosslessImageRendering.__doc__ + '\n' + '* ``Render3DMap``: ' + Qgis.MapSettingsFlag.Render3DMap.__doc__ + '\n' + '* ``HighQualityImageTransforms``: ' + Qgis.MapSettingsFlag.HighQualityImageTransforms.__doc__ + '\n' + '* ``SkipSymbolRendering``: ' + Qgis.MapSettingsFlag.SkipSymbolRendering.__doc__ + '\n' + '* ``ForceRasterMasks``: ' + Qgis.MapSettingsFlag.ForceRasterMasks.__doc__ + '\n' + '* ``RecordProfile``: ' + Qgis.MapSettingsFlag.RecordProfile.__doc__ + '\n' + '* ``AlwaysUseGlobalMasks``: ' + Qgis.MapSettingsFlag.AlwaysUseGlobalMasks.__doc__
# --
Qgis.MapSettingsFlags = lambda flags=0: Qgis.MapSettingsFlag(flags)
QgsMapSettings.Flags = Qgis.MapSettingsFlags
Expand Down Expand Up @@ -2377,7 +2384,10 @@
QgsRenderContext.RecordProfile = Qgis.RenderContextFlag.RecordProfile
QgsRenderContext.RecordProfile.is_monkey_patched = True
QgsRenderContext.RecordProfile.__doc__ = "Enable run-time profiling while rendering (since QGIS 3.34)"
Qgis.RenderContextFlag.__doc__ = "Flags which affect rendering operations.\n\n.. versionadded:: 3.22\n\n" + '* ``DrawEditingInfo``: ' + Qgis.RenderContextFlag.DrawEditingInfo.__doc__ + '\n' + '* ``ForceVectorOutput``: ' + Qgis.RenderContextFlag.ForceVectorOutput.__doc__ + '\n' + '* ``UseAdvancedEffects``: ' + Qgis.RenderContextFlag.UseAdvancedEffects.__doc__ + '\n' + '* ``UseRenderingOptimization``: ' + Qgis.RenderContextFlag.UseRenderingOptimization.__doc__ + '\n' + '* ``DrawSelection``: ' + Qgis.RenderContextFlag.DrawSelection.__doc__ + '\n' + '* ``DrawSymbolBounds``: ' + Qgis.RenderContextFlag.DrawSymbolBounds.__doc__ + '\n' + '* ``RenderMapTile``: ' + Qgis.RenderContextFlag.RenderMapTile.__doc__ + '\n' + '* ``Antialiasing``: ' + Qgis.RenderContextFlag.Antialiasing.__doc__ + '\n' + '* ``RenderPartialOutput``: ' + Qgis.RenderContextFlag.RenderPartialOutput.__doc__ + '\n' + '* ``RenderPreviewJob``: ' + Qgis.RenderContextFlag.RenderPreviewJob.__doc__ + '\n' + '* ``RenderBlocking``: ' + Qgis.RenderContextFlag.RenderBlocking.__doc__ + '\n' + '* ``RenderSymbolPreview``: ' + Qgis.RenderContextFlag.RenderSymbolPreview.__doc__ + '\n' + '* ``LosslessImageRendering``: ' + Qgis.RenderContextFlag.LosslessImageRendering.__doc__ + '\n' + '* ``ApplyScalingWorkaroundForTextRendering``: ' + Qgis.RenderContextFlag.ApplyScalingWorkaroundForTextRendering.__doc__ + '\n' + '* ``Render3DMap``: ' + Qgis.RenderContextFlag.Render3DMap.__doc__ + '\n' + '* ``ApplyClipAfterReprojection``: ' + Qgis.RenderContextFlag.ApplyClipAfterReprojection.__doc__ + '\n' + '* ``RenderingSubSymbol``: ' + Qgis.RenderContextFlag.RenderingSubSymbol.__doc__ + '\n' + '* ``HighQualityImageTransforms``: ' + Qgis.RenderContextFlag.HighQualityImageTransforms.__doc__ + '\n' + '* ``SkipSymbolRendering``: ' + Qgis.RenderContextFlag.SkipSymbolRendering.__doc__ + '\n' + '* ``RecordProfile``: ' + Qgis.RenderContextFlag.RecordProfile.__doc__
QgsRenderContext.AlwaysUseGlobalMasks = Qgis.RenderContextFlag.AlwaysUseGlobalMasks
QgsRenderContext.AlwaysUseGlobalMasks.is_monkey_patched = True
QgsRenderContext.AlwaysUseGlobalMasks.__doc__ = "When applying clipping paths for selective masking, always use global (\"entire map\") paths, instead of calculating local clipping paths per rendered feature. This results in considerably more complex vector exports in all current Qt versions. This flag only applies to vector map exports. (Since QGIS 3.38)"
Qgis.RenderContextFlag.__doc__ = "Flags which affect rendering operations.\n\n.. versionadded:: 3.22\n\n" + '* ``DrawEditingInfo``: ' + Qgis.RenderContextFlag.DrawEditingInfo.__doc__ + '\n' + '* ``ForceVectorOutput``: ' + Qgis.RenderContextFlag.ForceVectorOutput.__doc__ + '\n' + '* ``UseAdvancedEffects``: ' + Qgis.RenderContextFlag.UseAdvancedEffects.__doc__ + '\n' + '* ``UseRenderingOptimization``: ' + Qgis.RenderContextFlag.UseRenderingOptimization.__doc__ + '\n' + '* ``DrawSelection``: ' + Qgis.RenderContextFlag.DrawSelection.__doc__ + '\n' + '* ``DrawSymbolBounds``: ' + Qgis.RenderContextFlag.DrawSymbolBounds.__doc__ + '\n' + '* ``RenderMapTile``: ' + Qgis.RenderContextFlag.RenderMapTile.__doc__ + '\n' + '* ``Antialiasing``: ' + Qgis.RenderContextFlag.Antialiasing.__doc__ + '\n' + '* ``RenderPartialOutput``: ' + Qgis.RenderContextFlag.RenderPartialOutput.__doc__ + '\n' + '* ``RenderPreviewJob``: ' + Qgis.RenderContextFlag.RenderPreviewJob.__doc__ + '\n' + '* ``RenderBlocking``: ' + Qgis.RenderContextFlag.RenderBlocking.__doc__ + '\n' + '* ``RenderSymbolPreview``: ' + Qgis.RenderContextFlag.RenderSymbolPreview.__doc__ + '\n' + '* ``LosslessImageRendering``: ' + Qgis.RenderContextFlag.LosslessImageRendering.__doc__ + '\n' + '* ``ApplyScalingWorkaroundForTextRendering``: ' + Qgis.RenderContextFlag.ApplyScalingWorkaroundForTextRendering.__doc__ + '\n' + '* ``Render3DMap``: ' + Qgis.RenderContextFlag.Render3DMap.__doc__ + '\n' + '* ``ApplyClipAfterReprojection``: ' + Qgis.RenderContextFlag.ApplyClipAfterReprojection.__doc__ + '\n' + '* ``RenderingSubSymbol``: ' + Qgis.RenderContextFlag.RenderingSubSymbol.__doc__ + '\n' + '* ``HighQualityImageTransforms``: ' + Qgis.RenderContextFlag.HighQualityImageTransforms.__doc__ + '\n' + '* ``SkipSymbolRendering``: ' + Qgis.RenderContextFlag.SkipSymbolRendering.__doc__ + '\n' + '* ``RecordProfile``: ' + Qgis.RenderContextFlag.RecordProfile.__doc__ + '\n' + '* ``AlwaysUseGlobalMasks``: ' + Qgis.RenderContextFlag.AlwaysUseGlobalMasks.__doc__
# --
Qgis.RenderContextFlags = lambda flags=0: Qgis.RenderContextFlag(flags)
QgsRenderContext.Flags = Qgis.RenderContextFlags
Expand Down
1 change: 1 addition & 0 deletions python/PyQt6/core/auto_additions/qgslayoutrendercontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
QgsLayoutRenderContext.FlagRenderLabelsByMapLayer = QgsLayoutRenderContext.Flag.FlagRenderLabelsByMapLayer
QgsLayoutRenderContext.FlagLosslessImageRendering = QgsLayoutRenderContext.Flag.FlagLosslessImageRendering
QgsLayoutRenderContext.FlagSynchronousLegendGraphics = QgsLayoutRenderContext.Flag.FlagSynchronousLegendGraphics
QgsLayoutRenderContext.FlagAlwaysUseGlobalMasks = QgsLayoutRenderContext.Flag.FlagAlwaysUseGlobalMasks
QgsLayoutRenderContext.Flags = lambda flags=0: QgsLayoutRenderContext.Flag(flags)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Stores information relating to the current rendering settings for a layout.
FlagDisableTiledRasterLayerRenders,
FlagRenderLabelsByMapLayer,
FlagLosslessImageRendering,
FlagSynchronousLegendGraphics
FlagSynchronousLegendGraphics,
FlagAlwaysUseGlobalMasks,
};
typedef QFlags<QgsLayoutRenderContext::Flag> Flags;

Expand Down
4 changes: 4 additions & 0 deletions python/PyQt6/core/auto_generated/qgis.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ The development version
enum class SymbolRenderHint /BaseType=IntFlag/
{
DynamicRotation,
IsSymbolLayerSubSymbol,
};
typedef QFlags<Qgis::SymbolRenderHint> SymbolRenderHints;

Expand Down Expand Up @@ -389,6 +390,7 @@ The development version
enum class SymbolLayerFlag /BaseType=IntFlag/
{
DisableFeatureClipping,
CanCalculateMaskGeometryPerFeature,
};
typedef QFlags<Qgis::SymbolLayerFlag> SymbolLayerFlags;

Expand Down Expand Up @@ -1360,6 +1362,7 @@ The development version
SkipSymbolRendering,
ForceRasterMasks,
RecordProfile,
AlwaysUseGlobalMasks,
};
typedef QFlags<Qgis::MapSettingsFlag> MapSettingsFlags;

Expand All @@ -1386,6 +1389,7 @@ The development version
HighQualityImageTransforms,
SkipSymbolRendering,
RecordProfile,
AlwaysUseGlobalMasks,
};
typedef QFlags<Qgis::RenderContextFlag> RenderContextFlags;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Creates the symbol layer

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void stopRender( QgsSymbolRenderContext &context );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,20 @@ Caller takes ownership of the returned symbol layer.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );


virtual void stopRender( QgsSymbolRenderContext &context );


virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QVariantMap properties() const;


virtual QgsSimpleFillSymbolLayer *clone() const /Factory/;


virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;


virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;


Expand All @@ -68,7 +63,6 @@ Caller takes ownership of the returned symbol layer.

virtual QColor strokeColor() const;
virtual void setStrokeColor( const QColor &strokeColor );

virtual QColor fillColor() const;
virtual void setFillColor( const QColor &color );

Expand Down Expand Up @@ -225,6 +219,8 @@ Caller takes ownership of the returned symbol layer.
%End


virtual Qgis::SymbolLayerFlags flags() const;

virtual QString layerType() const;

virtual void startRender( QgsSymbolRenderContext &context );
Expand Down Expand Up @@ -498,6 +494,8 @@ Caller takes ownership of the returned symbol layer.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void stopRender( QgsSymbolRenderContext &context );
Expand Down Expand Up @@ -915,6 +913,8 @@ Used internally when reading/writing symbols.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );

virtual void startRender( QgsSymbolRenderContext &context );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void stopRender( QgsSymbolRenderContext &context );
Expand Down Expand Up @@ -1358,6 +1360,8 @@ Set the line opacity.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void stopRender( QgsSymbolRenderContext &context );
Expand Down Expand Up @@ -1421,6 +1425,8 @@ serialized in the ``properties`` map (corresponding to the output from

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void stopRender( QgsSymbolRenderContext &context );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ Creates a new QgsSimpleMarkerSymbolLayer from an SLD XML element.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );

virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context );
Expand Down Expand Up @@ -562,24 +564,20 @@ Used internally when reading/writing symbols.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void startRender( QgsSymbolRenderContext &context );


virtual void stopRender( QgsSymbolRenderContext &context );


virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context );


virtual QVariantMap properties() const;

virtual bool usesMapUnits() const;


virtual QgsSvgMarkerSymbolLayer *clone() const /Factory/;


virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;


Expand Down Expand Up @@ -773,6 +771,7 @@ Used internally when reading/writing symbols.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;

virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context );

Expand Down Expand Up @@ -953,6 +952,8 @@ required fonts are not available on the system.

virtual QString layerType() const;

virtual Qgis::SymbolLayerFlags flags() const;


virtual void startRender( QgsSymbolRenderContext &context );

Expand Down
31 changes: 19 additions & 12 deletions python/PyQt6/core/auto_generated/symbology/qgssymbollayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,25 @@ This id has to be unique in the whole project
Returns symbol layer identifier
This id is unique in the whole project

.. versionadded:: 3.30
%End

bool installMasks( QgsRenderContext &context, bool recursive, const QRectF &rect = QRectF() );
%Docstring
When rendering, install masks on ``context`` painter.

If ``recursive`` is ``True`` masks are installed recursively for all children symbol layers.

Since QGIS 3.38 the ``rect`` argument can be used to specify a target bounds (in painter coordinates)
for mask geometries. Only mask geometries which intersect ``rect`` will be installed.

:return: ``True`` if any masks were installed (since QGIS 3.38)

.. seealso:: :py:func:`prepareMasks`

.. seealso:: :py:func:`removeMasks`


.. versionadded:: 3.30
%End

Expand Down Expand Up @@ -700,18 +719,6 @@ Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer

:param destLayer: destination layer
%End

void installMasks( QgsRenderContext &context, bool recursive );
%Docstring
When rendering, install masks on ``context`` painter
if ``recursive`` is ``True`` masks are installed recursively for all children symbol layers

.. seealso:: :py:func:`prepareMasks`

.. seealso:: :py:func:`removeMasks`

.. versionadded:: 3.30
%End

void removeMasks( QgsRenderContext &context, bool recursive );
Expand Down
Loading
Loading