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; }
    96     void setOffset( QPointF offset ) { mOffset = offset; }
   166     void applyDataDefinedSymbology( 
QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
   206                                 const QColor &color2 = Qt::white,
   226     QString layerType() const override;
   232     void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, 
QgsSymbolRenderContext &context ) override;
   266     QColor 
color2()
 const { 
return mColor2; }
   267     void setColor2( 
const QColor &color2 ) { mColor2 = color2; }
   295     QPointF 
offset()
 const { 
return mOffset; }
   322     bool mReferencePoint1IsCentroid = 
false;
   324     bool mReferencePoint2IsCentroid = 
false;
   336     void applyGradient( 
const QgsSymbolRenderContext &context, QBrush &brush, 
const QColor &color, 
const QColor &color2,
   339                         QPointF referencePoint1, QPointF referencePoint2, 
double angle );
   342     QPointF rotateReferencePoint( QPointF refPoint, 
double angle );
   361                                   int blurRadius = 0, 
bool useWholeShape = 
true, 
double maxDistance = 5 );
   388     QString layerType() const override;
   394     void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, 
QgsSymbolRenderContext &context ) override;
   408     void setBlurRadius( 
int blurRadius ) { mBlurRadius = blurRadius; }
   529     void setColor2( 
const QColor &color2 ) { mColor2 = color2; }
   538     QColor 
color2()
 const { 
return mColor2; }
   573     QPointF 
offset()
 const { 
return mOffset; }
   608     bool mUseWholeShape = 
true;
   609     double mMaxDistance = 5.0;
   616     bool mIgnoreRings = 
false;
   622     std::unique_ptr< QgsColorRamp > mGradientRamp;
   625     void applyDataDefinedSymbology( 
QgsSymbolRenderContext &context, QColor &color, QColor &color2, 
int &blurRadius, 
bool &useWholeShape,
   626                                     double &maxDistance, 
bool &ignoreRings );
   629     void distanceTransform1d( 
double *f, 
int n, 
int *v, 
double *z, 
double *d );
   631     void distanceTransform2d( 
double *im, 
int width, 
int height, 
QgsRenderContext &context );
   636     void dtArrayToQImage( 
double *array, QImage *im, 
QgsColorRamp *ramp, 
QgsRenderContext &context, 
bool useWholeShape = 
true, 
int maxPixelDistance = 0 );
   701     double mNextAngle = 0.0; 
   704     double mStrokeWidth = 0.0;
   756     QString layerType() const override;
   757     void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, 
QgsSymbolRenderContext &context ) override;
   773     void setImageFilePath( 
const QString &imagePath );
   803     void setOpacity( 
double opacity );
   828     QPointF 
