mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			1418 lines
		
	
	
		
			39 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			1418 lines
		
	
	
		
			39 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/symbology/qgssymbollayer.h                                  *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsSymbolLayer
 | 
						|
{
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgssymbollayer.h"
 | 
						|
#include <qgslinesymbollayer.h>
 | 
						|
%End
 | 
						|
%ConvertToSubClassCode
 | 
						|
    switch ( sipCpp->type() )
 | 
						|
    {
 | 
						|
      case Qgis::SymbolType::Marker:
 | 
						|
        if ( sipCpp->layerType() == "EllipseMarker" )
 | 
						|
          sipType = sipType_QgsEllipseSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "FontMarker" )
 | 
						|
          sipType = sipType_QgsFontMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "SimpleMarker" )
 | 
						|
          sipType = sipType_QgsSimpleMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "FilledMarker" )
 | 
						|
          sipType = sipType_QgsFilledMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "SvgMarker" )
 | 
						|
          sipType = sipType_QgsSvgMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "RasterMarker" )
 | 
						|
          sipType = sipType_QgsRasterMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "AnimatedMarker" )
 | 
						|
          sipType = sipType_QgsAnimatedMarkerSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "VectorField" )
 | 
						|
          sipType = sipType_QgsVectorFieldSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "MaskMarker" )
 | 
						|
          sipType = sipType_QgsMaskMarkerSymbolLayer;
 | 
						|
        else
 | 
						|
          sipType = sipType_QgsMarkerSymbolLayer;
 | 
						|
        break;
 | 
						|
 | 
						|
      case Qgis::SymbolType::Line:
 | 
						|
        if ( sipCpp->layerType() == "MarkerLine" )
 | 
						|
          sipType = sipType_QgsMarkerLineSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "SimpleLine" )
 | 
						|
          sipType = sipType_QgsSimpleLineSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "HashLine" )
 | 
						|
          sipType = sipType_QgsHashedLineSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "ArrowLine" )
 | 
						|
          sipType = sipType_QgsArrowSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "InterpolatedLine" )
 | 
						|
          sipType = sipType_QgsInterpolatedLineSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "RasterLine" )
 | 
						|
          sipType = sipType_QgsRasterLineSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "Lineburst" )
 | 
						|
          sipType = sipType_QgsLineburstSymbolLayer;
 | 
						|
        else
 | 
						|
          sipType = sipType_QgsLineSymbolLayer;
 | 
						|
        break;
 | 
						|
 | 
						|
      case Qgis::SymbolType::Fill:
 | 
						|
        if ( sipCpp->layerType() == "SimpleFill" )
 | 
						|
          sipType = sipType_QgsSimpleFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "LinePatternFill" )
 | 
						|
          sipType = sipType_QgsLinePatternFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "PointPatternFill" )
 | 
						|
          sipType = sipType_QgsPointPatternFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "SVGFill" )
 | 
						|
          sipType = sipType_QgsSVGFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "RasterFill" )
 | 
						|
          sipType = sipType_QgsRasterFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "CentroidFill" )
 | 
						|
          sipType = sipType_QgsCentroidFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "GradientFill" )
 | 
						|
          sipType = sipType_QgsGradientFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "ShapeburstFill" )
 | 
						|
          sipType = sipType_QgsShapeburstFillSymbolLayer;
 | 
						|
        else if ( sipCpp->layerType() == "RandomMarkerFill" )
 | 
						|
          sipType = sipType_QgsRandomMarkerFillSymbolLayer;
 | 
						|
        else
 | 
						|
          sipType = sipType_QgsFillSymbolLayer;
 | 
						|
        break;
 | 
						|
 | 
						|
      case Qgis::SymbolType::Hybrid:
 | 
						|
        sipType = sipType_QgsGeometryGeneratorSymbolLayer;
 | 
						|
        break;
 | 
						|
    }
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    enum Property
 | 
						|
    {
 | 
						|
      PropertySize,
 | 
						|
      PropertyAngle,
 | 
						|
      PropertyName,
 | 
						|
      PropertyFillColor,
 | 
						|
      PropertyStrokeColor,
 | 
						|
      PropertyStrokeWidth,
 | 
						|
      PropertyStrokeStyle,
 | 
						|
      PropertyOffset,
 | 
						|
      PropertyCharacter,
 | 
						|
      PropertyWidth,
 | 
						|
      PropertyHeight,
 | 
						|
      PropertyPreserveAspectRatio,
 | 
						|
      PropertyFillStyle,
 | 
						|
      PropertyJoinStyle,
 | 
						|
      PropertySecondaryColor,
 | 
						|
      PropertyLineAngle,
 | 
						|
      PropertyLineDistance,
 | 
						|
      PropertyGradientType,
 | 
						|
      PropertyCoordinateMode,
 | 
						|
      PropertyGradientSpread,
 | 
						|
      PropertyGradientReference1X,
 | 
						|
      PropertyGradientReference1Y,
 | 
						|
      PropertyGradientReference2X,
 | 
						|
      PropertyGradientReference2Y,
 | 
						|
      PropertyGradientReference1IsCentroid,
 | 
						|
      PropertyGradientReference2IsCentroid,
 | 
						|
      PropertyBlurRadius,
 | 
						|
      PropertyShapeburstUseWholeShape,
 | 
						|
      PropertyShapeburstMaxDistance,
 | 
						|
      PropertyShapeburstIgnoreRings,
 | 
						|
      PropertyFile,
 | 
						|
      PropertyDistanceX,
 | 
						|
      PropertyDistanceY,
 | 
						|
      PropertyDisplacementX,
 | 
						|
      PropertyDisplacementY,
 | 
						|
      PropertyOpacity,
 | 
						|
      PropertyCustomDash,
 | 
						|
      PropertyCapStyle,
 | 
						|
      PropertyPlacement,
 | 
						|
      PropertyInterval,
 | 
						|
      PropertyOffsetAlongLine,
 | 
						|
      PropertyAverageAngleLength,
 | 
						|
      PropertyHorizontalAnchor,
 | 
						|
      PropertyVerticalAnchor,
 | 
						|
      PropertyLayerEnabled,
 | 
						|
      PropertyArrowWidth,
 | 
						|
      PropertyArrowStartWidth,
 | 
						|
      PropertyArrowHeadLength,
 | 
						|
      PropertyArrowHeadThickness,
 | 
						|
      PropertyArrowHeadType,
 | 
						|
      PropertyArrowType,
 | 
						|
      PropertyOffsetX,
 | 
						|
      PropertyOffsetY,
 | 
						|
      PropertyPointCount,
 | 
						|
      PropertyRandomSeed,
 | 
						|
      PropertyClipPoints,
 | 
						|
      PropertyDensityArea,
 | 
						|
      PropertyFontFamily,
 | 
						|
      PropertyFontStyle,
 | 
						|
      PropertyDashPatternOffset,
 | 
						|
      PropertyTrimStart,
 | 
						|
      PropertyTrimEnd,
 | 
						|
      PropertyLineStartWidthValue,
 | 
						|
      PropertyLineEndWidthValue,
 | 
						|
      PropertyLineStartColorValue,
 | 
						|
      PropertyLineEndColorValue,
 | 
						|
      PropertyMarkerClipping,
 | 
						|
      PropertyRandomOffsetX,
 | 
						|
      PropertyRandomOffsetY,
 | 
						|
      PropertyLineClipping,
 | 
						|
    };
 | 
						|
 | 
						|
    static const QgsPropertiesDefinition &propertyDefinitions();
 | 
						|
