16 #ifndef QGSFILLSYMBOLLAYER_H
17 #define QGSFILLSYMBOLLAYER_H
19 #include "qgis_core.h"
23 #define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255)
24 #define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern
25 #define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor( 35, 35, 35 )
26 #define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine
27 #define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH
28 #define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
74 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
76 QString
ogrFeatureStyle(
double mmScaleFactor,
double mapUnitScaleFactor )
const override;
78 Qt::BrushStyle
brushStyle()
const {
return mBrushStyle; }
88 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
196 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
236 const QColor &color2 = Qt::white,
237 GradientColorType gradientColorType = SimpleTwoColor,
238 GradientType gradientType = Linear,
239 GradientCoordinateMode coordinateMode = Feature,
240 GradientSpread gradientSpread = Pad
256 QString layerType() const override;
259 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
260 QVariantMap properties() const override;
263 bool canCauseArtifactsBetweenAdjacentTiles() const override;
291 QColor
color2()
const {
return mColor2; }
292 void setColor2(
const QColor &color2 ) { mColor2 = color2; }
336 QPointF
offset()
const {
return mOffset; }
385 bool mReferencePoint1IsCentroid =
false;
387 bool mReferencePoint2IsCentroid =
false;
399 void applyGradient(
const QgsSymbolRenderContext &context, QBrush &brush,
const QColor &color,
const QColor &color2,
402 QPointF referencePoint1, QPointF referencePoint2,
double angle );
405 QPointF rotateReferencePoint( QPointF refPoint,
double angle );
423 ShapeburstColorType colorType = SimpleTwoColor,
424 int blurRadius = 0,
bool useWholeShape =
true,
double maxDistance = 5 );
451 QString layerType() const override;
454 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
455 QVariantMap properties() const override;
458 bool canCauseArtifactsBetweenAdjacentTiles() const override;
466 void setBlurRadius(
int blurRadius ) { mBlurRadius = blurRadius; }
587 void setColor2(
const QColor &color2 ) { mColor2 = color2; }
596 QColor
color2()
const {
return mColor2; }
631 QPointF
offset()
const {
return mOffset; }
667 bool mUseWholeShape =
true;
668 double mMaxDistance = 5.0;
672 ShapeburstColorType mColorType = SimpleTwoColor;
675 bool mIgnoreRings =
false;
681 std::unique_ptr< QgsColorRamp > mGradientRamp;
684 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QColor &color, QColor &color2,
int &blurRadius,
bool &useWholeShape,
685 double &maxDistance,
bool &ignoreRings );
688 void distanceTransform1d(
double *f,
int n,
int *v,
double *z,
double *d );
690 void distanceTransform2d(
double *im,
int width,
int height,
QgsRenderContext &context );
695 void dtArrayToQImage(
double *array, QImage *im,
QgsColorRamp *ramp,
QgsRenderContext &context,
bool useWholeShape =
true,
int maxPixelDistance = 0 );
761 double mNextAngle = 0.0;
764 double mStrokeWidth = 0.0;
778 virtual bool applyBrushTransformFromContext()
const;
820 static
void resolvePaths( QVariantMap &properties, const
QgsPathResolver &pathResolver,
bool saving );
823 QString layerType() const override;
824 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
827 QVariantMap properties() const override;
830 bool usesMapUnits() const override;
841 void setImageFilePath(
const QString &imagePath );
856 void setCoordinateMode( FillCoordinateMode mode );
871 void setOpacity(
double opacity );
896 QPointF
offset()
const {
return mOffset; }
942 void setWidth(
const double width ) { mWidth = width; }
952 double width()
const {
return mWidth; }
993 bool applyBrushTransformFromContext()
const override;
997 QString mImageFilePath;
999 double mOpacity = 1.0;
1005 double mWidth = 0.0;
1010 void applyPattern( QBrush &brush,
const QString &imageFilePath,
double width,
double opacity,
1049 static void resolvePaths( QVariantMap &properties,
const QgsPathResolver &pathResolver,
bool saving );
1058 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
1072 void setSvgFilePath(
const QString &svgPath );
1251 QMap<QString, QgsProperty>
parameters()
const {
return mParameters; }
1257 void setParameters(
const QMap<QString, QgsProperty> ¶meters );
1266 double mPatternWidth = 20;
1269 QMap<QString, QgsProperty> mParameters;
1272 QByteArray mSvgData;
1274 QString mSvgFilePath;
1280 QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1281 double mSvgStrokeWidth = 0.2;
1286 void storeViewBox();
1287 void setDefaultSvgParams();
1290 void applyPattern( QBrush &brush,
const QString &svgFilePath,
double patternWidth,
QgsUnitTypes::RenderUnit patternWidthUnit,
const QColor &svgFillColor,
const QColor &svgStrokeColor,
1323 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
1326 QString ogrFeatureStyleWidth(
double widthScaleFactor )
const;
1367 void setLineWidth(
double w );
1377 void setColor(
const QColor &
c )
override;
1378 QColor
color()
const override;
1520 double mDistance = 5.0;
1524 double mLineWidth = 0;
1528 double mLineAngle = 45.0;
1530 double mOffset = 0.0;
1539 void applyPattern(
const QgsSymbolRenderContext &context, QBrush &brush,
double lineAngle,
double distance );
1573 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
1776 void setColor(
const QColor &
c )
override;
1777 QColor
color()
const override;
1781 double mDistanceX = 15;
1784 double mDistanceY = 15;
1787 double mDisplacementX = 0;
1790 double mDisplacementY = 0;
1793 double mOffsetX = 0;
1796 double mOffsetY = 0;
1807 void applyPattern(
const QgsSymbolRenderContext &context, QBrush &brush,
double distanceX,
double distanceY,
1808 double displacementX,
double displacementY,
double offsetX,
double offsetY );
1810 bool mRenderUsingMarkers =
false;
1847 QString layerType() const override;
1850 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
1851 QVariantMap properties() const override;
1853 bool canCauseArtifactsBetweenAdjacentTiles() const override;
1855 void setColor( const QColor &color ) override;
1856 QColor color() const override;
1861 void setOutputUnit(
QgsUnitTypes::RenderUnit unit ) override;
1863 bool usesMapUnits() const override;
1868 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
1869 bool hasDataDefinedProperties() const override;
1876 int pointCount() const;
1883 void setPointCount(
int count );
1890 unsigned long seed() const;
1899 void setSeed(
unsigned long seed );
1906 bool clipPoints() const;
1913 void setClipPoints(
bool clipped );
1920 CountMethod countMethod() const;
1927 void setCountMethod( CountMethod method );
1938 double densityArea() const;
1945 void setDensityArea(
double area );
1952 void setDensityAreaUnit(
QgsUnitTypes::RenderUnit unit ) { mDensityAreaUnit = unit; }
1988 QVector<QPolygonF> rings;
1991 QVector< Part > mCurrentParts;
1995 std::unique_ptr< QgsMarkerSymbol > mMarker;
1996 CountMethod mCountMethod = AbsoluteCount;
1997 int mPointCount = 10;
1998 double mDensityArea = 250.0;
2001 unsigned long mSeed = 0;
2002 bool mClipPoints =
false;
2004 bool mRenderingFeature =
false;
2005 double mFeatureSymbolOpacity = 1;
2036 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
2037 void setColor(
const QColor &color )
override;
2038 QColor
color()
const override;
2105 bool mPointOnSurface =
false;
2106 bool mPointOnAllParts =
true;
2107 bool mClipPoints =
false;
2108 bool mClipOnCurrentPartOnly =
false;
2110 bool mRenderingFeature =
false;
2111 double mFeatureSymbolOpacity = 1;
2114 int mBiggestPartIndex = -1;
2123 QVector<QPolygonF> rings;
2127 QVector<Part> mCurrentParts;
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool pointOnSurface() const
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
std::unique_ptr< QgsMarkerSymbol > mMarker
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
void setPointOnSurface(bool pointOnSurface)
Abstract base class for color ramps.
Exports QGIS layers to the DXF format.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
virtual void renderPolygon(const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context)=0
Renders the fill symbol layer for the polygon whose outer ring is defined by points,...
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient. Controls how the gradient stops are positioned.
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
void setGradientType(GradientType gradientType)
void setCoordinateMode(GradientCoordinateMode coordinateMode)
GradientColorType mGradientColorType
GradientSpread gradientSpread() const
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
bool referencePoint2IsCentroid() const
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
void setGradientColorType(GradientColorType gradientColorType)
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
GradientType mGradientType
void setGradientSpread(GradientSpread gradientSpread)
GradientCoordinateMode mCoordinateMode
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
GradientSpread mGradientSpread
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
QPointF referencePoint1() const
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
QgsMapUnitScale mOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
bool referencePoint1IsCentroid() const
QPointF referencePoint2() const
void setColor2(const QColor &color2)
Base class for polygon renderers generating texture images.
std::unique_ptr< QgsLineSymbol > mStroke
Custom stroke.
QgsMapUnitScale mStrokeWidthMapUnitScale
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
virtual void applyDataDefinedSettings(QgsSymbolRenderContext &context)
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units fo the symbol's stroke width.
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
A symbol fill consisting of repeated parallel lines.
void setLineWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's width.
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line width.
double lineWidth() const
Returns the width of the line subsymbol used to render the parallel lines in the fill.
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width.
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns the units for the line's width.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
void setLineAngle(double a)
Sets the angle for the parallel lines used to fill the symbol.
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset.
double distance() const
Returns the distance between lines in the fill pattern.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
A line symbol type, for rendering LineString and MultiLineString geometries.
Struct for storing maximum and minimum scales for measurements in map units.
A marker symbol type, for rendering Point and MultiPoint geometries.
Resolves relative paths into absolute paths and vice versa.
void setDisplacementX(double d)
QgsMapUnitScale mDisplacementYMapUnitScale
const QgsMapUnitScale & displacementYMapUnitScale() const
QgsMapUnitScale mDisplacementXMapUnitScale
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
QgsMapUnitScale mDistanceYMapUnitScale
double displacementY() const
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
double offsetY() const
Returns the vertical offset values for points in the pattern.
void setDisplacementY(double d)
const QgsMapUnitScale & distanceYMapUnitScale() const
QgsMapUnitScale mDistanceXMapUnitScale
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern.
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal distance between points in the pattern.
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
QgsMapUnitScale mOffsetXMapUnitScale
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern.
void setDistanceY(double d)
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setDistanceX(double d)
double offsetX() const
Returns the horizontal offset values for points in the pattern.
void setDisplacementXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
double displacementX() const
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
const QgsMapUnitScale & distanceXMapUnitScale() const
QgsMapUnitScale mOffsetYMapUnitScale
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical distance between points in the pattern.
const QgsMapUnitScale & displacementXMapUnitScale() const
A fill symbol layer which places markers at random locations within polygons.
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area.
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
CountMethod
Methods to define the number of points randomly filling the polygon.
@ AbsoluteCount
The point count is used as an absolute count of markers.
@ DensityBasedCount
The point count is part of a marker density count.
A class for filling symbols with a repeated raster image.
double width() const
Returns the width used for scaling the image used in the fill.
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width.
FillCoordinateMode
Fill coordinate modes, dictates fill tiling behavior.
@ Feature
Tiling is based on feature bounding box.
@ Viewport
Tiling is based on complete map viewport.
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width.
void setWidth(const double width)
Sets the width for scaling the image used in the fill.
double opacity() const
Returns the opacity for the raster image used in the fill.
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QString imageFilePath() const
The path to the raster image used for the fill.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
QPointF offset() const
Returns the offset for the fill.
void setOffset(QPointF offset)
Sets the offset for the fill.
FillCoordinateMode coordinateMode() const
Coordinate mode for fill.
Contains information about the context of a rendering operation.
A class for filling symbols with a repeated SVG file.
QMap< QString, QgsProperty > parameters() const
Returns the dynamic SVG parameters.
QString svgFilePath() const
Returns the path to the SVG file used to render the fill.
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width.
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width.
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e.
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e.
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
~QgsShapeburstFillSymbolLayer() override
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
const QgsMapUnitScale & distanceMapUnitScale() const
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
QgsShapeburstFillSymbolLayer & operator=(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill.
const QgsMapUnitScale & offsetMapUnitScale() const
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill.
QPointF offset() const
Returns the offset for the shapeburst fill.
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
QgsShapeburstFillSymbolLayer(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
Qt::PenJoinStyle penJoinStyle() const
QColor strokeColor() const override
Gets stroke color.
void setBrushStyle(Qt::BrushStyle style)
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
void setPenJoinStyle(Qt::PenJoinStyle style)
QColor fillColor() const override
Gets fill color.
Qt::PenStyle strokeStyle() const
QgsMapUnitScale mOffsetMapUnitScale
double strokeWidth() const
void setStrokeWidth(double strokeWidth)
void setStrokeStyle(Qt::PenStyle strokeStyle)
QgsMapUnitScale mStrokeWidthMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
void setFillColor(const QColor &color) override
Set fill color.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QPointF offset()
Returns the offset by which polygons will be translated during rendering.
Qt::PenStyle mStrokeStyle
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setStrokeColor(const QColor &strokeColor) override
Set stroke color.
Qt::PenJoinStyle mPenJoinStyle
Qt::BrushStyle mBrushStyle
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke.
Qt::BrushStyle brushStyle() const
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
virtual QgsMapUnitScale mapUnitScale() const
virtual QColor color() const
The fill color.
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const
Saves the symbol layer as SLD.
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width.
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle.
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
virtual QColor strokeColor() const
Gets stroke color.
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
virtual void setColor(const QColor &color)
The fill color.
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
Abstract base class for all rendered symbols.
Helper functions for various unit types.
RenderUnit
Rendering size units.
@ RenderMillimeters
Millimeters.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
QMap< QString, QString > QgsStringMap
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
#define DEFAULT_SIMPLEFILL_JOINSTYLE
#define DEFAULT_SIMPLEFILL_COLOR
#define DEFAULT_SIMPLEFILL_STYLE
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
#define DEFAULT_SIMPLEFILL_BORDERWIDTH