offset()
 const { 
return mOffset; }
   874     void setWidth( 
const double width ) { mWidth = width; }
   884     double width()
 const { 
return mWidth; }
   929     QString mImageFilePath;
   931     double mOpacity = 1.0;
   942     void applyPattern( QBrush &brush, 
const QString &imageFilePath, 
double width, 
double opacity,
   990     void toSld( QDomDocument &doc, QDomElement &element, 
const QgsStringMap &props ) 
const override;
  1002     void setSvgFilePath( 
const QString &svgPath );
  1184     double mPatternWidth = 20;
  1189     QByteArray mSvgData;
  1191     QString mSvgFilePath;
  1197     QColor mSvgStrokeColor = QColor( 35, 35, 35 );
  1198     double mSvgStrokeWidth = 0.2;
  1203     void storeViewBox();
  1204     void setDefaultSvgParams(); 
  1207     void applyPattern( QBrush &brush, 
const QString &svgFilePath, 
double patternWidth, 
QgsUnitTypes::RenderUnit patternWidthUnit, 
const QColor &svgFillColor, 
const QColor &svgStrokeColor,
  1239     void toSld( QDomDocument &doc, QDomElement &element, 
const QgsStringMap &props ) 
const override;
  1242     QString ogrFeatureStyleWidth( 
double widthScaleFactor ) 
const;
  1283     void setLineWidth( 
double w );
  1293     void setColor( 
const QColor &
c ) 
override;
  1294     QColor 
color() 
const override;
  1435     double mDistance = 5.0;
  1439     double mLineWidth = 0;
  1443     double mLineAngle = 45.0;
  1445     double mOffset = 0.0;
  1454     void applyPattern( 
const QgsSymbolRenderContext &context, QBrush &brush, 
double lineAngle, 
double distance );
  1488     void toSld( QDomDocument &doc, QDomElement &element, 
const QgsStringMap &props ) 
const override;
  1690     void setColor( 
const QColor &
c ) 
override;
  1691     QColor 
color() 
const override;
  1695     double mDistanceX = 15;
  1698     double mDistanceY = 15;
  1701     double mDisplacementX = 0;
  1704     double mDisplacementY = 0;
  1707     double mOffsetX = 0;
  1710     double mOffsetY = 0;
  1721     void applyPattern( 
const QgsSymbolRenderContext &context, QBrush &brush, 
double distanceX, 
double distanceY,
  1722                        double displacementX, 
double displacementY, 
double offsetX, 
double offsetY );
  1759     QString layerType() const override;
  1762     void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, 
QgsSymbolRenderContext &context ) override;
  1766     void setColor( const QColor &color ) override;
  1767     QColor color() const override;
  1772     void setOutputUnit( 
QgsUnitTypes::RenderUnit unit ) override;
  1778     QSet<QString> usedAttributes( const 
QgsRenderContext &context ) const override;
  1779     bool hasDataDefinedProperties() const override;
  1786     int pointCount() const;
  1793     void setPointCount( 
int count );
  1800     unsigned long seed() const;
  1809     void setSeed( 
unsigned long seed );
  1816     bool clipPoints() const;
  1823     void setClipPoints( 
bool clipped );
  1848     double densityArea() const;
  1855     void setDensityArea( 
double area );
  1862     void setDensityAreaUnit( 
QgsUnitTypes::RenderUnit unit ) { mDensityAreaUnit = unit; }
  1898       QList<QPolygonF> rings;
  1901     QVector< Part > mCurrentParts;
  1905     std::unique_ptr< QgsMarkerSymbol > mMarker;
  1907     int mPointCount = 10;
  1908     double mDensityArea = 250.0;
  1911     unsigned long mSeed = 0;
  1912     bool mClipPoints = 
false;
  1914     bool mRenderingFeature = 
false;
  1939     QString layerType() 
const override;
  1945     void renderPolygon( 
const QPolygonF &points, QList<QPolygonF> *rings, 
QgsSymbolRenderContext &context ) 
override;
  1951     void toSld( QDomDocument &doc, QDomElement &element, 
const QgsStringMap &props ) 
const override;
  1953     void setColor( 
const QColor &color ) 
override;
  1954     QColor color() 
const override;
  1965     QSet<QString> usedAttributes( 
const QgsRenderContext &context ) 
const override;
  1966     bool hasDataDefinedProperties() 
const override;
  1983     bool mPointOnSurface = 
false;
  1984     bool mPointOnAllParts = 
true;
  1987     int mBiggestPartIndex = -1;
 QColor color2() const
Returns the color used for the endpoint of the shapeburst fill. 
 
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke. 
 
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
 
void setDistance(double d)
Sets the distance between lines in the fill pattern. 
 
const QgsMapUnitScale & displacementYMapUnitScale() const
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
 
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern. 
 
Qt::BrushStyle mBrushStyle
 
QString svgFilePath() const
Returns the path to the SVG file used to render the fill. 
 
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern. 
 
QColor strokeColor() const override
Gets stroke color. 
 
QgsMapUnitScale mOffsetYMapUnitScale
 
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
 
#define DEFAULT_SIMPLEFILL_JOINSTYLE
 
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset. 
 
QgsMapUnitScale mStrokeWidthMapUnitScale
 
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern. 
 
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale. 
 
Qt::PenStyle mStrokeStyle
 
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width. 
 
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content. 
 
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer. 
 
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width. 
 
Abstract base class for all rendered symbols. 
 
virtual void applyDataDefinedSettings(QgsSymbolRenderContext &context)
 
const QgsMapUnitScale & displacementXMapUnitScale() const
 
QString imageFilePath() const
The path to the raster image used for the fill. 
 
QPointF offset() const
Returns the offset for the shapeburst fill. 
 
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill. 
 
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient. Controls how the gradient stops are positioned. 
 
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid. 
 
Qt::PenJoinStyle penJoinStyle() const
 
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset. 
 
GradientSpread gradientSpread() const
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops...
 
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset. 
 
A symbol fill consisting of repeated parallel lines. 
 
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern. 
 
Base class for polygon renderers generating texture images. 
 
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width. 
 
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern. 
 
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill. 
 
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
 
bool setSubSymbol(QgsSymbol *symbol) override
Sets layer's subsymbol. takes ownership of the passed symbol. 
 
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern. 
 
bool hasDataDefinedProperties() const override
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
 
Abstract base class for color ramps. 
 
Helper functions for various unit types. 
 
virtual QColor strokeColor() const
Gets stroke color. 
 
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern. 
 
std::unique_ptr< QgsMarkerSymbol > mMarker
 
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape. 
 
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary...
 
const QgsMapUnitScale & strokeWidthMapUnitScale() const
 
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill. 
 
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale. 
 
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern. 
 
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern. 
 
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape. 
 
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset. 
 
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
 
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
 
#define DEFAULT_SIMPLEFILL_COLOR
 
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area. 
 
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width. 
 
A fill symbol layer which places markers at random locations within polygons. 
 
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
 
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor. 
 
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid. 
 
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
 
GradientColorType mGradientColorType
 
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke. 
 
QgsMapUnitScale mDistanceYMapUnitScale
 
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features...
 
QPointF referencePoint1() const
 
QMap< QString, QString > QgsStringMap
 
Tiling is based on complete map viewport. 
 
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) 
 