%Docstring
 | 
						|
Returns the symbol layer property definitions.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    virtual ~QgsSymbolLayer();
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    virtual Qgis::SymbolLayerFlags flags() const;
 | 
						|
%Docstring
 | 
						|
Returns flags which control the symbol layer's behavior.
 | 
						|
 | 
						|
.. versionadded:: 3.22
 | 
						|
%End
 | 
						|
 | 
						|
    bool enabled() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if symbol layer is enabled and will be drawn.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setEnabled`
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void setEnabled( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether symbol layer is enabled and should be drawn. Disabled
 | 
						|
layers are not drawn, but remain part of the symbol and can be re-enabled
 | 
						|
when desired.
 | 
						|
 | 
						|
.. seealso:: :py:func:`enabled`
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QColor color() const;
 | 
						|
%Docstring
 | 
						|
Returns the "representative" color of the symbol layer.
 | 
						|
 | 
						|
Depending on the symbol layer type, this will have different meaning. For instance, a line
 | 
						|
symbol layer will generally return the stroke color of the layer, while a fill symbol layer
 | 
						|
will return the "fill" color instead of stroke.
 | 
						|
 | 
						|
Some symbol layer types will return an invalid QColor if they have no representative
 | 
						|
color associated (e.g. raster image based symbol layers).
 | 
						|
 | 
						|
.. seealso:: :py:func:`setColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`strokeColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`fillColor`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setColor( const QColor &color );
 | 
						|
%Docstring
 | 
						|
Sets the "representative" color for the symbol layer.
 | 
						|
 | 
						|
Depending on the symbol layer type, this will have different meaning. For instance, a line
 | 
						|
symbol layer will generally set the stroke color of the layer, while a fill symbol layer
 | 
						|
will set the "fill" color instead of stroke.
 | 
						|
 | 
						|
.. seealso:: :py:func:`color`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setStrokeColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setFillColor`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setStrokeColor( const QColor &color );
 | 
						|
%Docstring
 | 
						|
Sets the stroke ``color`` for the symbol layer.
 | 
						|
 | 
						|
This property is not supported by all symbol layer types, only those with a stroke component.
 | 
						|
 | 
						|
.. seealso:: :py:func:`strokeColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setFillColor`
 | 
						|
 | 
						|
.. versionadded:: 2.1
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QColor strokeColor() const;
 | 
						|
%Docstring
 | 
						|
Returns the stroke color for the symbol layer.
 | 
						|
 | 
						|
This property is not supported by all symbol layer types, only those with a stroke component. Symbol
 | 
						|
layers without a stroke component will return an invalid QColor.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setStrokeColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`color`
 | 
						|
 | 
						|
.. seealso:: :py:func:`fillColor`
 | 
						|
 | 
						|
.. versionadded:: 2.1
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setFillColor( const QColor &color );
 | 
						|
%Docstring
 | 
						|
Sets the fill ``color`` for the symbol layer.
 | 
						|
 | 
						|
This property is not supported by all symbol layer types, only those with a fill component.
 | 
						|
 | 
						|
.. seealso:: :py:func:`fillColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setStrokeColor`
 | 
						|
 | 
						|
