32 mSymbol.reset( static_cast<QgsMarkerSymbol *>( symbol ) );
45 if ( props.contains( QStringLiteral(
"mask_symbollayers" ) ) )
64 return QStringLiteral(
"MaskMarker" );
78 attributes.unite( mSymbol->usedAttributes( context ) );
87 if ( mSymbol && mSymbol->hasDataDefinedProperties() )
137 if ( mMaskedSymbolLayers.isEmpty() )
146 if ( mEffect && mEffect->enabled() )
150 p->translate( point );
QgsPaintEffect * paintEffect() const
Returns the current paint effect for the layer.
Abstract base class for all rendered symbols.
bool hasDataDefinedProperties() const override
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
void copyPaintEffect(QgsSymbolLayer *destLayer) const
Copies paint effect of this layer to another symbol layer.
bool setSubSymbol(QgsSymbol *symbol) override
Sets layer's subsymbol. takes ownership of the passed symbol.
QMap< QString, QString > QgsStringMap
void renderPoint(QPointF point, QgsSymbolRenderContext &context) override
Renders a marker at the specified point.
void stopRender(QgsSymbolRenderContext &context) override
Called after a set of rendering operations has finished on the supplied render context.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
Special symbol layer that uses its sub symbol as a selective mask.
bool isGuiPreview() const
Returns the Gui preview mode.
double size() const
Returns the symbol size.
void setMasks(QgsSymbolLayerReferenceList maskedLayers)
Sets the symbol layers that will be masked by the sub symbol's shape.
static QgsSymbolLayer * create(const QgsStringMap &properties=QgsStringMap())
Create a new QgsMaskMarkerSymbolLayer.
QString layerType() const override
Returns a string that represents this layer type.
QgsMaskMarkerSymbolLayer()
Simple constructor.
QgsSymbolLayerReferenceList masks() const override
Returns a list of references to symbol layers that are masked by the sub symbol's shape...
void setPaintEffect(QgsPaintEffect *effect)
Sets the current paint effect for the layer.
QPainter * maskPainter(int id=0)
Returns a mask QPainter for the render operation.
QgsRenderContext & renderContext()
Returns a reference to the context's render context.
void setEffect(QgsPaintEffect *effect)
Sets the effect to be painted.
QgsSymbolLayerReferenceList stringToSymbolLayerReferenceList(const QString &str)
Utilitary function to parse a string originated from symbolLayerReferenceListToString into a QgsSymbo...
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Contains information about the context of a rendering operation.
QPainter * painter()
Returns the destination QPainter for the render operation.
QgsStringMap properties() const override
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
SymbolType type() const
Returns the symbol's type.
void startRender(QgsSymbolRenderContext &context) override
Called before a set of rendering operations commences on the supplied render context.
const QgsFeature * feature() const
Returns the current feature being rendered.
QString symbolLayerReferenceListToString(const QgsSymbolLayerReferenceList &lst)
Utilitary function to turn a QgsSymbolLayerReferenceList into a string.
QRectF bounds(QPointF point, QgsSymbolRenderContext &context) override
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
static QgsMarkerSymbol * createSimple(const QgsStringMap &properties)
Create a marker symbol with one symbol layer: SimpleMarker with specified properties.
A class to manage painter saving and restoring required for drawing on a different painter (mask pain...
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns the set of attributes referenced by the layer.
A class to manager painter saving and restoring required for effect drawing.
void copyDataDefinedProperties(QgsSymbolLayer *destLayer) const
Copies all data defined properties of this layer to another symbol layer.
virtual void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
QgsMaskMarkerSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.