A marker symbol type, for rendering Point and MultiPoint geometries. 
 
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units fo the symbol's stroke width. 
 
void setStrokeWidth(double strokeWidth)
 
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e. 
 
A line symbol type, for rendering LineString and MultiLineString geometries. 
 
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present. 
 
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol. 
 
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area. 
 
QgsMapUnitScale mapUnitScale() const override
 
void setGradientType(GradientType gradientType)
 
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer. 
 
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset. 
 
void setMapUnitScale(const QgsMapUnitScale &scale) override
 
#define DEFAULT_SIMPLEFILL_STYLE
 
QgsMapUnitScale mDisplacementYMapUnitScale
 
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset. 
 
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
 
virtual void setColor(const QColor &color)
The fill color. 
 
double offsetY() const
Returns the vertical offset values for points in the pattern. 
 
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern. 
 
void setOffset(QPointF offset)
 
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
 
virtual void renderPolygon(const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolRenderContext &context)=0
 
QPointF referencePoint2() const
 
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading...
 
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
 
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer. 
 
void setLineAngle(double a)
Sets the angle for the parallel lines used to fill the symbol. 
 
const QgsMapUnitScale & distanceMapUnitScale() const
 
double strokeWidth() const
 
std::unique_ptr< QgsLineSymbol > mStroke
Custom stroke. 
 
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol. 
 
A class for filling symbols with a repeated raster image. 
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
 
QgsMapUnitScale mDistanceXMapUnitScale
 
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
 
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill. 
 
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer. 
 
void setWidth(const double width)
Sets the width for scaling the image used in the fill. 
 
double offsetX() const
Returns the horizontal offset values for points in the pattern. 
 
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern. 
 
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1]. 
 
void setFillColor(const QColor &color) override
Set fill color. 
 
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content. 
 
GradientType mGradientType
 
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern. 
 
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature. 
 
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width. 
 
double displacementX() const
 
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style. 
 
const QgsMapUnitScale & offsetMapUnitScale() const
 
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset. 
 
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance. 
 
void setStrokeStyle(Qt::PenStyle strokeStyle)
 
virtual QColor color() const
The fill color. 
 
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
 
bool referencePoint2IsCentroid() const
 
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern. 
 
CountMethod
Methods to define the number of points randomly filling the polygon. 
 
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings. 
 
QgsUnitTypes::RenderUnit offsetUnit() const
 
void setPenJoinStyle(Qt::PenJoinStyle style)
 
QColor fillColor() const override
Gets fill color. 
 
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width. 
 
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content. 
 
