QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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 QgsStringMap &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; }
195 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
235 const QColor &color2 = Qt::white,
236 GradientColorType gradientColorType = SimpleTwoColor,
237 GradientType gradientType = Linear,
238 GradientCoordinateMode coordinateMode = Feature,
239 GradientSpread gradientSpread = Pad
255 QString layerType() const override;
261 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
295 QColor
color2()
const {
return mColor2; }
296 void setColor2(
const QColor &color2 ) { mColor2 = color2; }
340 QPointF
offset()
const {
return mOffset; }
388 bool mReferencePoint1IsCentroid =
false;
390 bool mReferencePoint2IsCentroid =
false;
402 void applyGradient(
const QgsSymbolRenderContext &context, QBrush &brush,
const QColor &color,
const QColor &color2,
405 QPointF referencePoint1, QPointF referencePoint2,
double angle );
408 QPointF rotateReferencePoint( QPointF refPoint,
double angle );
426 ShapeburstColorType colorType = SimpleTwoColor,
427 int blurRadius = 0,
bool useWholeShape =
true,
double maxDistance = 5 );
454 QString layerType() const override;
460 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
474 void setBlurRadius(
int blurRadius ) { mBlurRadius = blurRadius; }
595 void setColor2(
const QColor &color2 ) { mColor2 = color2; }
604 QColor
color2()
const {
return mColor2; }
639 QPointF
offset()
const {
return mOffset; }
674 bool mUseWholeShape =
true;
675 double mMaxDistance = 5.0;
679 ShapeburstColorType mColorType = SimpleTwoColor;
682 bool mIgnoreRings =
false;
688 std::unique_ptr< QgsColorRamp > mGradientRamp;
691 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QColor &color, QColor &color2,
int &blurRadius,
bool &useWholeShape,
692 double &maxDistance,
bool &ignoreRings );
695 void distanceTransform1d(
double *f,
int n,
int *v,
double *z,
double *d );
697 void distanceTransform2d(
double *im,
int width,
int height,
QgsRenderContext &context );
702 void dtArrayToQImage(
double *array, QImage *im,
QgsColorRamp *ramp,
QgsRenderContext &context,
bool useWholeShape =
true,
int maxPixelDistance = 0 );
768 double mNextAngle = 0.0;
771 double mStrokeWidth = 0.0;
785 virtual bool applyBrushTransformFromContext()
const;
830 QString layerType() const override;
831 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
847 void setImageFilePath(
const QString &imagePath );
862 void setCoordinateMode( FillCoordinateMode mode );
877 void setOpacity(
double opacity );
902 QPointF
offset()
const {
return mOffset; }
948 void setWidth(
const double width ) { mWidth = width; }
958 double width()
const {
return mWidth; }
1003 QString mImageFilePath;
1005 double mOpacity = 1.0;
1011 double mWidth = 0.0;
1016 void applyPattern( QBrush &brush,
const QString &imageFilePath,
double width,
double opacity,
1064 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
1077 void setSvgFilePath(
const QString &svgPath );
1259 double mPatternWidth = 20;
1264 QByteArray mSvgData;
1266 QString mSvgFilePath;
1272 QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1273 double mSvgStrokeWidth = 0.2;
1278 void storeViewBox();
1279 void setDefaultSvgParams();
1282 void applyPattern( QBrush &brush,
const QString &svgFilePath,
double patternWidth,
QgsUnitTypes::RenderUnit patternWidthUnit,
const QColor &svgFillColor,
const QColor &svgStrokeColor,
1314 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
1317 QString ogrFeatureStyleWidth(
double widthScaleFactor )
const;
1358 void setLineWidth(
double w );
1368 void setColor(
const QColor &
c )
override;
1369 QColor
color()
const override;
1510 double mDistance = 5.0;
1514 double mLineWidth = 0;
1518 double mLineAngle = 45.0;
1520 double mOffset = 0.0;
1529 void applyPattern(
const QgsSymbolRenderContext &context, QBrush &brush,
double lineAngle,
double distance );
1563 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
1765 void setColor(
const QColor &
c )
override;
1766 QColor
color()
const override;
1770 double mDistanceX = 15;
1773 double mDistanceY = 15;
1776 double mDisplacementX = 0;
1779 double mDisplacementY = 0;
1782 double mOffsetX = 0;
1785 double mOffsetY = 0;
1796 void applyPattern(
const QgsSymbolRenderContext &context, QBrush &brush,
double distanceX,
double distanceY,
1797 double displacementX,
double displacementY,
double offsetX,
double offsetY );
1799 bool mRenderUsingMarkers =
false;
1836 QString layerType() const override;
1839 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
1843 void setColor( const QColor &color ) override;
1844 QColor color() const override;
1849 void setOutputUnit(
QgsUnitTypes::RenderUnit unit ) override;
1855 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
1856 bool hasDataDefinedProperties() const override;
1863 int pointCount() const;
1870 void setPointCount(
int count );
1877 unsigned long seed() const;
1886 void setSeed(
unsigned long seed );
1893 bool clipPoints() const;
1900 void setClipPoints(
bool clipped );
1907 CountMethod countMethod() const;
1914 void setCountMethod( CountMethod method );
1925 double densityArea() const;
1932 void setDensityArea(
double area );
1939 void setDensityAreaUnit(
QgsUnitTypes::RenderUnit unit ) { mDensityAreaUnit = unit; }
1975 QVector<QPolygonF> rings;
1978 QVector< Part > mCurrentParts;
1982 std::unique_ptr< QgsMarkerSymbol > mMarker;
1983 CountMethod mCountMethod = AbsoluteCount;
1984 int mPointCount = 10;
1985 double mDensityArea = 250.0;
1988 unsigned long mSeed = 0;
1989 bool mClipPoints =
false;
1991 bool mRenderingFeature =
false;
2028 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
2030 void setColor(
const QColor &color )
override;
2031 QColor
color()
const override;
2100 bool mPointOnSurface =
false;
2101 bool mPointOnAllParts =
true;
2102 bool mClipPoints =
false;
2103 bool mClipOnCurrentPartOnly =
false;
2105 bool mRenderingFeature =
false;
2108 int mBiggestPartIndex = -1;
2117 QVector<QPolygonF> rings;
2121 QVector<Part> mCurrentParts;
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
QColor strokeColor() const override
Gets stroke color.
virtual QgsMapUnitScale mapUnitScale() const
bool setSubSymbol(QgsSymbol *symbol) override
Sets layer's subsymbol. takes ownership of the passed symbol.
Abstract base class for color ramps.
bool hasDataDefinedProperties() const override
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
double displacementY() const
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
GradientColorType mGradientColorType
QgsMapUnitScale mOffsetXMapUnitScale
QgsMapUnitScale mDisplacementXMapUnitScale
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern.
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
double opacity() const
Returns the opacity for the raster image used in the fill.
RenderUnit
Rendering size units.
@ Feature
Tiling is based on feature bounding box.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset.
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
void setCoordinateMode(GradientCoordinateMode coordinateMode)
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke.
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
CountMethod
Methods to define the number of points randomly filling the polygon.
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
QgsMapUnitScale mDistanceYMapUnitScale
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
double distance() const
Returns the distance between lines in the fill pattern.
void setLineWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's width.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
virtual void setColor(const QColor &color)
The fill color.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units fo the symbol's stroke width.
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill.
virtual void applyDataDefinedSettings(QgsSymbolRenderContext &context)
QPointF offset()
Returns the offset by which polygons will be translated during rendering.
QgsMapUnitScale mOffsetMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
virtual QColor color() const
The fill color.
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
QgsMapUnitScale mapUnitScale() const override
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
void setBrushStyle(Qt::BrushStyle style)
QgsMapUnitScale mStrokeWidthMapUnitScale
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
#define DEFAULT_SIMPLEFILL_COLOR
Contains information about the context of a rendering operation.
A class for filling symbols with a repeated raster image.
void setOffset(QPointF offset)
Sets the offset for the fill.
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
@ RenderMillimeters
Millimeters.
void setLineAngle(double a)
Sets the angle for the parallel lines used to fill the symbol.
double offsetY() const
Returns the vertical offset values for points in the pattern.
void setPointOnSurface(bool pointOnSurface)
GradientSpread mGradientSpread
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
double width() const
Returns the width used for scaling the image used in the fill.
Abstract base class for all rendered symbols.
#define DEFAULT_SIMPLEFILL_STYLE
const QgsMapUnitScale & distanceXMapUnitScale() const
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
GradientType mGradientType
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e.
void setDistanceY(double d)
QgsShapeburstFillSymbolLayer & operator=(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
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,...
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
void setGradientSpread(GradientSpread gradientSpread)
QgsShapeburstFillSymbolLayer(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
@ AbsoluteCount
The point count is used as an absolute count of markers.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QPointF referencePoint1() const
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern.
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
void setDisplacementX(double d)
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
void setStrokeWidth(double strokeWidth)
void setDistanceX(double d)
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
bool pointOnSurface() const
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
void setMapUnitScale(const QgsMapUnitScale &scale) override
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
FillCoordinateMode
Fill coordinate modes, dictates fill tiling behavior.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
QgsMapUnitScale mOffsetMapUnitScale
virtual bool applyBrushTransformFromContext() const
Returns true if the image brush should be transformed using the render context's texture origin.
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
void renderPolygon(const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context) override
Renders the fill symbol layer for the polygon whose outer ring is defined by points,...
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
void setPenJoinStyle(Qt::PenJoinStyle style)
A marker symbol type, for rendering Point and MultiPoint geometries.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
QgsMapUnitScale mDistanceXMapUnitScale
double displacementX() const
Qt::PenJoinStyle penJoinStyle() const
double strokeWidth() const
A symbol fill consisting of repeated parallel lines.
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient. Controls how the gradient stops are positioned.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
QPointF offset() const
Returns the offset for the fill.
@ Viewport
Tiling is based on complete map viewport.
Qt::BrushStyle mBrushStyle
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
const QgsMapUnitScale & offsetMapUnitScale() const
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
GradientCoordinateMode mCoordinateMode
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
A line symbol type, for rendering LineString and MultiLineString geometries.
FillCoordinateMode coordinateMode() const
Coordinate mode for fill.
A class for filling symbols with a repeated SVG file.
Helper functions for various unit types.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
std::unique_ptr< QgsLineSymbol > mStroke
Custom stroke.
QString imageFilePath() const
The path to the raster image used for the fill.
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns the units for the line's width.
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
const QgsMapUnitScale & displacementYMapUnitScale() const
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
Struct for storing maximum and minimum scales for measurements in map units.
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
GradientSpread gradientSpread() const
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area.
QgsMapUnitScale mOffsetYMapUnitScale
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
QPointF referencePoint2() const
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
std::unique_ptr< QgsMarkerSymbol > mMarker
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width.
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setDisplacementY(double d)
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
double estimateMaxBleed(const QgsRenderContext &context) const override
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
const QgsMapUnitScale & distanceYMapUnitScale() const
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style.
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
QMap< QString, QString > QgsStringMap
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
Qt::BrushStyle brushStyle() const
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
const QgsMapUnitScale & distanceMapUnitScale() const
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line width.
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal distance between points in the pattern.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
void setWidth(const double width)
Sets the width for scaling the image used in the fill.
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
bool referencePoint1IsCentroid() const
A fill symbol layer which places markers at random locations within polygons.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setDisplacementXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
QString svgFilePath() const
Returns the path to the SVG file used to render the fill.
QgsMapUnitScale mStrokeWidthMapUnitScale
QColor fillColor() const override
Gets fill color.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
#define DEFAULT_SIMPLEFILL_JOINSTYLE
virtual QString layerType() const =0
Returns a string that represents this layer type.
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
Base class for polygon renderers generating texture images.
void setGradientColorType(GradientColorType gradientColorType)
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
QPointF offset() const
Returns the offset for the shapeburst fill.
double lineWidth() const
Returns the width of the line subsymbol used to render the parallel lines in the fill.
Qt::PenStyle strokeStyle() const
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
@ DensityBasedCount
The point count is part of a marker density count.
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
QgsMapUnitScale mDisplacementYMapUnitScale
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical distance between points in the pattern.
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width.
Qt::PenJoinStyle mPenJoinStyle
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width.
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)
Qt::PenStyle mStrokeStyle
void setStrokeColor(const QColor &strokeColor) override
Set stroke color.
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns the set of attributes referenced by the layer.
virtual QColor strokeColor() const
Gets stroke color.
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e.
Resolves relative paths into absolute paths and vice versa.
bool referencePoint2IsCentroid() const
const QgsMapUnitScale & displacementXMapUnitScale() const
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color.
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
double offsetX() const
Returns the horizontal offset values for points in the pattern.
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
void setFillColor(const QColor &color) override
Set fill color.
~QgsShapeburstFillSymbolLayer() override
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
void setStrokeStyle(Qt::PenStyle strokeStyle)
void setGradientType(GradientType gradientType)
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
void setColor2(const QColor &color2)