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

1731 lines
43 KiB
Plaintext
Raw Normal View History

2017-06-06 11:03:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgsfillsymbollayer.h *
2017-06-06 11:03:05 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-06 11:01:42 +02:00
class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
2017-06-06 11:03:05 +02:00
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
);
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-06 11:03:05 +02:00
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
2017-06-06 11:03:05 +02:00
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsSimpleFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
2013-06-23 16:00:16 +02:00
Qt::BrushStyle brushStyle() const;
void setBrushStyle( Qt::BrushStyle style );
2017-06-06 11:03:05 +02:00
virtual QColor strokeColor() const;
virtual void setStrokeColor( const QColor &strokeColor );
2014-01-26 18:35:21 +01:00
2017-06-06 11:03:05 +02:00
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 );
QPointF offset();
void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the width of the fill's stroke.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: width units
.. seealso:: :py:func:`strokeWidthUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit strokeWidthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the width of the fill's stroke.
.. seealso:: :py:func:`setStrokeWidthUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &strokeWidthMapUnitScale() const;
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the fill's offset.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: offset units
.. seealso:: :py:func:`offsetUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit offsetUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the fill's offset.
.. seealso:: :py:func:`setOffsetUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &offsetMapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() 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;
2017-06-06 11:03:05 +02:00
protected:
2014-01-26 18:35:21 +01:00
};
2017-06-06 11:03:05 +02:00
2016-08-06 11:01:42 +02:00
class QgsGradientFillSymbolLayer : QgsFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
2014-05-27 23:22:50 +02:00
enum GradientColorType
{
SimpleTwoColor,
ColorRamp
};
enum GradientType
{
Linear,
Radial,
Conical
};
enum GradientCoordinateMode
{
Feature,
Viewport
};
enum GradientSpread
{
Pad,
Reflect,
Repeat
};
2017-06-06 11:03:05 +02:00
QgsGradientFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR,
const QColor &color2 = Qt::white,
GradientColorType gradientColorType = SimpleTwoColor,
GradientType gradientType = Linear,
GradientCoordinateMode coordinateMode = Feature,
GradientSpread gradientSpread = Pad
);
2014-01-27 09:22:24 +01:00
~QgsGradientFillSymbolLayer();
2014-01-27 09:22:24 +01:00
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual QgsStringMap properties() const;
virtual QgsGradientFillSymbolLayer *clone() const /Factory/;
2014-01-27 09:22:24 +01:00
2017-06-06 11:03:05 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
GradientType gradientType() const;
2017-06-06 11:03:05 +02:00
%Docstring
Type of gradient, e.g., linear or radial
%End
void setGradientType( GradientType gradientType );
GradientColorType gradientColorType() const;
2017-06-06 11:03:05 +02:00
%Docstring
Gradient color mode, controls how gradient color stops are created
%End
void setGradientColorType( GradientColorType gradientColorType );
QgsColorRamp *colorRamp();
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`gradientColorType`
2017-06-06 11:03:05 +02:00
%End
void setColorRamp( QgsColorRamp *ramp );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color ramp used for the gradient fill. This is only
used if the gradient color type is set to ColorRamp.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param ramp: color ramp. Ownership is transferred.
.. seealso:: :py:func:`colorRamp`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setGradientColorType`
2017-06-06 11:03:05 +02:00
%End
QColor color2() const;
2017-06-06 11:03:05 +02:00
%Docstring
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor
%End
void setColor2( const QColor &color2 );
GradientCoordinateMode coordinateMode() const;
2017-06-06 11:03:05 +02:00
%Docstring
Coordinate mode for gradient. Controls how the gradient stops are positioned.
%End
void setCoordinateMode( GradientCoordinateMode coordinateMode );
GradientSpread gradientSpread() const;
2017-06-06 11:03:05 +02:00
%Docstring
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops
%End
void setGradientSpread( GradientSpread gradientSpread );
void setReferencePoint1( QPointF referencePoint );
2017-06-06 11:03:05 +02:00
%Docstring
Starting point of gradient fill, in the range [0,0] - [1,1]
%End
QPointF referencePoint1() const;
void setReferencePoint1IsCentroid( bool isCentroid );
2017-06-06 11:03:05 +02:00
%Docstring
Sets the starting point of the gradient to be the feature centroid
%End
bool referencePoint1IsCentroid() const;
void setReferencePoint2( QPointF referencePoint );
2017-06-06 11:03:05 +02:00
%Docstring
End point of gradient fill, in the range [0,0] - [1,1]
%End
QPointF referencePoint2() const;
void setReferencePoint2IsCentroid( bool isCentroid );
2017-06-06 11:03:05 +02:00
%Docstring
Sets the end point of the gradient to be the feature centroid
%End
bool referencePoint2IsCentroid() const;
void setOffset( QPointF offset );
2017-06-06 11:03:05 +02:00
%Docstring
Offset for gradient fill
%End
QPointF offset() const;
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
Units for gradient fill offset
%End
QgsUnitTypes::RenderUnit offsetUnit() const;
2017-06-06 11:03:05 +02:00
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &offsetMapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
protected:
2014-04-06 21:14:02 +02:00
};
2016-08-06 11:01:42 +02:00
class QgsShapeburstFillSymbolLayer : QgsFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
2014-05-27 23:22:50 +02:00
enum ShapeburstColorType
{
SimpleTwoColor,
ColorRamp
};
2017-06-06 11:03:05 +02:00
QgsShapeburstFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR, const QColor &color2 = Qt::white,
ShapeburstColorType colorType = SimpleTwoColor,
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
~QgsShapeburstFillSymbolLayer();
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual QgsStringMap properties() const;
virtual QgsShapeburstFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
void setBlurRadius( int blurRadius );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the blur radius, which controls the amount of blurring applied to the fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
: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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blurRadius`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
int blurRadius() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBlurRadius`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setUseWholeShape( bool useWholeShape );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the shapeburst fill should be drawn using the entire shape.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
: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
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`useWholeShape`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMaxDistance`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
bool useWholeShape() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setUseWholeShape`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`maxDistance`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setMaxDistance( double maxDistance );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
: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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`maxDistance`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setUseWholeShape`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setDistanceUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
double maxDistance() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`useWholeShape`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMaxDistance`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`distanceUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setDistanceUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: distance unit for the maximum distance
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMaxDistance`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`distanceUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit distanceUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`maxDistance`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setDistanceUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setDistanceMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &distanceMapUnitScale() const;
void setColorType( ShapeburstColorType colorType );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a QgsColorRamp color ramp
or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param colorType: color type to use for shapeburst fill
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`colorType`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColor`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColor2`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColorRamp`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
ShapeburstColorType colorType() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the color mode used for the shapeburst fill. Shapeburst can either be drawn using a QgsColorRamp color ramp
or by simply specificing a start and end color.
:return: current color mode used for the shapeburst fill
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColorType`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`color`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`color2`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`colorRamp`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setColorRamp( QgsColorRamp *ramp );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color ramp used to draw the shapeburst fill. Color ramps are only used if setColorType is set ShapeburstColorType.ColorRamp.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param ramp: color ramp to use for shapeburst fill
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColorType`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`colorRamp`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
QgsColorRamp *colorRamp();
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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 QgsColorRamp color ramp
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColorRamp`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`colorType`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setColor2( const QColor &color2 );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color for the endpoint of the shapeburst fill. This color is only used if setColorType is set ShapeburstColorType.SimpleTwoColor.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color2: QColor to use for endpoint of gradient
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColorType`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`color2`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
QColor color2() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setColor2`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`colorType`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setIgnoreRings( bool ignoreRings );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the shapeburst fill should ignore polygon rings when calculating
the buffered shading.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param ignoreRings: Set to true if buffers should ignore interior rings for polygons.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`ignoreRings`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
bool ignoreRings() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setIgnoreRings`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setOffset( QPointF offset );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the offset for the shapeburst fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offset: QPointF indicating the horizontal/vertical offset amount
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
QPointF offset() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the offset for the shapeburst fill.
:return: a QPointF indicating the horizontal/vertical offset amount
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units used for the offset for the shapeburst fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: units for fill offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit offsetUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units used for the offset of the shapeburst fill.
:return: units used for the fill offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetUnit`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &offsetMapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
private:
QgsShapeburstFillSymbolLayer( const QgsShapeburstFillSymbolLayer &other );
};
2016-08-06 11:01:42 +02:00
class QgsImageFillSymbolLayer: QgsFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Base class for polygon renderers generating texture images*
%End
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
2017-06-06 11:03:05 +02:00
QgsImageFillSymbolLayer();
2017-06-06 11:03:05 +02:00
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2018-10-15 09:38:58 +10:00
Sets the ``units`` fo the symbol's stroke width.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`strokeWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit strokeWidthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the symbol's stroke width.
.. seealso:: :py:func:`setStrokeWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`strokeWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
2018-10-15 09:38:58 +10:00
%Docstring
Sets the stroke width map unit ``scale``.
.. seealso:: :py:func:`strokeWidthMapUnitScale`
.. seealso:: :py:func:`setStrokeWidth`
.. seealso:: :py:func:`setStrokeWidthUnit`
%End
const QgsMapUnitScale &strokeWidthMapUnitScale() const;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the stroke width map unit scale.
.. seealso:: :py:func:`setStrokeWidthMapUnitScale`
.. seealso:: :py:func:`strokeWidth`
.. seealso:: :py:func:`strokeWidthUnit`
.. versionadded:: 2.16
%End
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
2017-06-06 11:03:05 +02:00
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
2017-06-06 11:03:05 +02:00
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
2017-06-06 11:03:05 +02:00
2014-01-27 09:22:24 +01:00
virtual Qt::PenStyle dxfPenStyle() const;
2017-06-06 11:03:05 +02:00
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
protected:
2017-06-06 11:03:05 +02:00
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
%Docstring
Custom stroke
%End
private:
QgsImageFillSymbolLayer( const QgsImageFillSymbolLayer &other );
};
class QgsRasterFillSymbolLayer: QgsImageFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%Docstring
A class for filling symbols with a repeated raster image.
2017-12-15 10:36:55 -04:00
2017-06-06 11:03:05 +02:00
.. versionadded:: 2.7
%End
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
enum FillCoordinateMode
{
Feature,
2018-10-15 09:38:58 +10:00
Viewport,
};
QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
2018-10-15 09:38:58 +10:00
%Docstring
Constructor for QgsRasterFillSymbolLayer, using a raster fill from the
specified ``imageFilePath``.
%End
2017-06-06 11:03:05 +02:00
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2018-10-15 09:38:58 +10:00
%Docstring
Creates a new QgsRasterFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
%End
2017-06-06 11:03:05 +02:00
static void resolvePaths( QgsStringMap &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
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsRasterFillSymbolLayer *clone() const /Factory/;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
void setImageFilePath( const QString &imagePath );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the path to the raster image used for the fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param imagePath: path to image file
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`imageFilePath`
2017-06-06 11:03:05 +02:00
%End
QString imageFilePath() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The path to the raster image used for the fill.
:return: path to image file
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setImageFilePath`
2017-06-06 11:03:05 +02:00
%End
void setCoordinateMode( FillCoordinateMode mode );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the coordinate mode for fill. Controls how the top left corner of the image
fill is positioned relative to the feature.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param mode: coordinate mode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`coordinateMode`
2017-06-06 11:03:05 +02:00
%End
FillCoordinateMode coordinateMode() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Coordinate mode for fill. Controls how the top left corner of the image
fill is positioned relative to the feature.
:return: coordinate mode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setCoordinateMode`
2017-06-06 11:03:05 +02:00
%End
void setOpacity( double opacity );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``opacity`` for the raster image used in the fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param opacity: opacity value between 0 (fully transparent) and 1 (fully opaque)
.. seealso:: :py:func:`opacity`
2017-06-06 11:03:05 +02:00
%End
double opacity() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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`
2017-06-06 11:03:05 +02:00
%End
void setOffset( QPointF offset );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the offset for the fill.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offset: offset for fill
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
QPointF offset() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the offset for the fill.
:return: offset for fill
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
void setOffsetUnit( const QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the fill's offset.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: units for offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit offsetUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the fill's offset.
:return: units for offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the map unit scale for the fill's offset.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param scale: map unit scale for offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetMapUnitScale`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetUnit`
2017-06-06 11:03:05 +02:00
%End
const QgsMapUnitScale &offsetMapUnitScale() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the map unit scale for the fill's offset.
:return: map unit scale for offset
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetMapUnitScale`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offset`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetUnit`
2017-06-06 11:03:05 +02:00
%End
void setWidth( const double width );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param width: width for scaling the image
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`width`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
double width() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidth`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
void setWidthUnit( const QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the image's width.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: units for width
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidth`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit widthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the image's width.
:return: units for width
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`width`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
void setWidthMapUnitScale( const QgsMapUnitScale &scale );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the map unit scale for the image's width.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param scale: map unit scale for width
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthMapUnitScale`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidth`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthUnit`
2017-06-06 11:03:05 +02:00
%End
const QgsMapUnitScale &widthMapUnitScale() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the map unit scale for the image's width.
:return: map unit scale for width
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidthMapUnitScale`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`width`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`widthUnit`
2017-06-06 11:03:05 +02:00
%End
protected:
2017-06-06 11:03:05 +02:00
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
};
class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%Docstring
2018-10-15 09:38:58 +10:00
A class for filling symbols with a repeated SVG file.
%End
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
#include "qgsfillsymbollayer.h"
%End
public:
2018-10-15 09:38:58 +10:00
2017-06-06 11:03:05 +02:00
QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
%Docstring
2018-10-15 09:38:58 +10:00
Constructor for QgsSVGFillSymbolLayer, using the SVG picture at the specified absolute file path.
2017-06-06 11:03:05 +02:00
%End
2018-10-15 09:38:58 +10:00
2017-06-06 11:03:05 +02:00
QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
2018-10-15 09:38:58 +10:00
%Docstring
Constructor for QgsSVGFillSymbolLayer, using the specified SVG picture data.
%End
2017-06-06 11:03:05 +02:00
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2018-10-15 09:38:58 +10:00
%Docstring
Creates a new QgsSVGFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
%End
2017-06-06 11:03:05 +02:00
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2018-10-15 09:38:58 +10:00
%Docstring
Creates a new QgsSVGFillSymbolLayer from a SLD ``element``. The caller takes
ownership of the returned object.
%End
2017-06-06 11:03:05 +02:00
static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
%Docstring
2017-12-15 10:36:55 -04:00
Turns relative paths in properties map to absolute when reading and vice versa when writing.
Used internally when reading/writing symbols.
2017-06-06 11:03:05 +02:00
.. versionadded:: 3.0
%End
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsSVGFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
void setSvgFilePath( const QString &svgPath );
2018-10-15 09:38:58 +10:00
%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;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the path to the SVG file used to render the fill.
.. seealso:: :py:func:`setSvgFilePath`
%End
void setPatternWidth( double width );
2018-10-15 09:38:58 +10:00
%Docstring
Sets the ``width`` to render the SVG content as within the fill (i.e. the pattern repeat/tile size).
Units are specified by setPatternWidthUnit()
.. seealso:: :py:func:`patternWidth`
.. seealso:: :py:func:`setPatternWidthUnit`
.. seealso:: :py:func:`setPatternWidthMapUnitScale`
%End
double patternWidth() const;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the width of the rendered SVG content within the fill (i.e. the pattern repeat/tile size).
Units are retrieved by patternWidthUnit()
.. seealso:: :py:func:`setPatternWidth`
.. seealso:: :py:func:`patternWidthUnit`
.. seealso:: :py:func:`patternWidthMapUnitScale`
%End
void setSvgFillColor( const QColor &c );
2018-10-15 09:38:58 +10:00
%Docstring
Sets the fill color used for rendering the SVG content.
Fill color is only supported for parameterized SVG files. Color opacity is
ignored if the SVG file does not support parameterized fill opacity.
.. seealso:: :py:func:`svgFillColor`
.. seealso:: :py:func:`setSvgStrokeColor`
%End
QColor svgFillColor() const;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the fill color used for rendering the SVG content.
Fill color is only supported for parameterized SVG files.
.. seealso:: :py:func:`setSvgFillColor`
.. seealso:: :py:func:`svgStrokeColor`
%End
2017-06-06 11:03:05 +02:00
void setSvgStrokeColor( const QColor &c );
2018-10-15 09:38:58 +10:00
%Docstring
Sets the stroke color used for rendering the SVG content.
Stroke color is only supported for parameterized SVG files. Color opacity is
ignored if the SVG file does not support parameterized outline opacity.
.. seealso:: :py:func:`svgStrokeColor`
.. seealso:: :py:func:`setSvgFillColor`
%End
QColor svgStrokeColor() const;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the stroke color used for rendering the SVG content.
Stroke color is only supported for parameterized SVG files.
.. seealso:: :py:func:`setSvgStrokeColor`
.. seealso:: :py:func:`svgFillColor`
%End
void setSvgStrokeWidth( double w );
2018-10-15 09:38:58 +10:00
%Docstring
Sets the stroke width used for rendering the SVG content.
Stroke width is only supported for parameterized SVG files. Units are
specified via setSvgStrokeWidthUnit()
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`setSvgStrokeWidthUnit`
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
%End
double svgStrokeWidth() const;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the stroke width used for rendering the SVG content.
Stroke width is only supported for parameterized SVG files. Units are
retrieved via setSvgStrokeWidthUnit()
.. seealso:: :py:func:`setSvgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthUnit`
.. seealso:: :py:func:`svgStrokeWidthMapUnitScale`
%End
void setPatternWidthUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2018-10-15 09:38:58 +10:00
Sets the ``unit`` for the width of the SVG images in the pattern.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`patternWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`setPatternWidth`
.. seealso:: :py:func:`setPatternWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit patternWidthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the width of the SVG images in the pattern.
.. seealso:: :py:func:`setPatternWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`patternWidth`
.. seealso:: :py:func:`patternWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale );
2018-10-15 09:38:58 +10:00
%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;
2018-10-15 09:38:58 +10:00
%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( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2018-10-15 09:38:58 +10:00
Sets the ``unit`` for the stroke width.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`svgStrokeWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`setSvgStrokeWidth`
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the stroke width.
.. seealso:: :py:func:`setSvgStrokeWidthUnit`
2018-10-15 09:38:58 +10:00
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthMapUnitScale`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale );
2018-10-15 09:38:58 +10:00
%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;
2018-10-15 09:38:58 +10:00
%Docstring
Returns the map unit scale for the pattern's stroke.
.. seealso:: :py:func:`setSvgStrokeWidthMapUnitScale`
.. seealso:: :py:func:`svgStrokeWidth`
.. seealso:: :py:func:`svgStrokeWidthUnit`
%End
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
2017-06-06 11:03:05 +02:00
virtual QgsMapUnitScale mapUnitScale() const;
2013-06-23 16:00:16 +02:00
protected:
2017-06-06 11:03:05 +02:00
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
};
class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
QgsLinePatternFillSymbolLayer();
~QgsLinePatternFillSymbolLayer();
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual QgsStringMap properties() const;
virtual QgsLinePatternFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
2013-06-23 16:00:16 +02:00
QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
void setLineAngle( double a );
double lineAngle() const;
2016-07-18 09:42:45 +10:00
void setDistance( double d );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the distance between lines in the fill pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param d: distance. Units are specified by setDistanceUnit()
.. seealso:: :py:func:`distance`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDistanceUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
double distance() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the distance between lines in the fill pattern. Units are retrieved by distanceUnit().
.. seealso:: :py:func:`setDistance`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`distanceUnit`
2017-06-06 11:03:05 +02:00
%End
void setLineWidth( double w );
double lineWidth() const;
2017-06-06 11:03:05 +02:00
virtual void setColor( const QColor &c );
virtual QColor color() const;
void setOffset( double offset );
double offset() const;
void setDistanceUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the distance between lines in the fill pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: distance units
.. seealso:: :py:func:`distanceUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDistance`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit distanceUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the distance between lines in the fill pattern.
.. seealso:: :py:func:`setDistanceUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`distance`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setDistanceMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &distanceMapUnitScale() const;
void setLineWidthUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the line's width.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: width units
.. seealso:: :py:func:`lineWidthUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit lineWidthUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the line's width.
.. seealso:: :py:func:`setLineWidthUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setLineWidthMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &lineWidthMapUnitScale() const;
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the line pattern's offset.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: offset units
.. seealso:: :py:func:`offsetUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit offsetUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the line pattern's offset.
.. seealso:: :py:func:`setOffsetUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &offsetMapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
virtual QgsUnitTypes::RenderUnit outputUnit() const;
2014-01-27 09:22:24 +01:00
2017-06-06 11:03:05 +02:00
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
2017-06-06 11:03:05 +02:00
virtual QgsMapUnitScale mapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual QgsSymbol *subSymbol();
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
protected:
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
%Docstring
Offset perpendicular to line direction
%End
private:
QgsLinePatternFillSymbolLayer( const QgsLinePatternFillSymbolLayer &other );
};
2017-06-06 11:03:05 +02:00
class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
QgsPointPatternFillSymbolLayer();
~QgsPointPatternFillSymbolLayer();
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
2017-06-06 11:03:05 +02:00
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsPointPatternFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
double distanceX() const;
void setDistanceX( double d );
double distanceY() const;
void setDistanceY( double d );
double displacementX() const;
void setDisplacementX( double d );
double displacementY() const;
void setDisplacementY( double d );
2017-06-06 11:03:05 +02:00
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual QgsSymbol *subSymbol();
void setDistanceXUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the horizontal distance between points in the pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: distance units
.. seealso:: :py:func:`distanceXUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDistanceYUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit distanceXUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the horizontal distance between points in the pattern.
.. seealso:: :py:func:`setDistanceXUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`distanceYUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setDistanceXMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &distanceXMapUnitScale() const;
void setDistanceYUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the vertical distance between points in the pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: distance units
.. seealso:: :py:func:`distanceYUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDistanceXUnit`
2017-06-06 11:03:05 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit distanceYUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the vertical distance between points in the pattern.
.. seealso:: :py:func:`setDistanceYUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`distanceXUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setDistanceYMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &distanceYMapUnitScale() const;
void setDisplacementXUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the horizontal displacement between rows in the pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: displacement units
.. seealso:: :py:func:`displacementXUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDisplacementYUnit`
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit displacementXUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the horizontal displacement between rows in the pattern.
.. seealso:: :py:func:`setDisplacementXUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`displacementYUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &displacementXMapUnitScale() const;
void setDisplacementYUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the vertical displacement between rows in the pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: displacement units
.. seealso:: :py:func:`displacementYUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setDisplacementXUnit`
2017-06-06 11:03:05 +02:00
%End
QgsUnitTypes::RenderUnit displacementYUnit() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the vertical displacement between rows in the pattern.
.. seealso:: :py:func:`setDisplacementYUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`displacementXUnit`
2017-06-06 11:03:05 +02:00
%End
2017-06-06 11:03:05 +02:00
void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &displacementYMapUnitScale() const;
2017-06-06 11:03:05 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
2017-06-06 11:03:05 +02:00
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
2013-06-23 16:00:16 +02:00
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
2017-06-06 11:03:05 +02:00
virtual void setColor( const QColor &c );
2014-01-27 09:22:24 +01:00
virtual QColor color() const;
2013-06-23 16:00:16 +02:00
protected:
2017-06-06 11:03:05 +02:00
virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
private:
QgsPointPatternFillSymbolLayer( const QgsPointPatternFillSymbolLayer &other );
};
2016-08-06 11:01:42 +02:00
class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
{
2017-06-06 11:03:05 +02:00
%TypeHeaderCode
2017-06-06 11:03:05 +02:00
#include "qgsfillsymbollayer.h"
%End
public:
2016-08-06 11:01:42 +02:00
QgsCentroidFillSymbolLayer();
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-06 11:03:05 +02:00
2017-06-06 11:03:05 +02:00
virtual QString layerType() const;
2017-06-06 11:03:05 +02:00
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-06 11:03:05 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsCentroidFillSymbolLayer *clone() const /Factory/;
2017-06-06 11:03:05 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
2017-06-06 11:03:05 +02:00
virtual void setColor( const QColor &color );
2013-06-23 16:00:16 +02:00
2017-06-06 11:03:05 +02:00
virtual QColor color() const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
2014-01-27 09:22:24 +01:00
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
void setPointOnSurface( bool pointOnSurface );
bool pointOnSurface() const;
void setPointOnAllParts( bool pointOnAllParts );
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
2017-06-06 11:03:05 +02:00
.. versionadded:: 2.16
%End
bool pointOnAllParts() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
2017-06-06 11:03:05 +02:00
.. versionadded:: 2.16
%End
2017-06-06 11:03:05 +02:00
protected:
2017-06-06 11:03:05 +02:00
private:
QgsCentroidFillSymbolLayer( const QgsCentroidFillSymbolLayer &other );
};
2017-06-06 11:03:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgsfillsymbollayer.h *
2017-06-06 11:03:05 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/