QGIS/python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in

2809 lines
72 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgsfillsymbollayer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer
{
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsSimpleFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR,
Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
const QColor &strokeColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
Qt::PenStyle strokeStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
double strokeWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
);
~QgsSimpleFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSimpleFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsSimpleFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
virtual QString layerType() 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;
Qt::BrushStyle brushStyle() const;
void setBrushStyle( Qt::BrushStyle style );
virtual QColor strokeColor() const;
virtual void setStrokeColor( const QColor &strokeColor );
virtual QColor fillColor() const;
virtual void setFillColor( const QColor &color );
Qt::PenStyle strokeStyle() const;
void setStrokeStyle( Qt::PenStyle strokeStyle );
double strokeWidth() const;
void setStrokeWidth( double strokeWidth );
Qt::PenJoinStyle penJoinStyle() const;
void setPenJoinStyle( Qt::PenJoinStyle style );
void setOffset( QPointF offset );
%Docstring
Sets an ``offset`` by which polygons will be translated during rendering.
Units are specified by :py:func:`~QgsSimpleFillSymbolLayer.offsetUnit`.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
%End
QPointF offset() const;
%Docstring
Returns the offset by which polygons will be translated during rendering.
Units are specified by :py:func:`~QgsSimpleFillSymbolLayer.offsetUnit`.
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
%End
void setStrokeWidthUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the width of the fill's stroke.
:param unit: width units
.. seealso:: :py:func:`strokeWidthUnit`
%End
Qgis::RenderUnit strokeWidthUnit() const;
%Docstring
Returns the units for the width of the fill's stroke.
.. seealso:: :py:func:`setStrokeWidthUnit`
%End
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &strokeWidthMapUnitScale() const;
void setOffsetUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the fill's offset.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`offsetUnit`
%End
Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units for the fill's offset.
.. seealso:: :py:func:`setOffsetUnit`
.. seealso:: :py:func:`offset`
%End
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the fill's offset.
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetMapUnitScale`
%End
const QgsMapUnitScale &offsetMapUnitScale() const;
%Docstring
Returns the map unit scale for the fill's offset.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetMapUnitScale`
%End
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
virtual double dxfAngle( QgsSymbolRenderContext &context ) const;
virtual Qt::PenStyle dxfPenStyle() const;
virtual QColor dxfBrushColor( QgsSymbolRenderContext &context ) const;
virtual Qt::BrushStyle dxfBrushStyle() const;
virtual QImage toTiledPatternImage( ) const;
protected:
};
class QgsGradientFillSymbolLayer : QgsFillSymbolLayer
{
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsGradientFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR,
const QColor &color2 = Qt::white,
Qgis::GradientColorSource gradientColorType = Qgis::GradientColorSource::SimpleTwoColor,
Qgis::GradientType gradientType = Qgis::GradientType::Linear,
Qgis::SymbolCoordinateReference coordinateMode = Qgis::SymbolCoordinateReference::Feature,
Qgis::GradientSpread gradientSpread = Qgis::GradientSpread::Pad
);
%Docstring
Constructor for QgsGradientFillSymbolLayer.
%End
~QgsGradientFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsGradientFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsGradientFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
virtual QString layerType() 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 QgsGradientFillSymbolLayer *clone() const /Factory/;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual bool canCauseArtifactsBetweenAdjacentTiles() const;
Qgis::GradientType gradientType() const;
%Docstring
Returns the type of gradient, e.g., linear or radial.
.. seealso:: :py:func:`setGradientType`
%End
void setGradientType( Qgis::GradientType gradientType );
%Docstring
Sets the type of gradient, e.g., linear or radial.
.. seealso:: :py:func:`gradientType`
%End
Qgis::GradientColorSource gradientColorType() const;
%Docstring
Returns the gradient color mode, which controls how gradient color stops are created.
.. seealso:: :py:func:`setGradientColorType`
%End
void setGradientColorType( Qgis::GradientColorSource gradientColorType );
%Docstring
Sets the gradient color mode, which controls how gradient color stops are created.
.. seealso:: :py:func:`gradientColorType`
%End
QgsColorRamp *colorRamp();
%Docstring
Returns the color ramp used for the gradient fill. This is only
used if the gradient color type is set to ColorRamp.
.. seealso:: :py:func:`setColorRamp`
.. seealso:: :py:func:`gradientColorType`
%End
void setColorRamp( QgsColorRamp *ramp /Transfer/ );
%Docstring
Sets the color ramp used for the gradient fill. This is only
used if the gradient color type is set to ColorRamp.
:param ramp: color ramp. Ownership is transferred.
.. seealso:: :py:func:`colorRamp`
.. seealso:: :py:func:`setGradientColorType`
%End
QColor color2() const;
%Docstring
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
.. seealso:: :py:func:`setColor2`
%End
void setColor2( const QColor &color2 );
%Docstring
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
.. seealso:: :py:func:`color2`
%End
Qgis::SymbolCoordinateReference coordinateMode() const;
%Docstring
Returns the coordinate mode for gradient, which controls how the gradient stops are positioned.
.. seealso:: :py:func:`setCoordinateMode`
%End
void setCoordinateMode( Qgis::SymbolCoordinateReference coordinateMode );
%Docstring
Sets the coordinate mode for gradient, which controls how the gradient stops are positioned.
.. seealso:: :py:func:`coordinateMode`
%End
Qgis::GradientSpread gradientSpread() const;
%Docstring
Returns the gradient spread mode, which controls how the gradient behaves outside of the predefined stops.
.. seealso:: :py:func:`setGradientSpread`
%End
void setGradientSpread( Qgis::GradientSpread gradientSpread );
%Docstring
Sets the gradient spread mode, which controls how the gradient behaves outside of the predefined stops.
.. seealso:: :py:func:`gradientSpread`
%End
void setReferencePoint1( QPointF referencePoint );
%Docstring
Sets the starting point of gradient fill, in the range [0,0] - [1,1].
.. seealso:: :py:func:`referencePoint1`
%End
QPointF referencePoint1() const;
%Docstring
Returns the starting point of gradient fill, in the range [0,0] - [1,1].
.. seealso:: :py:func:`setReferencePoint1`
%End
void setReferencePoint1IsCentroid( bool isCentroid );
%Docstring
Sets whether the starting point for the gradient is taken from the feature centroid.
.. seealso:: :py:func:`referencePoint1IsCentroid`
%End
bool referencePoint1IsCentroid() const;
%Docstring
Returns whether the starting point for the gradient is taken from the feature centroid.
.. seealso:: :py:func:`setReferencePoint1IsCentroid`
%End
void setReferencePoint2( QPointF referencePoint );
%Docstring
Sets the end point of gradient fill, in the range [0,0] - [1,1].
.. seealso:: :py:func:`referencePoint2`
%End
QPointF referencePoint2() const;
%Docstring
Returns the end point of gradient fill, in the range [0,0] - [1,1].
.. seealso:: :py:func:`setReferencePoint2`
%End
void setReferencePoint2IsCentroid( bool isCentroid );
%Docstring
Sets whether the end point for the gradient is taken from the feature centroid.
.. seealso:: :py:func:`referencePoint2IsCentroid`
%End
bool referencePoint2IsCentroid() const;
%Docstring
Returns whether the end point for the gradient is taken from the feature centroid.
.. seealso:: :py:func:`setReferencePoint2IsCentroid`
%End
void setOffset( QPointF offset );
%Docstring
Sets an ``offset`` by which polygons will be translated during rendering.
Units are specified by :py:func:`~QgsGradientFillSymbolLayer.offsetUnit`.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
%End
QPointF offset() const;
%Docstring
Returns the offset by which polygons will be translated during rendering.
Units are specified by :py:func:`~QgsGradientFillSymbolLayer.offsetUnit`.
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
%End
void setOffsetUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the fill's offset.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`offsetUnit`
%End
Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units for the fill's offset.
.. seealso:: :py:func:`setOffsetUnit`
.. seealso:: :py:func:`offset`
%End
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the fill's offset.
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetMapUnitScale`
%End
const QgsMapUnitScale &offsetMapUnitScale() const;
%Docstring
Returns the map unit scale for the fill's offset.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetMapUnitScale`
%End
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
protected:
};
class QgsShapeburstFillSymbolLayer : QgsFillSymbolLayer
{
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsShapeburstFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR, const QColor &color2 = Qt::white,
Qgis::GradientColorSource colorType = Qgis::GradientColorSource::SimpleTwoColor,
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
%Docstring
Constructor for QgsShapeburstFillSymbolLayer.
%End
~QgsShapeburstFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsShapeburstFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsShapeburstFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
virtual QString layerType() 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 QgsShapeburstFillSymbolLayer *clone() const /Factory/;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual bool canCauseArtifactsBetweenAdjacentTiles() const;
void setBlurRadius( int blurRadius );
%Docstring
Sets the blur radius, which controls the amount of blurring applied to the fill.
:param blurRadius: Radius for fill blur. Values between 0 - 17 are valid, where higher values results in a stronger blur. Set to 0 to disable blur.
.. seealso:: :py:func:`blurRadius`
.. versionadded:: 2.3
%End
int blurRadius() const;
%Docstring
Returns the blur radius, which controls the amount of blurring applied to the fill.
:return: Integer representing the radius for fill blur. Higher values indicate a stronger blur. A 0 value indicates that blurring is disabled.
.. seealso:: :py:func:`setBlurRadius`
.. versionadded:: 2.3
%End
void setUseWholeShape( bool useWholeShape );
%Docstring
Sets whether the shapeburst fill should be drawn using the entire shape.
:param useWholeShape: Set to ``True`` if shapeburst should cover entire shape. If ``False``, setMaxDistance is used to calculate how far from the boundary of the shape should
be shaded
.. seealso:: :py:func:`useWholeShape`
.. seealso:: :py:func:`setMaxDistance`
.. versionadded:: 2.3
%End
bool useWholeShape() const;
%Docstring
Returns whether the shapeburst fill is set to cover the entire shape.
:return: ``True`` if shapeburst fill will cover the entire shape. If ``False``, shapeburst is drawn to a distance of maxDistance from the polygon's boundary.
.. seealso:: :py:func:`setUseWholeShape`
.. seealso:: :py:func:`maxDistance`
.. versionadded:: 2.3
%End
void setMaxDistance( double maxDistance );
%Docstring
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
:param maxDistance: distance from boundary to shade. setUseWholeShape must be set to ``False`` for this parameter to take effect. Distance unit is controlled by setDistanceUnit.
.. seealso:: :py:func:`maxDistance`
.. seealso:: :py:func:`setUseWholeShape`
.. seealso:: :py:func:`setDistanceUnit`
.. versionadded:: 2.3
%End
double maxDistance() const;
%Docstring
Returns the maximum distance from the shape's boundary which is shaded. This parameter is only effective if useWholeShape is ``False``.
:return: the maximum distance from the polygon's boundary which is shaded. Distance units are indicated by distanceUnit.
.. seealso:: :py:func:`useWholeShape`
.. seealso:: :py:func:`setMaxDistance`
.. seealso:: :py:func:`distanceUnit`
.. versionadded:: 2.3
%End
void setDistanceUnit( Qgis::RenderUnit unit );
%Docstring
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
:param unit: distance unit for the maximum distance
.. seealso:: :py:func:`setMaxDistance`
.. seealso:: :py:func:`distanceUnit`
.. versionadded:: 2.3
%End
Qgis::RenderUnit distanceUnit() const;
%Docstring
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
:return: distance unit for the maximum distance
.. seealso:: :py:func:`maxDistance`
.. seealso:: :py:func:`setDistanceUnit`
.. versionadded:: 2.3
%End
void setDistanceMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &distanceMapUnitScale() const;
void setColorType( Qgis::GradientColorSource colorType );
%Docstring
Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a :py:class:`QgsColorRamp` color ramp
or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.
:param colorType: color type to use for shapeburst fill
.. seealso:: :py:func:`colorType`
.. seealso:: :py:func:`setColor`
.. seealso:: :py:func:`setColor2`
.. seealso:: :py:func:`setColorRamp`
.. versionadded:: 2.3
%End
Qgis::GradientColorSource colorType() const;
%Docstring
Returns the color mode used for the shapeburst fill. Shapeburst can either be drawn using a :py:class:`QgsColorRamp` color ramp
or by simply specificing a start and end color.
:return: current color mode used for the shapeburst fill
.. seealso:: :py:func:`setColorType`
.. seealso:: :py:func:`color`
.. seealso:: :py:func:`color2`
.. seealso:: :py:func:`colorRamp`
.. versionadded:: 2.3
%End
void setColorRamp( QgsColorRamp *ramp /Transfer/ );
%Docstring
Sets the color ``ramp`` used to draw the shapeburst fill. Color ramps are only used if setColorType is set ShapeburstColorType.ColorRamp.
Ownership of ``ramp`` is transferred to the fill.
.. seealso:: :py:func:`setColorType`
.. seealso:: :py:func:`colorRamp`
.. versionadded:: 2.3
%End
QgsColorRamp *colorRamp();
%Docstring
Returns the color ramp used for the shapeburst fill. The color ramp is only used if the colorType is set to ShapeburstColorType.ColorRamp
:return: a :py:class:`QgsColorRamp` color ramp
.. seealso:: :py:func:`setColorRamp`
.. seealso:: :py:func:`colorType`
.. versionadded:: 2.3
%End
void setColor2( const QColor &color2 );
%Docstring
Sets the color for the endpoint of the shapeburst fill. This color is only used if setColorType is set ShapeburstColorType.SimpleTwoColor.
:param color2: QColor to use for endpoint of gradient
.. seealso:: :py:func:`setColorType`
.. seealso:: :py:func:`color2`
.. versionadded:: 2.3
%End
QColor color2() const;
%Docstring
Returns the color used for the endpoint of the shapeburst fill. This color is only used if the colorType is set to ShapeburstColorType.SimpleTwoColor
:return: a QColor indicating the color of the endpoint of the gradient
.. seealso:: :py:func:`setColor2`
.. seealso:: :py:func:`colorType`
.. versionadded:: 2.3
%End
void setIgnoreRings( bool ignoreRings );
%Docstring
Sets whether the shapeburst fill should ignore polygon rings when calculating
the buffered shading.
:param ignoreRings: Set to ``True`` if buffers should ignore interior rings for polygons.
.. seealso:: :py:func:`ignoreRings`
.. versionadded:: 2.3
%End
bool ignoreRings() const;
%Docstring
Returns whether the shapeburst fill is set to ignore polygon interior rings.
:return: ``True`` if the shapeburst fill will ignore interior rings when calculating buffered shading.
.. seealso:: :py:func:`setIgnoreRings`
.. versionadded:: 2.3
%End
void setOffset( QPointF offset );
%Docstring
Sets the offset for the shapeburst fill.
:param offset: QPointF indicating the horizontal/vertical offset amount
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
.. versionadded:: 2.3
%End
QPointF offset() const;
%Docstring
Returns the offset for the shapeburst fill.
:return: a QPointF indicating the horizontal/vertical offset amount
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
.. versionadded:: 2.3
%End
void setOffsetUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units used for the offset for the shapeburst fill.
:param unit: units for fill offset
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
.. versionadded:: 2.3
%End
Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units used for the offset of the shapeburst fill.
:return: units used for the fill offset
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
.. versionadded:: 2.3
%End
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &offsetMapUnitScale() const;
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
private:
QgsShapeburstFillSymbolLayer( const QgsShapeburstFillSymbolLayer &other );
};
class QgsImageFillSymbolLayer: QgsFillSymbolLayer /Abstract/
{
%Docstring(signature="appended")
Base class for polygon renderers generating texture images
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsImageFillSymbolLayer();
~QgsImageFillSymbolLayer();
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );
void setStrokeWidthUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``units`` fo the symbol's stroke width.
.. seealso:: :py:func:`strokeWidthUnit`
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
%End
Qgis::RenderUnit strokeWidthUnit() const;
%Docstring
Returns the units for the symbol's stroke width.
.. seealso:: :py:func:`setStrokeWidthUnit`
.. seealso:: :py:func:`strokeWidthMapUnitScale`
%End
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the stroke width map unit ``scale``.
.. seealso:: :py:func:`strokeWidthMapUnitScale`
.. seealso:: :py:func:`setStrokeWidthUnit`
%End
const QgsMapUnitScale &strokeWidthMapUnitScale() const;
%Docstring
Returns the stroke width map unit scale.
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
.. seealso:: :py:func:`strokeWidthUnit`
.. versionadded:: 2.16
%End
void setCoordinateReference( Qgis::SymbolCoordinateReference coordinateReference );
%Docstring
Sets the coordinate reference mode for fill which controls how the top left corner of the image
fill is positioned relative to the feature.
:param coordinateReference: coordinate reference mode
.. seealso:: :py:func:`coordinateReference`
.. versionadded:: 3.24
%End
Qgis::SymbolCoordinateReference coordinateReference() const;
%Docstring
Returns the coordinate reference mode for fill which controls how the top left corner of the image
fill is positioned relative to the feature.
:return: coordinate reference mode
.. seealso:: :py:func:`setCoordinateReference`
.. versionadded:: 3.24
%End
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual Qt::PenStyle dxfPenStyle() const;
virtual QVariantMap properties() const;
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
%Docstring
Applies data defined settings prior to generating the fill symbol brush.
%End
virtual bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = 0 ) const;
%Docstring
Returns ``True`` if the image brush should be transformed using the render context's texture origin.
.. versionadded:: 3.16
%End
private:
QgsImageFillSymbolLayer( const QgsImageFillSymbolLayer &other );
};
class QgsRasterFillSymbolLayer: QgsImageFillSymbolLayer
{
%Docstring(signature="appended")
A class for filling symbols with a repeated raster image.
.. versionadded:: 2.7
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
%Docstring
Constructor for QgsRasterFillSymbolLayer, using a raster fill from the
specified ``imageFilePath``.
%End
~QgsRasterFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRasterFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsRasterFillSymbolLayer from a SLD ``element``. The caller takes
ownership of the returned object.
.. versionadded:: 3.30
%End
static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
%Docstring
Turns relative paths in properties map to absolute when reading and vice versa when writing.
Used internally when reading/writing symbols.
.. versionadded:: 3.0
%End
virtual QString layerType() const;
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual QVariantMap properties() const;
virtual QgsRasterFillSymbolLayer *clone() const /Factory/;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual bool usesMapUnits() const;
virtual QColor color() const;
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
void setImageFilePath( const QString &imagePath );
%Docstring
Sets the path to the raster image used for the fill.
:param imagePath: path to image file
.. seealso:: :py:func:`imageFilePath`
%End
QString imageFilePath() const;
%Docstring
The path to the raster image used for the fill.
:return: path to image file
.. seealso:: :py:func:`setImageFilePath`
%End
void setCoordinateMode( Qgis::SymbolCoordinateReference mode );
%Docstring
Set the coordinate mode for fill. Controls how the top left corner of the image
fill is positioned relative to the feature.
:param mode: coordinate mode
.. seealso:: :py:func:`coordinateMode`
%End
Qgis::SymbolCoordinateReference coordinateMode() const;
%Docstring
Coordinate mode for fill. Controls how the top left corner of the image
fill is positioned relative to the feature.
:return: coordinate mode
.. seealso:: :py:func:`setCoordinateMode`
%End
void setOpacity( double opacity );
%Docstring
Sets the ``opacity`` for the raster image used in the fill.
:param opacity: opacity value between 0 (fully transparent) and 1 (fully opaque)
.. seealso:: :py:func:`opacity`
%End
double opacity() const;
%Docstring
Returns the opacity for the raster image used in the fill.
:return: opacity value between 0 (fully transparent) and 1 (fully opaque)
.. seealso:: :py:func:`setOpacity`
%End
void setOffset( QPointF offset );
%Docstring
Sets the offset for the fill.
:param offset: offset for fill
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
.. seealso:: :py:func:`setOffsetMapUnitScale`
%End
QPointF offset() const;
%Docstring
Returns the offset for the fill.
:return: offset for fill
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
.. seealso:: :py:func:`offsetMapUnitScale`
%End
void setOffsetUnit( const Qgis::RenderUnit unit );
%Docstring
Sets the units for the fill's offset.
:param unit: units for offset
.. seealso:: :py:func:`offsetUnit`
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`setOffsetMapUnitScale`
%End
Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units for the fill's offset.
:return: units for 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 fill's offset.
:param scale: map unit scale for 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 fill's offset.
:return: map unit scale for offset
.. seealso:: :py:func:`setOffsetMapUnitScale`
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`offsetUnit`
%End
void setWidth( const double width );
%Docstring
Sets the width for scaling the image used in the fill. The image's height will also be
scaled to maintain the image's aspect ratio.
:param width: width for scaling the image
.. seealso:: :py:func:`width`
.. seealso:: :py:func:`setWidthUnit`
.. seealso:: :py:func:`setWidthMapUnitScale`
%End
double width() const;
%Docstring
Returns the width used for scaling the image used in the fill. The image's height is
scaled to maintain the image's aspect ratio.
:return: width used for scaling the image
.. seealso:: :py:func:`setWidth`
.. seealso:: :py:func:`widthUnit`
.. seealso:: :py:func:`widthMapUnitScale`
%End
void setWidthUnit( const Qgis::RenderUnit unit );
%Docstring
Sets the units for the image's width.
:param unit: units for width
.. seealso:: :py:func:`widthUnit`
.. seealso:: :py:func:`setWidth`
.. seealso:: :py:func:`setWidthMapUnitScale`
%End
Qgis::RenderUnit widthUnit() const;
%Docstring
Returns the units for the image's width.
:return: units for width
.. seealso:: :py:func:`setWidthUnit`
.. seealso:: :py:func:`width`
.. seealso:: :py:func:`widthMapUnitScale`
%End
void setWidthMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit scale for the image's width.
:param scale: map unit scale for width
.. seealso:: :py:func:`widthMapUnitScale`
.. seealso:: :py:func:`setWidth`
.. seealso:: :py:func:`setWidthUnit`
%End
const QgsMapUnitScale &widthMapUnitScale() const;
%Docstring
Returns the map unit scale for the image's width.
:return: map unit scale for width
.. seealso:: :py:func:`setWidthMapUnitScale`
.. seealso:: :py:func:`width`
.. seealso:: :py:func:`widthUnit`
%End
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
virtual bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = 0 ) const;
};
class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
{
%Docstring(signature="appended")
A class for filling symbols with a repeated SVG file.
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
%Docstring
Constructor for QgsSVGFillSymbolLayer, using the SVG picture at the specified absolute file path.
%End
QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
%Docstring
Constructor for QgsSVGFillSymbolLayer, using the specified SVG picture data.
%End
~QgsSVGFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSVGFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsSVGFillSymbolLayer from a SLD ``element``. The caller takes
ownership of the returned object.
%End
static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
%Docstring
Turns relative paths in properties map to absolute when reading and vice versa when writing.
Used internally when reading/writing symbols.
.. versionadded:: 3.0
%End
virtual QString layerType() 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 QgsSVGFillSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
virtual bool usesMapUnits() const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
void setSvgFilePath( const QString &svgPath );
%Docstring
Sets the path to the SVG file to render in the fill.
This is usually an absolute file path. Other supported options include
- relative paths to folders from the user's SVG search paths
- base64 encoded content, prefixed with a 'base64:' string
- http(s) paths
.. seealso:: :py:func:`svgFilePath`
%End
QString svgFilePath() const;
%Docstring
Returns the path to the SVG file used to render the fill.
.. seealso:: :py:func:`setSvgFilePath`
%End
void setPatternWidth( double width );
%Docstring
Sets the ``width`` to render the SVG content as within the fill (i.e. the pattern repeat/tile size).
Units are specified by :py:func:`~QgsSVGFillSymbolLayer.setPatternWidthUnit`
.. seealso:: :py:func:`patternWidth`
.. seealso:: :py:func:`setPatternWidthUnit`
.. seealso:: :py:func:`setPatternWidthMapUnitScale`
%End
double patternWidth() const;
%Docstring
Returns the width of the rendered SVG content within the fill (i.e. the pattern repeat/tile size).
Units are retrieved by :py:func:`~QgsSVGFillSymbolLayer.patternWidthUnit`
.. seealso:: :py:func:`setPatternWidth`
.. seealso:: :py:func:`patternWidthUnit`
.. seealso:: :py:func:`patternWidthMapUnitScale`
%End
void setSvgFillColor( const QColor &c );
%Docstring
Sets the fill color used for rendering the SVG content.
Fill color is only supported for parametrized SVG files. Color opacity is
ignored if the SVG file does not support parametrized fill opacity.
.. seealso:: :py:func:`svgFillColor`
.. seealso:: :py:func:`setSvgStrokeColor`
%End
QColor svgFillColor() const;
%Docstring
Returns the fill color used for rendering the SVG content.
Fill color is only supported for parametrized SVG files.
.. seealso:: :py:func:`setSvgFillColor`
.. seealso:: :py:func:`svgStrokeColor`
%End
void setSvgStrokeColor( const QColor &c );
%Docstring
Sets the stroke color used for rendering the SVG content.
Stroke color is only supported for parametrized SVG files. Color opacity is
ignored if the SVG file does not support parametrized outline opacity.
.. seealso:: :py:func:`svgStrokeColor`
.. seealso:: :py:func:`setSvgFillColor`
%End
QColor svgStrokeColor() const;
%Docstring
Returns the stroke color used for rendering the SVG content.
Stroke color is only supported for parametrized SVG files.
.. seealso:: :py:func:`setSvgStrokeColor`
.. seealso:: :py:func:`svgFillColor`
%End
void setSvgStrokeWidth( double w );
%Docstring
Sets the stroke width used for rendering the SVG content.
Stroke width is only supported for parametrized SVG files. Units are
specified via :py:func:`~QgsSVGFillSymbolLayer.setSvgStrokeWidthUnit`
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`setSvgStrokeWidthUnit`
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
%End
double svgStrokeWidth() const;
%Docstring
Returns the stroke width used for rendering the SVG content.
Stroke width is only supported for parametrized SVG files. Units are
retrieved via :py:func:`~QgsSVGFillSymbolLayer.setSvgStrokeWidthUnit`
.. seealso:: :py:func:`setSvgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthUnit`
.. seealso:: :py:func:`svgStrokeWidthMapUnitScale`
%End
void setPatternWidthUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the width of the SVG images in the pattern.
.. seealso:: :py:func:`patternWidthUnit`
.. seealso:: :py:func:`setPatternWidth`
.. seealso:: :py:func:`setPatternWidthMapUnitScale`
%End
Qgis::RenderUnit patternWidthUnit() const;
%Docstring
Returns the units for the width of the SVG images in the pattern.
.. seealso:: :py:func:`setPatternWidthUnit`
.. seealso:: :py:func:`patternWidth`
.. seealso:: :py:func:`patternWidthMapUnitScale`
%End
void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the pattern's width.
.. seealso:: :py:func:`patternWidthMapUnitScale`
.. seealso:: :py:func:`setPatternWidth`
.. seealso:: :py:func:`setPatternWidthUnit`
%End
const QgsMapUnitScale &patternWidthMapUnitScale() const;
%Docstring
Returns the map unit scale for the pattern's width.
.. seealso:: :py:func:`setPatternWidthMapUnitScale`
.. seealso:: :py:func:`patternWidth`
.. seealso:: :py:func:`patternWidthUnit`
%End
void setSvgStrokeWidthUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the stroke width.
.. seealso:: :py:func:`svgStrokeWidthUnit`
.. seealso:: :py:func:`setSvgStrokeWidth`
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
%End
Qgis::RenderUnit svgStrokeWidthUnit() const;
%Docstring
Returns the units for the stroke width.
.. seealso:: :py:func:`setSvgStrokeWidthUnit`
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthMapUnitScale`
%End
void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the pattern's stroke.
.. seealso:: :py:func:`svgStrokeWidthMapUnitScale`
.. seealso:: :py:func:`setSvgStrokeWidth`
.. seealso:: :py:func:`setSvgStrokeWidthUnit`
%End
const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const;
%Docstring
Returns the map unit scale for the pattern's stroke.
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthUnit`
%End
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
QMap<QString, QgsProperty> parameters() const;
%Docstring
Returns the dynamic SVG parameters
.. versionadded:: 3.18
%End
void setParameters( const QMap<QString, QgsProperty> &parameters );
%Docstring
Sets the dynamic SVG parameters
.. versionadded:: 3.18
%End
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
};
class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
{
%Docstring(signature="appended")
A symbol fill consisting of repeated parallel lines.
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsLinePatternFillSymbolLayer();
~QgsLinePatternFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsLinePatternFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsLinePatternFillSymbolLayer from a SLD ``element``. The caller takes
ownership of the returned object.
%End
virtual QString layerType() 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 QgsLinePatternFillSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
virtual QImage toTiledPatternImage( ) const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
void setLineAngle( double a );
%Docstring
Sets the angle for the parallel lines used to fill the symbol.
Angles are in degrees, clockwise from North.
.. seealso:: :py:func:`lineAngle`
%End
double lineAngle() const;
%Docstring
Returns the angle for the parallel lines used to fill the symbol.
Angles are in degrees, clockwise from North.
.. seealso:: :py:func:`setLineAngle`
%End
void setDistance( double d );
%Docstring
Sets the distance between lines in the fill pattern.
:param d: distance. Units are specified by :py:func:`~QgsLinePatternFillSymbolLayer.setDistanceUnit`
.. seealso:: :py:func:`distance`
.. seealso:: :py:func:`setDistanceUnit`
%End
double distance() const;
%Docstring
Returns the distance between lines in the fill pattern. Units are retrieved by :py:func:`~QgsLinePatternFillSymbolLayer.distanceUnit`.
.. seealso:: :py:func:`setDistance`
.. seealso:: :py:func:`distanceUnit`
%End
void setLineWidth( double w );
%Docstring
Sets the width of the line subsymbol used to render the parallel lines
in the fill.
.. seealso:: :py:func:`lineWidth`
%End
double lineWidth() const;
%Docstring
Returns the width of the line subsymbol used to render the parallel lines
in the fill.
.. seealso:: :py:func:`setLineWidth`
%End
virtual void setColor( const QColor &c );
virtual QColor color() const;
void setOffset( double offset );
%Docstring
Sets the ``offset`` distance for lines within the fill, which is
the distance to offset the parallel lines from their normal
position.
Units are specified via :py:func:`~QgsLinePatternFillSymbolLayer.setOffsetUnit`.
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`setOffsetUnit`
.. seealso:: :py:func:`setOffsetMapUnitScale`
%End
double offset() const;
%Docstring
Returns the offset distance for lines within the fill, which is
the distance to offset the parallel lines from their normal
position.
Units are retrieved via :py:func:`~QgsLinePatternFillSymbolLayer.offsetUnit`.
.. seealso:: :py:func:`setOffset`
.. seealso:: :py:func:`offsetUnit`
.. seealso:: :py:func:`offsetMapUnitScale`
%End
void setDistanceUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the distance between lines in the fill pattern.
.. seealso:: :py:func:`distanceUnit`
.. seealso:: :py:func:`setDistance`
%End
Qgis::RenderUnit distanceUnit() const;
%Docstring
Returns the units for the distance between lines in the fill pattern.
.. seealso:: :py:func:`setDistanceUnit`
.. seealso:: :py:func:`distance`
%End
void setDistanceMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the pattern's line distance.
.. seealso:: :py:func:`distanceMapUnitScale`
.. seealso:: :py:func:`setDistance`
.. seealso:: :py:func:`setDistanceUnit`
%End
const QgsMapUnitScale &distanceMapUnitScale() const;
%Docstring
Returns the map unit scale for the pattern's line distance.
.. seealso:: :py:func:`setDistanceMapUnitScale`
.. seealso:: :py:func:`distance`
.. seealso:: :py:func:`distanceUnit`
%End
void setLineWidthUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the line's width.
.. seealso:: :py:func:`lineWidthUnit`
%End
Qgis::RenderUnit lineWidthUnit() const;
%Docstring
Returns the units for the line's width.
.. seealso:: :py:func:`setLineWidthUnit`
%End
void setLineWidthMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the pattern's line width.
.. seealso:: :py:func:`lineWidthMapUnitScale`
.. seealso:: :py:func:`setLineWidth`
.. seealso:: :py:func:`setLineWidthUnit`
%End
const QgsMapUnitScale &lineWidthMapUnitScale() const;
%Docstring
Returns the map unit scale for the pattern's line width.
.. seealso:: :py:func:`setLineWidthMapUnitScale`
.. seealso:: :py:func:`lineWidth`
.. seealso:: :py:func:`lineWidthUnit`
%End
void setOffsetUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the line pattern's offset.
.. seealso:: :py:func:`offsetUnit`
%End
Qgis::RenderUnit offsetUnit() const;
%Docstring
Returns the units for the line pattern's offset.
.. seealso:: :py:func:`setOffsetUnit`
%End
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the pattern's line 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 pattern's line offset.
.. seealso:: :py:func:`setOffsetMapUnitScale`
.. seealso:: :py:func:`offset`
.. seealso:: :py:func:`offsetUnit`
%End
Qgis::LineClipMode clipMode() const;
%Docstring
Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.
.. seealso:: :py:func:`setClipMode`
.. versionadded:: 3.24
%End
void setClipMode( Qgis::LineClipMode mode );
%Docstring
Sets the line clipping ``mode``, which defines how lines are clipped at the edges of shapes.
.. seealso:: :py:func:`clipMode`
.. versionadded:: 3.24
%End
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual QgsSymbol *subSymbol();
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
private:
QgsLinePatternFillSymbolLayer( const QgsLinePatternFillSymbolLayer &other );
};
class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer
{
%Docstring(signature="appended")
A fill symbol layer which fills polygon shapes with repeating marker symbols.
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsPointPatternFillSymbolLayer();
~QgsPointPatternFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsPointPatternFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsPointPatternFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QVariantMap properties() const;
virtual QgsPointPatternFillSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
virtual QImage toTiledPatternImage( ) const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual QgsSymbol *subSymbol();
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
virtual void setColor( const QColor &c );
virtual QColor color() const;
double distanceX() const;
%Docstring
Returns the horizontal distance between rendered markers in the fill.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.distanceXUnit`.
.. seealso:: :py:func:`setDistanceX`
.. seealso:: :py:func:`distanceXUnit`
.. seealso:: :py:func:`distanceXMapUnitScale`
%End
void setDistanceX( double d );
%Docstring
Sets the horizontal distance between rendered markers in the fill.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setDistanceXUnit`.
.. seealso:: :py:func:`distanceX`
.. seealso:: :py:func:`setDistanceXUnit`
.. seealso:: :py:func:`setDistanceXMapUnitScale`
%End
void setDistanceXUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the horizontal distance between points in the pattern.
:param unit: distance units
.. seealso:: :py:func:`distanceXUnit`
.. seealso:: :py:func:`setDistanceYUnit`
%End
Qgis::RenderUnit distanceXUnit() const;
%Docstring
Returns the units for the horizontal distance between points in the pattern.
.. seealso:: :py:func:`setDistanceXUnit`
.. seealso:: :py:func:`distanceYUnit`
%End
void setDistanceXMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the horizontal distance between points in the pattern.
.. seealso:: :py:func:`distanceXMapUnitScale`
.. seealso:: :py:func:`setDistanceX`
%End
const QgsMapUnitScale &distanceXMapUnitScale() const;
%Docstring
Returns the map unit scale for the horizontal distance between points in the pattern.
.. seealso:: :py:func:`setDistanceXMapUnitScale`
.. seealso:: :py:func:`distanceX`
%End
double distanceY() const;
%Docstring
Returns the vertical distance between rendered markers in the fill.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.distanceYUnit`.
.. seealso:: :py:func:`setDistanceY`
.. seealso:: :py:func:`distanceYUnit`
.. seealso:: :py:func:`distanceYMapUnitScale`
%End
void setDistanceY( double d );
%Docstring
Sets the vertical distance between rendered markers in the fill.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setDistanceYUnit`.
.. seealso:: :py:func:`distanceY`
.. seealso:: :py:func:`setDistanceYUnit`
.. seealso:: :py:func:`setDistanceYMapUnitScale`
%End
void setDistanceYUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the vertical distance between points in the pattern.
:param unit: distance units
.. seealso:: :py:func:`distanceYUnit`
.. seealso:: :py:func:`setDistanceXUnit`
%End
Qgis::RenderUnit distanceYUnit() const;
%Docstring
Returns the units for the vertical distance between points in the pattern.
.. seealso:: :py:func:`setDistanceYUnit`
.. seealso:: :py:func:`distanceXUnit`
%End
void setDistanceYMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the vertical distance between points in the pattern.
.. seealso:: :py:func:`distanceYMapUnitScale`
.. seealso:: :py:func:`setDistanceY`
%End
const QgsMapUnitScale &distanceYMapUnitScale() const;
%Docstring
Returns the map unit scale for the vertical distance between points in the pattern.
.. seealso:: :py:func:`setDistanceYMapUnitScale`
.. seealso:: :py:func:`distanceY`
%End
double displacementX() const;
%Docstring
Returns the horizontal displacement for odd numbered rows in the pattern.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.displacementXUnit`.
.. seealso:: :py:func:`setDisplacementX`
.. seealso:: :py:func:`displacementXUnit`
.. seealso:: :py:func:`displacementXMapUnitScale`
%End
void setDisplacementX( double d );
%Docstring
Sets the horizontal displacement for odd numbered rows in the pattern.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setDisplacementXUnit`.
.. seealso:: :py:func:`displacementX`
.. seealso:: :py:func:`setDisplacementXUnit`
.. seealso:: :py:func:`setDisplacementXMapUnitScale`
%End
void setDisplacementXUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the horizontal displacement between rows in the pattern.
:param unit: displacement units
.. seealso:: :py:func:`displacementXUnit`
.. seealso:: :py:func:`setDisplacementYUnit`
%End
Qgis::RenderUnit displacementXUnit() const;
%Docstring
Returns the units for the horizontal displacement between rows in the pattern.
.. seealso:: :py:func:`setDisplacementXUnit`
.. seealso:: :py:func:`displacementYUnit`
%End
void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the horizontal displacement between odd numbered rows in the pattern.
.. seealso:: :py:func:`displacementXMapUnitScale`
.. seealso:: :py:func:`setDisplacementX`
%End
const QgsMapUnitScale &displacementXMapUnitScale() const;
%Docstring
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
.. seealso:: :py:func:`setDisplacementXMapUnitScale`
.. seealso:: :py:func:`displacementX`
%End
double displacementY() const;
%Docstring
Returns the vertical displacement for odd numbered columns in the pattern.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.displacementYUnit`.
.. seealso:: :py:func:`setDisplacementY`
.. seealso:: :py:func:`displacementYUnit`
.. seealso:: :py:func:`displacementYMapUnitScale`
%End
void setDisplacementY( double d );
%Docstring
Sets the vertical displacement for odd numbered columns in the pattern.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setDisplacementYUnit`.
.. seealso:: :py:func:`displacementY`
.. seealso:: :py:func:`setDisplacementYUnit`
.. seealso:: :py:func:`setDisplacementYMapUnitScale`
%End
void setDisplacementYUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the vertical displacement between rows in the pattern.
:param unit: displacement units
.. seealso:: :py:func:`displacementYUnit`
.. seealso:: :py:func:`setDisplacementXUnit`
%End
Qgis::RenderUnit displacementYUnit() const;
%Docstring
Returns the units for the vertical displacement between rows in the pattern.
.. seealso:: :py:func:`setDisplacementYUnit`
.. seealso:: :py:func:`displacementXUnit`
%End
void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the vertical displacement between odd numbered columns in the pattern.
.. seealso:: :py:func:`displacementYMapUnitScale`
.. seealso:: :py:func:`setDisplacementY`
%End
const QgsMapUnitScale &displacementYMapUnitScale() const;
%Docstring
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
.. seealso:: :py:func:`setDisplacementYMapUnitScale`
.. seealso:: :py:func:`displacementY`
%End
void setOffsetX( double offset );
%Docstring
Sets the horizontal offset values for points in the pattern.
:param offset: offset value
.. seealso:: :py:func:`offsetX`
.. seealso:: :py:func:`setOffsetY`
.. versionadded:: 3.8
%End
double offsetX() const;
%Docstring
Returns the horizontal offset values for points in the pattern.
.. seealso:: :py:func:`setOffsetX`
.. seealso:: :py:func:`offsetY`
.. versionadded:: 3.8
%End
void setOffsetY( double offset );
%Docstring
Sets the vertical offset values for points in the pattern.
:param offset: offset value
.. seealso:: :py:func:`offsetY`
.. seealso:: :py:func:`setOffsetX`
.. versionadded:: 3.8
%End
double offsetY() const;
%Docstring
Returns the vertical offset values for points in the pattern.
.. seealso:: :py:func:`setOffsetY`
.. seealso:: :py:func:`offsetX`
.. versionadded:: 3.8
%End
void setOffsetXUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the horizontal offset between rows in the pattern.
:param unit: offset units
.. seealso:: :py:func:`offsetXUnit`
.. seealso:: :py:func:`setOffsetYUnit`
.. versionadded:: 3.8
%End
Qgis::RenderUnit offsetXUnit() const;
%Docstring
Returns the units for the horizontal offset for rows in the pattern.
.. seealso:: :py:func:`setOffsetXUnit`
.. seealso:: :py:func:`offsetYUnit`
.. versionadded:: 3.8
%End
void setOffsetXMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the unit scale for the horizontal offset for rows in the pattern.
:param scale: offset unit scale
.. seealso:: :py:func:`offsetXMapUnitScale`
.. seealso:: :py:func:`setOffsetYMapUnitScale`
.. versionadded:: 3.8
%End
const QgsMapUnitScale &offsetXMapUnitScale() const;
%Docstring
Returns the unit scale for the horizontal offset for rows in the pattern.
.. seealso:: :py:func:`setOffsetXMapUnitScale`
.. seealso:: :py:func:`offsetYMapUnitScale`
.. versionadded:: 3.8
%End
void setOffsetYUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the vertical offset for rows in the pattern.
:param unit: offset units
.. seealso:: :py:func:`offsetYUnit`
.. seealso:: :py:func:`setOffsetXUnit`
.. versionadded:: 3.8
%End
Qgis::RenderUnit offsetYUnit() const;
%Docstring
Returns the units for the vertical offset for rows in the pattern.
.. seealso:: :py:func:`setOffsetYUnit`
.. seealso:: :py:func:`offsetXUnit`
.. versionadded:: 3.8
%End
void setOffsetYMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the unit scale for the vertical offset for rows in the pattern.
:param scale: offset unit scale
.. seealso:: :py:func:`offsetYMapUnitScale`
.. seealso:: :py:func:`setOffsetXMapUnitScale`
.. versionadded:: 3.8
%End
const QgsMapUnitScale &offsetYMapUnitScale() const;
%Docstring
Returns the unit scale for the vertical offset between rows in the pattern.
.. seealso:: :py:func:`setOffsetYMapUnitScale`
.. seealso:: :py:func:`offsetXMapUnitScale`
.. versionadded:: 3.8
%End
Qgis::MarkerClipMode clipMode() const;
%Docstring
Returns the marker clipping mode, which defines how markers are clipped at the edges of shapes.
.. seealso:: :py:func:`setClipMode`
.. versionadded:: 3.24
%End
void setClipMode( Qgis::MarkerClipMode mode );
%Docstring
Sets the marker clipping ``mode``, which defines how markers are clipped at the edges of shapes.
.. seealso:: :py:func:`clipMode`
.. versionadded:: 3.24
%End
void setMaximumRandomDeviationX( double deviation );
%Docstring
Sets the maximum horizontal random ``deviation`` of points in the pattern.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setMaximumRandomDeviationXUnit`.
.. seealso:: :py:func:`maximumRandomDeviationX`
.. seealso:: :py:func:`setMaximumRandomDeviationY`
.. versionadded:: 3.24
%End
double maximumRandomDeviationX() const;
%Docstring
Returns the maximum horizontal random deviation of points in the pattern.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.maximumRandomDeviationXUnit`.
.. seealso:: :py:func:`setMaximumRandomDeviationX`
.. seealso:: :py:func:`maximumRandomDeviationY`
.. versionadded:: 3.24
%End
void setMaximumRandomDeviationY( double deviation );
%Docstring
Sets the maximum vertical random ``deviation`` of points in the pattern.
Units are set via :py:func:`~QgsPointPatternFillSymbolLayer.setMaximumRandomDeviationYUnit`.
.. seealso:: :py:func:`maximumRandomDeviationY`
.. seealso:: :py:func:`setMaximumRandomDeviationX`
.. versionadded:: 3.24
%End
double maximumRandomDeviationY() const;
%Docstring
Returns the maximum vertical random deviation of points in the pattern.
Units are retrieved via :py:func:`~QgsPointPatternFillSymbolLayer.maximumRandomDeviationYUnit`.
.. seealso:: :py:func:`setMaximumRandomDeviationY`
.. seealso:: :py:func:`maximumRandomDeviationX`
.. versionadded:: 3.24
%End
void setRandomDeviationXUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the horizontal random deviation of points in the pattern.
.. seealso:: :py:func:`randomDeviationXUnit`
.. seealso:: :py:func:`setRandomDeviationYUnit`
.. versionadded:: 3.24
%End
Qgis::RenderUnit randomDeviationXUnit() const;
%Docstring
Returns the units for the horizontal random deviation of points in the pattern.
.. seealso:: :py:func:`setRandomDeviationXUnit`
.. seealso:: :py:func:`randomDeviationYUnit`
.. versionadded:: 3.24
%End
void setRandomDeviationYUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the vertical random deviation of points in the pattern.
.. seealso:: :py:func:`randomDeviationYUnit`
.. seealso:: :py:func:`setRandomDeviationXUnit`
.. versionadded:: 3.24
%End
Qgis::RenderUnit randomDeviationYUnit() const;
%Docstring
Returns the units for the vertical random deviation of points in the pattern.
.. seealso:: :py:func:`setRandomDeviationYUnit`
.. seealso:: :py:func:`randomDeviationXUnit`
.. versionadded:: 3.24
%End
const QgsMapUnitScale &randomDeviationXMapUnitScale() const;
%Docstring
Returns the unit scale for the horizontal random deviation of points in the pattern.
.. seealso:: :py:func:`setRandomDeviationXMapUnitScale`
.. seealso:: :py:func:`randomDeviationYMapUnitScale`
.. versionadded:: 3.24
%End
const QgsMapUnitScale &randomDeviationYMapUnitScale() const;
%Docstring
Returns the unit scale for the vertical random deviation of points in the pattern.
.. seealso:: :py:func:`setRandomDeviationXMapUnitScale`
.. seealso:: :py:func:`randomDeviationXMapUnitScale`
.. versionadded:: 3.24
%End
void setRandomDeviationXMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the unit ``scale`` for the horizontal random deviation of points in the pattern.
.. seealso:: :py:func:`randomDeviationXMapUnitScale`
.. seealso:: :py:func:`setRandomDeviationYMapUnitScale`
.. versionadded:: 3.24
%End
void setRandomDeviationYMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the unit ``scale`` for the vertical random deviation of points in the pattern.
.. seealso:: :py:func:`randomDeviationYMapUnitScale`
.. seealso:: :py:func:`setRandomDeviationXMapUnitScale`
.. versionadded:: 3.24
%End
unsigned long seed() const;
%Docstring
Returns the random number seed to use when randomly shifting points, or 0 if
a truly random sequence will be used (causing points to appear in different locations with every map refresh).
.. seealso:: :py:func:`setSeed`
.. versionadded:: 3.24
%End
void setSeed( unsigned long seed );
%Docstring
Sets the random number ``seed`` to use when randomly shifting points, or 0 if
a truly random sequence will be used on every rendering (causing points to appear
in different locations with every map refresh).
.. seealso:: :py:func:`seed`
.. versionadded:: 3.24
%End
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
private:
QgsPointPatternFillSymbolLayer( const QgsPointPatternFillSymbolLayer &other );
};
class QgsRandomMarkerFillSymbolLayer : QgsFillSymbolLayer
{
%Docstring(signature="appended")
A fill symbol layer which places markers at random locations within polygons.
.. versionadded:: 3.12
%End
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsRandomMarkerFillSymbolLayer( int pointCount = 10, Qgis::PointCountMethod method = Qgis::PointCountMethod::Absolute, double densityArea = 250.0, unsigned long seed = 0 );
%Docstring
Constructor for QgsRandomMarkerFillSymbolLayer, with the specified ``pointCount``.
Optionally a specific random number ``seed`` can be used when generating points. A ``seed`` of 0 indicates that
a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.
%End
~QgsRandomMarkerFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRandomMarkerFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsRandomMarkerFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
virtual QString layerType() 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 QgsRandomMarkerFillSymbolLayer *clone() const /Factory/;
virtual bool canCauseArtifactsBetweenAdjacentTiles() const;
virtual void setColor( const QColor &color );
virtual QColor color() const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
int pointCount() const;
%Docstring
Returns the count of random points to render in the fill.
.. seealso:: :py:func:`setPointCount`
%End
void setPointCount( int count );
%Docstring
Sets the ``count`` of random points to render in the fill.
.. seealso:: :py:func:`pointCount`
%End
unsigned long seed() const;
%Docstring
Returns the random number seed to use when generating points, or 0 if
a truly random sequence will be used (causing points to appear in different locations with every map refresh).
.. seealso:: :py:func:`setSeed`
%End
void setSeed( unsigned long seed );
%Docstring
Sets the random number ``seed`` to use when generating points, or 0 if
a truly random sequence will be used on every rendering (causing points to appear
in different locations with every map refresh).
.. seealso:: :py:func:`seed`
%End
bool clipPoints() const;
%Docstring
Returns ``True`` if point markers should be clipped to the polygon boundary.
.. seealso:: :py:func:`setClipPoints`
%End
void setClipPoints( bool clipped );
%Docstring
Sets whether point markers should be ``clipped`` to the polygon boundary.
.. seealso:: :py:func:`clipPoints`
%End
Qgis::PointCountMethod countMethod() const;
%Docstring
Returns the count method used to randomly fill the polygon.
.. seealso:: :py:func:`setCountMethod`
%End
void setCountMethod( Qgis::PointCountMethod method );
%Docstring
Sets the count ``method`` used to randomly fill the polygon.
.. seealso:: :py:func:`countMethod`
%End
double densityArea() const;
%Docstring
Returns the density area used to count the number of points to randomly fill the polygon.
Only used when the count method is set to QgsRandomMarkerFillSymbolLayer.DensityBasedCount.
Units are specified by :py:func:`~QgsRandomMarkerFillSymbolLayer.setDensityAreaUnit`.
.. seealso:: :py:func:`setDensityArea`
%End
void setDensityArea( double area );
%Docstring
Sets the density ``area`` used to count the number of points to randomly fill the polygon.
.. seealso:: :py:func:`densityArea`
%End
void setDensityAreaUnit( Qgis::RenderUnit unit );
%Docstring
Sets the units for the density area.
:param unit: width units
.. seealso:: :py:func:`densityAreaUnit`
%End
Qgis::RenderUnit densityAreaUnit() const;
%Docstring
Returns the units for the density area.
.. seealso:: :py:func:`setDensityAreaUnit`
%End
void setDensityAreaUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map scale for the density area.
:param scale: density area map unit scale
.. seealso:: :py:func:`densityAreaUnitScale`
.. seealso:: :py:func:`setDensityArea`
.. seealso:: :py:func:`setDensityAreaUnit`
%End
const QgsMapUnitScale &densityAreaUnitScale() const;
%Docstring
Returns the map scale for the density area.
.. seealso:: :py:func:`setDensityAreaUnitScale`
.. seealso:: :py:func:`densityArea`
.. seealso:: :py:func:`densityAreaUnit`
%End
virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
private:
QgsRandomMarkerFillSymbolLayer( const QgsRandomMarkerFillSymbolLayer &other );
};
class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
{
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
QgsCentroidFillSymbolLayer();
~QgsCentroidFillSymbolLayer();
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsCentroidFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsCentroidFillSymbolLayer.properties`).
Caller takes ownership of the returned symbol layer.
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
virtual QString layerType() 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 QgsCentroidFillSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const;
virtual void setColor( const QColor &color );
virtual QColor color() const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setOutputUnit( Qgis::RenderUnit unit );
virtual Qgis::RenderUnit outputUnit() const;
virtual bool usesMapUnits() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
virtual bool canCauseArtifactsBetweenAdjacentTiles() const;
void setPointOnSurface( bool pointOnSurface );
bool pointOnSurface() const;
void setPointOnAllParts( bool pointOnAllParts );
%Docstring
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
.. seealso:: :py:func:`pointOnAllParts`
.. versionadded:: 2.16
%End
bool pointOnAllParts() const;
%Docstring
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
.. seealso:: :py:func:`setPointOnAllParts`
.. versionadded:: 2.16
%End
bool clipPoints() const;
%Docstring
Returns ``True`` if point markers should be clipped to the polygon boundary.
.. seealso:: :py:func:`setClipPoints`
.. versionadded:: 3.14
%End
void setClipPoints( bool clipPoints );
%Docstring
Sets whether point markers should be ``clipped`` to the polygon boundary.
.. seealso:: :py:func:`clipPoints`
.. versionadded:: 3.14
%End
bool clipOnCurrentPartOnly() const;
%Docstring
Returns ``True`` if point markers should be clipped to the current part boundary only.
.. seealso:: :py:func:`setClipPoints`
.. versionadded:: 3.14
%End
void setClipOnCurrentPartOnly( bool clipOnCurrentPartOnly );
%Docstring
Sets whether point markers should be ``clipped`` to the current part boundary only.
.. seealso:: :py:func:`clipOnCurrentPartOnly`
.. versionadded:: 3.14
%End
virtual void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
virtual void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context );
protected:
private:
QgsCentroidFillSymbolLayer( const QgsCentroidFillSymbolLayer &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgsfillsymbollayer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/