.. versionadded:: 2.1
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QColor fillColor() const;
 | 
						|
%Docstring
 | 
						|
Returns the fill color for the symbol layer.
 | 
						|
 | 
						|
This property is not supported by all symbol layer types, only those with a fill component. Symbol
 | 
						|
layers without a fill component will return an invalid QColor.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setFillColor`
 | 
						|
 | 
						|
.. seealso:: :py:func:`color`
 | 
						|
 | 
						|
.. seealso:: :py:func:`strokeColor`
 | 
						|
 | 
						|
.. versionadded:: 2.1
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QString layerType() const = 0;
 | 
						|
%Docstring
 | 
						|
Returns a string that represents this layer type. Used for serialization.
 | 
						|
Should match with the string used to register this symbol layer in the registry.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void startRender( QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Called before a set of rendering operations commences on the supplied render ``context``.
 | 
						|
 | 
						|
This is always followed by a call to :py:func:`~QgsSymbolLayer.stopRender` after all rendering operations
 | 
						|
have been completed.
 | 
						|
 | 
						|
Subclasses can use this method to prepare for a set of rendering operations, e.g. by
 | 
						|
pre-evaluating paths or images to render, and performing other one-time optimisations.
 | 
						|
 | 
						|
.. seealso:: :py:func:`startFeatureRender`
 | 
						|
 | 
						|
.. seealso:: :py:func:`stopRender`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void stopRender( QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Called after a set of rendering operations has finished on the supplied render ``context``.
 | 
						|
 | 
						|
This is always preceded by a call to :py:func:`~QgsSymbolLayer.startRender` before all rendering operations
 | 
						|
are commenced.
 | 
						|
 | 
						|
Subclasses can use this method to cleanup after a set of rendering operations.
 | 
						|
 | 
						|
.. seealso:: :py:func:`startRender`
 | 
						|
 | 
						|
.. seealso:: :py:func:`stopFeatureRender`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Called before the layer will be rendered for a particular ``feature``.
 | 
						|
 | 
						|
This is always followed by a call to :py:func:`~QgsSymbolLayer.stopFeatureRender` after the feature
 | 
						|
has been completely rendered (i.e. all parts have been rendered).
 | 
						|
 | 
						|
The default implementation does nothing.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   In some circumstances, :py:func:`~QgsSymbolLayer.startFeatureRender` and :py:func:`~QgsSymbolLayer.stopFeatureRender` may not be called
 | 
						|
   before a symbol layer is rendered. E.g., when a symbol layer is being rendered in isolation
 | 
						|
   and not as a result of rendering a feature (for instance, when rendering a legend patch or other
 | 
						|
   non-feature based shape).
 | 
						|
 | 
						|
.. seealso:: :py:func:`stopFeatureRender`
 | 
						|
 | 
						|
.. seealso:: :py:func:`startRender`
 | 
						|
 | 
						|
 | 
						|
.. versionadded:: 3.12
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Called after the layer has been rendered for a particular ``feature``.
 | 
						|
 | 
						|
This is always preceded by a call to :py:func:`~QgsSymbolLayer.startFeatureRender` just before the feature
 | 
						|
will be rendered.
 | 
						|
 | 
						|
The default implementation does nothing.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   In some circumstances, :py:func:`~QgsSymbolLayer.startFeatureRender` and :py:func:`~QgsSymbolLayer.stopFeatureRender` may not be called
 | 
						|
   before a symbol layer is rendered. E.g., when a symbol layer is being rendered in isolation
 | 
						|
   and not as a result of rendering a feature (for instance, when rendering a legend patch or other
 | 
						|
   non-feature based shape).
 | 
						|
 | 
						|
.. seealso:: :py:func:`startFeatureRender`
 | 
						|
 | 
						|
.. seealso:: :py:func:`stopRender`
 | 
						|
 | 
						|
 | 
						|
.. versionadded:: 3.12
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QgsSymbolLayer *clone() const = 0 /Factory/;
 | 
						|
%Docstring
 | 
						|
Shall be reimplemented by subclasses to create a deep copy of the instance.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
 | 
						|
%Docstring
 | 
						|
Saves the symbol layer as SLD
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
 | 
						|
 | 
						|
    virtual QVariantMap properties() const = 0;
 | 
						|
%Docstring
 | 
						|
Should be reimplemented by subclasses to return a string map that
 | 
						|
contains the configuration information for the symbol layer. This
 | 
						|
is used to serialize a symbol layer perstistently.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) = 0;
 | 
						|
 | 
						|
    virtual QgsSymbol *subSymbol();
 | 
						|
%Docstring
 | 
						|
Returns the symbol's sub symbol, if present.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
 | 
						|
%Docstring
 | 
						|
Sets layer's subsymbol. takes ownership of the passed symbol
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::SymbolType type() const;
 | 
						|
 | 
						|
    virtual bool isCompatibleWithSymbol( QgsSymbol *symbol ) const;
 | 
						|
%Docstring
 | 
						|
Returns if the layer can be used below the specified symbol
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool canCauseArtifactsBetweenAdjacentTiles() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the symbol layer rendering can cause visible artifacts across a single feature
 | 
						|
when the feature is rendered as a series of adjacent map tiles each containing a portion of the feature's geometry.
 | 
						|
 | 
						|
The default implementation returns ``False``.
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
    void setLocked( bool locked );
 | 
						|
%Docstring
 | 
						|
Sets whether the layer's colors are locked.
 | 
						|
 | 
						|
If ``locked`` is ``True`` then the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
 | 
						|
 | 
						|
.. seealso:: :py:func:`isLocked`
 | 
						|
%End
 | 
						|
 | 
						|
    bool isLocked() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setLocked`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Returns the estimated maximum distance which the layer style will bleed outside
 | 
						|