QgsMapUnitScale mDisplacementXMapUnitScale
 
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line width. 
 
QgsFillSymbolLayer & operator=(const QgsFillSymbolLayer &other)=delete
QgsFillSymbolLayer cannot be copied. 
 
Tiling is based on feature bounding box. 
 
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
 
void setOffset(QPointF offset)
Sets the offset for the fill. 
 
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
 
double lineWidth() const
Returns the width of the line subsymbol used to render the parallel lines in the fill. 
 
QgsMapUnitScale mOffsetXMapUnitScale
 
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width. 
 
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color. 
 
void setStrokeColor(const QColor &strokeColor) override
Set stroke color. 
 
void setOffset(QPointF offset)
Offset for gradient fill. 
 
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal distance between points in the pattern. 
 
void setDisplacementY(double d)
 
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style. 
 
Qt::BrushStyle brushStyle() const
 
GradientCoordinateMode mCoordinateMode
 
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance. 
 
GradientSpread mGradientSpread
 
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
 
A class for filling symbols with a repeated SVG file. 
 
virtual QgsMapUnitScale mapUnitScale() const
 
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer. 
 
Contains information about the context of a rendering operation. 
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset. 
 
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
 
void setGradientColorType(GradientColorType gradientColorType)
 
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content. 
 
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width. 
 
Struct for storing maximum and minimum scales for measurements in map units. 
 
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context. 
 
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle. 
 
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern. 
 
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern. 
 
The point count is part of a marker density count. 
 
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area. 
 
const QgsMapUnitScale & distanceXMapUnitScale() const
 
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width. 
 
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color. 
 
Qt::PenStyle strokeStyle() const
 
const QgsMapUnitScale & offsetMapUnitScale() const
 
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke. 
 
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
 
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created. 
 
Qt::PenJoinStyle mPenJoinStyle
 
const QgsMapUnitScale & distanceYMapUnitScale() const
 
FillCoordinateMode coordinateMode() const
Coordinate mode for fill. 
 
bool pointOnSurface() const
 
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e. 
 
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width. 
 
void setOffsetX(double offset)
Sets 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 setDistanceY(double d)
 
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded. 
 
bool referencePoint1IsCentroid() const
 
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
 
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features...
 
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary. 
 
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern. 
 
double estimateMaxBleed(const QgsRenderContext &context) const override
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
 
double opacity() const
Returns the opacity for the raster image used in the fill. 
 
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns the units for the line's width. 
 
void setColor2(const QColor &color2)
 
The point count is used as an absolute count of markers. 
 
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern. 
 
void setDistanceX(double d)
 
void setBrushStyle(Qt::BrushStyle style)
 
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill. 
 
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content. 
 
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset. 
 
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill. 
 
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill. 
 
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
 
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke. 
 
Resolves relative paths into absolute paths and vice versa. 
 
void setLineWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's width. 
 
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content. 
 
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Units for gradient fill offset. 
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset. 
 
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature. 
 
double distance() const
Returns the distance between lines in the fill pattern. 
 
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present. 
 
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width. 
 
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill. 
 
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical distance between points in the pattern. 
 
double displacementY() const
 
void setDisplacementX(double d)
 
double width() const
Returns the width used for scaling the image used in the fill. 
 
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill. 
 
const QgsMapUnitScale & offsetMapUnitScale() const
 
void setGradientSpread(GradientSpread gradientSpread)
 
FillCoordinateMode
Fill coordinate modes, dictates fill tiling behavior. 
 
QgsMapUnitScale mOffsetMapUnitScale
 
void setCoordinateMode(GradientCoordinateMode coordinateMode)
 
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1]. 
 
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance. 
 
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern. 
 
RenderUnit
Rendering size units. 
 
QgsMapUnitScale mStrokeWidthMapUnitScale
 
void setPointOnSurface(bool pointOnSurface)
 
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns the set of attributes referenced by the layer. 
 
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context. 
 
QPointF offset() const
Returns the offset for the fill. 
 
virtual QString layerType() const =0
Returns a string that represents this layer type. 
 
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary...
 
QgsMapUnitScale mOffsetMapUnitScale