the drawn shape when drawn in the specified /a context. For example, polygons
 | 
						|
drawn with an stroke will draw half the width
 | 
						|
of the stroke outside of the polygon. This amount is estimated, since it may
 | 
						|
be affected by data defined symbology rules.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setOutputUnit( Qgis::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the units to use for sizes and widths within the symbol layer. Individual
 | 
						|
symbol layer subclasses will interpret this in different ways, e.g., a marker symbol
 | 
						|
layer may use it to specify the units for the marker size, while a line symbol
 | 
						|
layer may use it to specify the units for the line width.
 | 
						|
 | 
						|
:param unit: output units
 | 
						|
 | 
						|
.. seealso:: :py:func:`outputUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual Qgis::RenderUnit outputUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units to use for sizes and widths within the symbol layer. Individual
 | 
						|
symbol layer subclasses will interpret this in different ways, e.g., a marker symbol
 | 
						|
layer may use it to specify the units for the marker size, while a line symbol
 | 
						|
layer may use it to specify the units for the line width.
 | 
						|
 | 
						|
:return: output unit, or :py:class:`QgsUnitTypes`.RenderUnknownUnit if the symbol layer contains mixed units
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOutputUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool usesMapUnits() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the symbol layer has any components which use map unit based sizes.
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
    virtual QgsMapUnitScale mapUnitScale() const;
 | 
						|
 | 
						|
    void setRenderingPass( int renderingPass );
 | 
						|
%Docstring
 | 
						|
Specifies the rendering pass in which this symbol layer should be rendered.
 | 
						|
The lower the number, the lower the symbol will be rendered.
 | 
						|
0: first pass, 1: second pass, ...
 | 
						|
Defaults to 0
 | 
						|
%End
 | 
						|
 | 
						|
    int renderingPass() const;
 | 
						|
%Docstring
 | 
						|
Specifies the rendering pass in which this symbol layer should be rendered.
 | 
						|
The lower the number, the lower the symbol will be rendered.
 | 
						|
0: first pass, 1: second pass, ...
 | 
						|
Defaults to 0
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Returns the set of attributes referenced by the layer. This includes attributes
 | 
						|
required by any data defined properties associated with the layer.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setDataDefinedProperty( Property key, const QgsProperty &property );
 | 
						|
%Docstring
 | 
						|
Sets a data defined property for the layer. Any existing property with the same key
 | 
						|
will be overwritten.
 | 
						|
 | 
						|
.. seealso:: :py:func:`dataDefinedProperties`
 | 
						|
 | 
						|
.. seealso:: Property
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const;
 | 
						|
%Docstring
 | 
						|
write as DXF
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets line width
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double dxfSize( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets marker size
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets offset
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets color
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double dxfAngle( QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets angle
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QVector<qreal> dxfCustomDashPattern( Qgis::RenderUnit &unit ) const;
 | 
						|
%Docstring
 | 
						|
Gets dash pattern
 | 
						|
%End
 | 
						|
 | 
						|
    virtual Qt::PenStyle dxfPenStyle() const;
 | 
						|
%Docstring
 | 
						|
Gets pen style
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QColor dxfBrushColor( QgsSymbolRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Gets brush/fill color
 | 
						|
%End
 | 
						|
 | 
						|
    virtual Qt::BrushStyle dxfBrushStyle() const;
 | 
						|
%Docstring
 | 
						|
Gets brush/fill style
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPaintEffect *paintEffect() const;
 | 
						|
%Docstring
 | 
						|
Returns the current paint effect for the layer.
 | 
						|
 | 
						|
:return: paint effect
 | 
						|
 | 
						|
.. seealso:: :py:func:`setPaintEffect`
 | 
						|
 | 
						|
.. versionadded:: 2.9
 | 
						|
%End
 | 
						|
 | 
						|
    void setPaintEffect( QgsPaintEffect *effect /Transfer/ );
 | 
						|
%Docstring
 | 
						|
Sets the current paint effect for the layer.
 | 
						|
 | 
						|
:param effect: paint effect. Ownership is transferred to the layer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`paintEffect`
 | 
						|
 | 
						|
.. versionadded:: 2.9
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void prepareExpressions( const QgsSymbolRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Prepares all data defined property expressions for evaluation. This should
 | 
						|
be called prior to evaluating data defined properties.
 | 
						|
 | 
						|
:param context: symbol render context
 | 
						|
 | 
						|
.. versionadded:: 2.12
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPropertyCollection &dataDefinedProperties();
 | 
						|
%Docstring
 | 
						|
Returns a reference to the symbol layer's property collection, used for data defined overrides.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setDataDefinedProperties`
 | 
						|
 | 
						|
.. seealso:: Property
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    void setDataDefinedProperties( const QgsPropertyCollection &collection );
 | 
						|
%Docstring
 | 
						|
Sets the symbol layer's property collection, used for data defined overrides.
 | 
						|
 | 
						|
:param collection: property collection. Existing properties will be replaced.
 | 
						|
 | 
						|
.. seealso:: :py:func:`dataDefinedProperties`
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool hasDataDefinedProperties() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the symbol layer (or any of its sub-symbols) contains data defined properties.
 | 
						|
 | 
						|
.. versionadded:: 3.4.5
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QList<QgsSymbolLayerReference> masks() const;
 | 
						|
%Docstring
 | 
						|
Returns masks defined by this symbol layer.
 | 
						|
This is a list of symbol layers of other layers that should be occluded.
 | 
						|
 | 
						|
.. versionadded:: 3.12
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void prepareMasks( const QgsSymbolRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Prepares all mask internal objects according to what is defined in ``context``
 | 
						|
This should be called prior to calling :py:func:`~QgsSymbolLayer.startRender` method.
 | 
						|
 | 
						|
.. seealso:: :py:func:`QgsRenderContext.addSymbolLayerClipPath`
 | 
						|
 | 
						|
.. seealso:: :py:func:`QgsRenderContext.symbolLayerClipPaths`
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    void setId( const QString &id );
 | 
						|
%Docstring
 | 
						|
Set symbol layer identifier
 | 
						|
This id has to be unique in the whole project
 | 
						|
 | 
						|
.. versionadded:: 3.30
 | 
						|
%End
 | 
						|
 | 
						|
    QString id() const;
 | 
						|
%Docstring
 | 
						|
Returns symbol layer identifier
 | 
						|
This id is unique in the whole project
 | 
						|
 | 
						|
.. versionadded:: 3.30
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
    QgsSymbolLayer( Qgis::SymbolType type, bool locked = false );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsSymbolLayer.
 | 
						|
 | 
						|
:param type: specifies the associated symbol type
 | 
						|
:param locked: if ``True``, then symbol layer colors will be locked and will ignore any symbol-level color changes.
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    void restoreOldDataDefinedProperties( const QVariantMap &stringMap );
 | 
						|
%Docstring
 | 
						|
Restores older data defined properties from string map.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void copyDataDefinedProperties( QgsSymbolLayer *destLayer ) const;
 | 
						|
%Docstring
 | 
						|
Copies all data defined properties of this layer to another symbol layer.
 | 
						|
 | 
						|
:param destLayer: destination layer
 | 
						|
%End
 | 
						|
 | 
						|
    void copyPaintEffect( QgsSymbolLayer *destLayer ) const;
 | 
						|
%Docstring
 | 
						|
Copies paint effect of this layer to another symbol layer
 | 
						|
 | 
						|
:param destLayer: destination layer
 | 
						|
 | 
						|
.. versionadded:: 2.9
 | 
						|
%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 );
 | 
						|
%Docstring
 | 
						|
When rendering, remove previously installed masks from ``context`` painter
 | 
						|
if ``recursive`` is ``True`` masks are removed recursively for all children symbol layers
 | 
						|
 | 
						|
.. seealso:: :py:func:`prepareMasks`
 | 
						|
 | 
						|
.. seealso:: :py:func:`installMasks`
 | 
						|
 | 
						|
.. versionadded:: 3.30
 | 
						|
%End
 | 
						|
 | 
						|
  private:
 | 
						|
    QgsSymbolLayer( const QgsSymbolLayer &other );
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
class QgsMarkerSymbolLayer : QgsSymbolLayer
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Abstract base class for marker symbol layers.
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgssymbollayer.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    enum HorizontalAnchorPoint
 | 
						|
    {
 | 
						|
      Left,
 | 
						|
      HCenter,
 | 
						|
      Right,
 | 
						|
    };
 | 
						|
 | 
						|
    enum VerticalAnchorPoint
 | 
						|
    {
 | 
						|
      Top,
 | 
						|
      VCenter,
 | 
						|
      Bottom,
 | 
						|
    };
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    virtual void startRender( QgsSymbolRenderContext &context );
 | 
						|
 | 
						|
%Docstring
 | 
						|
QgsMarkerSymbolLayer cannot be copied
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void stopRender( QgsSymbolRenderContext &context );
 | 
						|
 | 
						|
 | 
						|
    virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Renders a marker at the specified point. Derived classes must implement this to
 | 
						|
handle drawing the point.
 | 
						|
 | 
						|
:param point: position at which to render point, in painter units
 | 
						|
:param context: symbol render context
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size );
 | 
						|
 | 
						|
 | 
						|
    void setAngle( double angle );
 | 
						|
%Docstring
 | 
						|
Sets the rotation angle for the marker.
 | 
						|
 | 
						|
:param angle: angle in degrees clockwise from north.
 | 
						|
 | 
						|
.. seealso:: :py:func:`angle`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setLineAngle`
 | 
						|
%End
 | 
						|
 | 
						|
    double angle() const;
 | 
						|
%Docstring
 | 
						|
Returns the rotation angle for the marker, in degrees clockwise from north.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAngle`
 | 
						|
%End
 | 
						|
 | 
						|
    void setLineAngle( double lineAngle );
 | 
						|
%Docstring
 | 
						|
Sets the line angle modification for the symbol's angle. This angle is added to
 | 
						|
the marker's rotation and data defined rotation before rendering the symbol, and
 | 
						|
is usually used for orienting symbols to match a line's angle.
 | 
						|
 | 
						|
:param lineAngle: Angle in degrees clockwise from north, valid values are between 0 and 360
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAngle`
 | 
						|
 | 
						|
.. seealso:: :py:func:`angle`
 | 
						|
 | 
						|
.. versionadded:: 2.9
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setSize( double size );
 | 
						|
%Docstring
 | 
						|
Sets the symbol size.
 | 
						|
 | 
						|
:param size: symbol size. Units are specified by :py:func:`~QgsMarkerSymbolLayer.sizeUnit`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`size`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    double size() const;
 | 
						|
%Docstring
 | 
						|
Returns the symbol size. Units are specified by :py:func:`~QgsMarkerSymbolLayer.sizeUnit`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSize`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setSizeUnit( Qgis::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the units for the symbol's size.
 | 
						|
 | 
						|
:param unit: size units
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSize`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::RenderUnit sizeUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units for the symbol's size.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`size`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setSizeMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
%Docstring
 | 
						|
Sets the map unit scale for the symbol's size.
 | 
						|
 | 
						|
:param scale: size map unit scale
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSize`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    const QgsMapUnitScale &sizeMapUnitScale() const;
 | 
						|
%Docstring
 | 
						|
Returns the map unit scale for the symbol's size.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`size`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    void setScaleMethod( Qgis::ScaleMethod scaleMethod );
 | 
						|
%Docstring
 | 
						|
Sets the method to use for scaling the marker's size.
 | 
						|
 | 
						|
:param scaleMethod: scale method
 | 
						|
 | 
						|
.. seealso:: :py:func:`scaleMethod`
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::ScaleMethod scaleMethod() const;
 | 
						|
%Docstring
 | 
						|
Returns the method to use for scaling the marker's size.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setScaleMethod`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffset( QPointF offset );
 | 
						|
%Docstring
 | 
						|
Sets the marker's offset, which is the horizontal and vertical displacement which the rendered marker
 | 
						|
should have from the original feature's geometry.
 | 
						|
 | 
						|
:param offset: marker offset. Units are specified by :py:func:`~QgsMarkerSymbolLayer.offsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    QPointF offset() const;
 | 
						|
%Docstring
 | 
						|
Returns the marker's offset, which is the horizontal and vertical displacement which the rendered marker
 | 
						|
will have from the original feature's geometry. Units are specified by :py:func:`~QgsMarkerSymbolLayer.offsetUnit`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffsetUnit( Qgis::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the units for the symbol's offset.
 | 
						|
 | 
						|
:param unit: offset units
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::RenderUnit offsetUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units for the symbol's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
%Docstring
 | 
						|
Sets the map unit scale for the symbol's offset.
 | 
						|
 | 
						|
:param scale: offset map unit scale
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    const QgsMapUnitScale &offsetMapUnitScale() const;
 | 
						|
%Docstring
 | 
						|
Returns the map unit scale for the symbol's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    void setHorizontalAnchorPoint( HorizontalAnchorPoint h );
 | 
						|
%Docstring
 | 
						|
Sets the horizontal anchor point for positioning the symbol.
 | 
						|
 | 
						|
:param h: anchor point. Symbol will be drawn so that the horizontal anchor point is aligned with
 | 
						|
          the marker's desired location.
 | 
						|
 | 
						|
.. seealso:: :py:func:`horizontalAnchorPoint`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setVerticalAnchorPoint`
 | 
						|
%End
 | 
						|
 | 
						|
    HorizontalAnchorPoint horizontalAnchorPoint() const;
 | 
						|
%Docstring
 | 
						|
Returns the horizontal anchor point for positioning the symbol. The symbol will be drawn so that
 | 
						|
the horizontal anchor point is aligned with the marker's desired location.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setHorizontalAnchorPoint`
 | 
						|
 | 
						|
.. seealso:: :py:func:`verticalAnchorPoint`
 | 
						|
%End
 | 
						|
 | 
						|
    void setVerticalAnchorPoint( VerticalAnchorPoint v );
 | 
						|
%Docstring
 | 
						|
Sets the vertical anchor point for positioning the symbol.
 | 
						|
 | 
						|
:param v: anchor point. Symbol will be drawn so that the vertical anchor point is aligned with
 | 
						|
          the marker's desired location.
 | 
						|
 | 
						|
.. seealso:: :py:func:`verticalAnchorPoint`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setHorizontalAnchorPoint`
 | 
						|
%End
 | 
						|
 | 
						|
    VerticalAnchorPoint verticalAnchorPoint() const;
 | 
						|
%Docstring
 | 
						|
Returns the vertical anchor point for positioning the symbol. The symbol will be drawn so that
 | 
						|
the vertical anchor point is aligned with the marker's desired location.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setVerticalAnchorPoint`
 | 
						|
 | 
						|
.. seealso:: :py:func:`horizontalAnchorPoint`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
 | 
						|
 | 
						|
 | 
						|
    virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
 | 
						|
%Docstring
 | 
						|
Writes the symbol layer definition as a SLD XML element.
 | 
						|
 | 
						|
:param doc: XML document
 | 
						|
:param element: parent XML element
 | 
						|
:param props: symbol layer definition (see :py:func:`~QgsMarkerSymbolLayer.properties`)
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setOutputUnit( Qgis::RenderUnit unit );
 | 
						|
 | 
						|
    virtual Qgis::RenderUnit outputUnit() const;
 | 
						|
 | 
						|
    virtual void setMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
 | 
						|
    virtual QgsMapUnitScale mapUnitScale() const;
 | 
						|
 | 
						|
    virtual double dxfSize( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
 | 
						|
    virtual double dxfAngle( QgsSymbolRenderContext &context ) const;
 | 
						|
 | 
						|
    virtual QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Returns the approximate bounding box of the marker symbol layer, taking into account
 | 
						|
any data defined overrides and offsets which are set for the marker layer.
 | 
						|
 | 
						|
:return: approximate symbol bounds, in painter units
 | 
						|
 | 
						|
.. versionadded:: 2.14
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
    QgsMarkerSymbolLayer( bool locked = false );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsMarkerSymbolLayer.
 | 
						|
 | 
						|
:param locked: set to ``True`` to lock symbol color
 | 
						|
%End
 | 
						|
 | 
						|
    void markerOffset( QgsSymbolRenderContext &context, double &offsetX, double &offsetY ) const;
 | 
						|
%Docstring
 | 
						|
Calculates the required marker offset, including both the symbol offset
 | 
						|
and any displacement required to align with the marker's anchor point.
 | 
						|
 | 
						|
:param context: symbol render context
 | 
						|
:param offsetX: will be set to required horizontal offset (in painter units)
 | 
						|
:param offsetY: will be set to required vertical offset (in painter units)
 | 
						|
%End
 | 
						|
 | 
						|
    void markerOffset( QgsSymbolRenderContext &context, double width, double height, double &offsetX, double &offsetY ) const /PyName=markerOffsetWithWidthAndHeight/;
 | 
						|
%Docstring
 | 
						|
Calculates the required marker offset, including both the symbol offset
 | 
						|
and any displacement required to align with the marker's anchor point.
 | 
						|
 | 
						|
:param context: symbol render context
 | 
						|
:param width: marker width
 | 
						|
:param height: marker height
 | 
						|
:param offsetX: will be set to required horizontal offset (in painter units)
 | 
						|
:param offsetY: will be set to required vertical offset (in painter units)
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   available in Python as markerOffsetWithWidthAndHeight
 | 
						|
%End
 | 
						|
 | 
						|
    void markerOffset( QgsSymbolRenderContext &context, double width, double height,
 | 
						|
                       Qgis::RenderUnit widthUnit, Qgis::RenderUnit heightUnit,
 | 
						|
                       double &offsetX, double &offsetY,
 | 
						|
                       const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const /PyName=markerOffset2/;
 | 
						|
%Docstring
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   available in Python bindings as markerOffset2
 | 
						|
%End
 | 
						|
 | 
						|
    static QPointF _rotatedOffset( QPointF offset, double angle );
 | 
						|
%Docstring
 | 
						|
Adjusts a marker offset to account for rotation.
 | 
						|
 | 
						|
:param offset: offset prior to rotation
 | 
						|
:param angle: rotation angle in degrees clockwise from north
 | 
						|
 | 
						|
:return: adjusted offset
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
  private:
 | 
						|
    QgsMarkerSymbolLayer( const QgsMarkerSymbolLayer &other );
 | 
						|
};
 | 
						|
 | 
						|
class QgsLineSymbolLayer : QgsSymbolLayer
 | 
						|
{
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgssymbollayer.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    enum RenderRingFilter
 | 
						|
    {
 | 
						|
      AllRings,
 | 
						|
      ExteriorRingOnly,
 | 
						|
      InteriorRingsOnly,
 | 
						|
    };
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    virtual void setOutputUnit( Qgis::RenderUnit unit );
 | 
						|
 | 
						|
%Docstring
 | 
						|
QgsLineSymbolLayer cannot be copied
 | 
						|
%End
 | 
						|
    virtual Qgis::RenderUnit outputUnit() const;
 | 
						|
 | 
						|
    virtual void setMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
 | 
						|
    virtual QgsMapUnitScale mapUnitScale() const;
 | 
						|
 | 
						|
    virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size );
 | 
						|
 | 
						|
    virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
 | 
						|
 | 
						|
 | 
						|
    virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Renders the line symbol layer along the line joining ``points``, using the given render ``context``.
 | 
						|
 | 
						|
.. seealso:: :py:func:`renderPolygonStroke`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void renderPolygonStroke( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Renders the line symbol layer along the outline of polygon, using the given render ``context``.
 | 
						|
 | 
						|
The exterior ring of the polygon is specified in ``points``. Optionally, interior
 | 
						|
rings are set via the ``rings`` argument.
 | 
						|
 | 
						|
.. seealso:: :py:func:`renderPolyline`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void setWidth( double width );
 | 
						|
%Docstring
 | 
						|
Sets the ``width`` of the line symbol layer.
 | 
						|
 | 
						|
Calling this method updates the width of the line symbol layer, without
 | 
						|
changing the existing width units. It has different effects depending
 | 
						|
on the line symbol layer subclass, e.g. for a simple line layer it
 | 
						|
changes the stroke width of the line, for a marker line layer it
 | 
						|
changes the size of the markers used to draw the line.
 | 
						|
 | 
						|
.. seealso:: :py:func:`width`
 | 
						|
 | 
						|
.. warning::
 | 
						|
 | 
						|
   Since the width units vary, this method is useful for changing the
 | 
						|
   relative width of a line symbol layer only.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double width() const;
 | 
						|
%Docstring
 | 
						|
Returns the estimated width for the line symbol layer.
 | 
						|
 | 
						|
.. warning::
 | 
						|
 | 
						|
   This returned value is inaccurate if the symbol layer has sub-symbols with
 | 
						|
   different width units. Use the overload accepting a :py:class:`QgsRenderContext`
 | 
						|
   argument instead for accurate sizes in this case.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setWidth`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual double width( const QgsRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Returns the line symbol layer width, in painter units.
 | 
						|
 | 
						|
This method returns an accurate width by calculating the actual rendered
 | 
						|
width of the symbol layer using the provided render ``context``.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setWidth`
 | 
						|
 | 
						|
.. versionadded:: 3.4.5
 | 
						|
%End
 | 
						|
 | 
						|
    double offset() const;
 | 
						|
%Docstring
 | 
						|
Returns the line's offset.
 | 
						|
 | 
						|
Offset units can be retrieved by calling :py:func:`~QgsLineSymbolLayer.offsetUnit`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffset( double offset );
 | 
						|
%Docstring
 | 
						|
Sets the line's ``offset``.
 | 
						|
 | 
						|
Offset units are set via :py:func:`~QgsLineSymbolLayer.setOffsetUnit`.
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffsetUnit( Qgis::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the ``unit`` for the line's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::RenderUnit offsetUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units for the line's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
%Docstring
 | 
						|
Sets the map unit ``scale`` for the line's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    const QgsMapUnitScale &offsetMapUnitScale() const;
 | 
						|
%Docstring
 | 
						|
Returns the map unit scale for the line's offset.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOffsetMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offset`
 | 
						|
 | 
						|
.. seealso:: :py:func:`offsetUnit`
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    void setWidthUnit( Qgis::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the units for the line's width.
 | 
						|
 | 
						|
:param unit: width units
 | 
						|
 | 
						|
.. seealso:: :py:func:`widthUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    Qgis::RenderUnit widthUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units for the line's width.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setWidthUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    void setWidthMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
    const QgsMapUnitScale &widthMapUnitScale() const;
 | 
						|
 | 
						|
    RenderRingFilter ringFilter() const;
 | 
						|
%Docstring
 | 
						|
Returns the line symbol layer's ring filter, which controls which rings are
 | 
						|
rendered when the line symbol is being used to draw a polygon's rings.
 | 
						|
 | 
						|
This setting has no effect when the line symbol is not being rendered
 | 
						|
for a polygon.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setRingFilter`
 | 
						|
 | 
						|
.. versionadded:: 3.6
 | 
						|
%End
 | 
						|
 | 
						|
    void setRingFilter( QgsLineSymbolLayer::RenderRingFilter filter );
 | 
						|
%Docstring
 | 
						|
Sets the line symbol layer's ring ``filter``, which controls which rings are
 | 
						|
rendered when the line symbol is being used to draw a polygon's rings.
 | 
						|
 | 
						|
This setting has no effect when the line symbol is not being rendered
 | 
						|
for a polygon.
 | 
						|
 | 
						|
.. seealso:: :py:func:`ringFilter`
 | 
						|
 | 
						|
.. versionadded:: 3.6
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
    QgsLineSymbolLayer( bool locked = false );
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  private:
 | 
						|
    QgsLineSymbolLayer( const QgsLineSymbolLayer &other );
 | 
						|
};
 | 
						|
 | 
						|
class QgsFillSymbolLayer : QgsSymbolLayer
 | 
						|
{
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgssymbollayer.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) = 0;
 | 
						|
%Docstring
 | 
						|
Renders the fill symbol layer for the polygon whose outer ring is defined by ``points``, using the given render ``context``.
 | 
						|
 | 
						|
The ``rings`` argument optionally specifies a list of polygon rings to render as holes.
 | 
						|
%End
 | 
						|
 | 
						|
    virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size );
 | 
						|
 | 
						|
 | 
						|
    void setAngle( double angle );
 | 
						|
%Docstring
 | 
						|
Sets the rotation ``angle`` of the pattern, in degrees clockwise.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   Not all fill symbol layers support rotation.
 | 
						|
 | 
						|
.. seealso:: :py:func:`angle`
 | 
						|
%End
 | 
						|
 | 
						|
    double angle() const;
 | 
						|
%Docstring
 | 
						|
Returns the rotation angle of the fill symbol, in degrees clockwise.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   Not all fill symbol layers support rotation.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAngle`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QImage toTiledPatternImage( ) const;
 | 
						|
%Docstring
 | 
						|
Renders the symbol layer as an image that can be used as a seamless pattern fill
 | 
						|
for polygons, this method is used by SLD export to generate image tiles for
 | 
						|
ExternalGraphic polygon fills.
 | 
						|
 | 
						|
The default implementation returns a null image.
 | 
						|
 | 
						|
:return: the tile image (not necessarily a square) or a null image if not implemented.
 | 
						|
 | 
						|
.. versionadded:: 3.30
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
    QgsFillSymbolLayer( bool locked = false );
 | 
						|
    void _renderPolygon( QPainter *p, const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );
 | 
						|
%Docstring
 | 
						|
Default method to render polygon
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
  private:
 | 
						|
    QgsFillSymbolLayer( const QgsFillSymbolLayer &other );
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/symbology/qgssymbollayer.h                                  *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |