QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsfillsymbollayer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfillsymbollayer.h
3  ---------------------
4  begin : November 2009
5  copyright : (C) 2009 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSFILLSYMBOLLAYER_H
17 #define QGSFILLSYMBOLLAYER_H
18 
19 #include "qgis_core.h"
20 #include "qgis.h"
21 #include "qgssymbollayer.h"
22 
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
29 
30 #define INF 1E20
31 
32 #include <QPen>
33 #include <QBrush>
34 
39 class CORE_EXPORT QgsSimpleFillSymbolLayer : public QgsFillSymbolLayer
40 {
41  public:
43  Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
44  const QColor &strokeColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
45  Qt::PenStyle strokeStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
46  double strokeWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
47  Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
48  );
49 
50  // static stuff
51 
57  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
58  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
59 
60  // implemented from base classes
61 
62  QString layerType() const override;
63 
64  void startRender( QgsSymbolRenderContext &context ) override;
65 
66  void stopRender( QgsSymbolRenderContext &context ) override;
67 
68  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
69 
70  QgsStringMap properties() const override;
71 
72  QgsSimpleFillSymbolLayer *clone() const override SIP_FACTORY;
73 
74  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
75 
76  QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
77 
78  Qt::BrushStyle brushStyle() const { return mBrushStyle; }
79  void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
80 
81  QColor strokeColor() const override { return mStrokeColor; }
82  void setStrokeColor( const QColor &strokeColor ) override { mStrokeColor = strokeColor; }
83 
84  QColor fillColor() const override { return color(); }
85  void setFillColor( const QColor &color ) override { setColor( color ); }
86 
87  Qt::PenStyle strokeStyle() const { return mStrokeStyle; }
88  void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
89 
90  double strokeWidth() const { return mStrokeWidth; }
91  void setStrokeWidth( double strokeWidth ) { mStrokeWidth = strokeWidth; }
92 
93  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
94  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
95 
96  void setOffset( QPointF offset ) { mOffset = offset; }
97  QPointF offset() { return mOffset; }
98 
104  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
105 
110  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
111 
112  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
113  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
114 
120  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
121 
126  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
127 
128  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
129  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
130 
131  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
132  QgsUnitTypes::RenderUnit outputUnit() const override;
133 
134  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
135  QgsMapUnitScale mapUnitScale() const override;
136 
137  double estimateMaxBleed( const QgsRenderContext &context ) const override;
138 
139  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
140  QColor dxfColor( QgsSymbolRenderContext &context ) const override;
141  double dxfAngle( QgsSymbolRenderContext &context ) const override;
142 
143  Qt::PenStyle dxfPenStyle() const override;
144  QColor dxfBrushColor( QgsSymbolRenderContext &context ) const override;
145  Qt::BrushStyle dxfBrushStyle() const override;
146 
147  protected:
148  QBrush mBrush;
149  QBrush mSelBrush;
150  Qt::BrushStyle mBrushStyle;
151  QColor mStrokeColor;
152  Qt::PenStyle mStrokeStyle;
153  double mStrokeWidth;
156  Qt::PenJoinStyle mPenJoinStyle;
157  QPen mPen;
158  QPen mSelPen;
159 
160  QPointF mOffset;
163 
164  private:
165  //helper functions for data defined symbology
166  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
167 };
168 
169 class QgsColorRamp;
170 
176 {
177  public:
178 
180  {
182  ColorRamp
183  };
184 
186  {
189  Conical
190  };
191 
193  {
195  Viewport
196  };
197 
199  {
202  Repeat
203  };
204 
206  const QColor &color2 = Qt::white,
207  GradientColorType gradientColorType = SimpleTwoColor,
208  GradientType gradientType = Linear,
209  GradientCoordinateMode coordinateMode = Feature,
210  GradientSpread gradientSpread = Pad
211  );
212 
213  ~QgsGradientFillSymbolLayer() override;
214 
215  // static stuff
216 
222  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
223 
224  // implemented from base classes
225 
226  QString layerType() const override;
227 
228  void startRender( QgsSymbolRenderContext &context ) override;
229 
230  void stopRender( QgsSymbolRenderContext &context ) override;
231 
232  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
233 
234  QgsStringMap properties() const override;
235 
236  QgsGradientFillSymbolLayer *clone() const override SIP_FACTORY;
237 
238  double estimateMaxBleed( const QgsRenderContext &context ) const override;
239 
241  GradientType gradientType() const { return mGradientType; }
242  void setGradientType( GradientType gradientType ) { mGradientType = gradientType; }
243 
245  GradientColorType gradientColorType() const { return mGradientColorType; }
246  void setGradientColorType( GradientColorType gradientColorType ) { mGradientColorType = gradientColorType; }
247 
254  QgsColorRamp *colorRamp() { return mGradientRamp; }
255 
263  void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
264 
266  QColor color2() const { return mColor2; }
267  void setColor2( const QColor &color2 ) { mColor2 = color2; }
268 
270  GradientCoordinateMode coordinateMode() const { return mCoordinateMode; }
271  void setCoordinateMode( GradientCoordinateMode coordinateMode ) { mCoordinateMode = coordinateMode; }
272 
274  GradientSpread gradientSpread() const { return mGradientSpread; }
275  void setGradientSpread( GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
276 
278  void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
279  QPointF referencePoint1() const { return mReferencePoint1; }
280 
282  void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
283  bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
284 
286  void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
287  QPointF referencePoint2() const { return mReferencePoint2; }
288 
290  void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
291  bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
292 
294  void setOffset( QPointF offset ) { mOffset = offset; }
295  QPointF offset() const { return mOffset; }
296 
298  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
299  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
300 
301  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
302  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
303 
304  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
305  QgsUnitTypes::RenderUnit outputUnit() const override;
306 
307  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
308  QgsMapUnitScale mapUnitScale() const override;
309 
310  protected:
311  QBrush mBrush;
312  QBrush mSelBrush;
313 
315  QColor mColor2;
316  QgsColorRamp *mGradientRamp = nullptr;
320 
322  bool mReferencePoint1IsCentroid = false;
324  bool mReferencePoint2IsCentroid = false;
325 
326  QPointF mOffset;
329 
330  private:
331 
332  //helper functions for data defined symbology
333  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, const QPolygonF &points );
334 
336  void applyGradient( const QgsSymbolRenderContext &context, QBrush &brush, const QColor &color, const QColor &color2,
337  GradientColorType gradientColorType, QgsColorRamp *gradientRamp, GradientType gradientType,
338  GradientCoordinateMode coordinateMode, GradientSpread gradientSpread,
339  QPointF referencePoint1, QPointF referencePoint2, double angle );
340 
342  QPointF rotateReferencePoint( QPointF refPoint, double angle );
343 };
344 
350 {
351  public:
352 
354  {
356  ColorRamp
357  };
358 
359  QgsShapeburstFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR, const QColor &color2 = Qt::white,
360  ShapeburstColorType colorType = SimpleTwoColor,
361  int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
362 
363  ~QgsShapeburstFillSymbolLayer() override;
364 
370 
376 
377  // static stuff
378 
384  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
385 
386  // implemented from base classes
387 
388  QString layerType() const override;
389 
390  void startRender( QgsSymbolRenderContext &context ) override;
391 
392  void stopRender( QgsSymbolRenderContext &context ) override;
393 
394  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
395 
396  QgsStringMap properties() const override;
397 
398  QgsShapeburstFillSymbolLayer *clone() const override SIP_FACTORY;
399 
400  double estimateMaxBleed( const QgsRenderContext &context ) const override;
401 
408  void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
409 
416  int blurRadius() const { return mBlurRadius; }
417 
426  void setUseWholeShape( bool useWholeShape ) { mUseWholeShape = useWholeShape; }
427 
435  bool useWholeShape() const { return mUseWholeShape; }
436 
445  void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
446 
455  double maxDistance() const { return mMaxDistance; }
456 
464  void setDistanceUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceUnit = unit; }
465 
473  QgsUnitTypes::RenderUnit distanceUnit() const { return mDistanceUnit; }
474 
475  void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
476  const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
477 
488  void setColorType( ShapeburstColorType colorType ) { mColorType = colorType; }
489 
500  ShapeburstColorType colorType() const { return mColorType; }
501 
511  void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
512 
520  QgsColorRamp *colorRamp() { return mGradientRamp.get(); }
521 
529  void setColor2( const QColor &color2 ) { mColor2 = color2; }
530 
538  QColor color2() const { return mColor2; }
539 
547  void setIgnoreRings( bool ignoreRings ) { mIgnoreRings = ignoreRings; }
548 
555  bool ignoreRings() const { return mIgnoreRings; }
556 
564  void setOffset( QPointF offset ) { mOffset = offset; }
565 
573  QPointF offset() const { return mOffset; }
574 
582  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
583 
591  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
592 
593  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
594  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
595 
596  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
597  QgsUnitTypes::RenderUnit outputUnit() const override;
598 
599  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
600  QgsMapUnitScale mapUnitScale() const override;
601 
602  private:
603  QBrush mBrush;
604  QBrush mSelBrush;
605 
606  int mBlurRadius = 0;
607 
608  bool mUseWholeShape = true;
609  double mMaxDistance = 5.0;
611  QgsMapUnitScale mDistanceMapUnitScale;
612 
613  ShapeburstColorType mColorType = SimpleTwoColor;
614  QColor mColor2;
615 
616  bool mIgnoreRings = false;
617 
618  QPointF mOffset;
620  QgsMapUnitScale mOffsetMapUnitScale;
621 
622  std::unique_ptr< QgsColorRamp > mGradientRamp;
623 
624  //helper functions for data defined symbology
625  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QColor &color, QColor &color2, int &blurRadius, bool &useWholeShape,
626  double &maxDistance, bool &ignoreRings );
627 
628  /* distance transform of a 1d function using squared distance */
629  void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
630  /* distance transform of 2d function using squared distance */
631  void distanceTransform2d( double *im, int width, int height, QgsRenderContext &context );
632  /* distance transform of a binary QImage */
633  double *distanceTransform( QImage *im, QgsRenderContext &context );
634 
635  /* fills a QImage with values from an array of doubles containing squared distance transform values */
636  void dtArrayToQImage( double *array, QImage *im, QgsColorRamp *ramp, QgsRenderContext &context, bool useWholeShape = true, int maxPixelDistance = 0 );
637 
638 #ifdef SIP_RUN
640 #endif
641 };
642 
647 {
648  public:
649 
651  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
652 
653  QgsSymbol *subSymbol() override { return mStroke.get(); }
654  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
655 
661  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
662 
668  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
669 
676  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
677 
686  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
687 
688  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
689  QgsUnitTypes::RenderUnit outputUnit() const override;
690  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
691  QgsMapUnitScale mapUnitScale() const override;
692  double estimateMaxBleed( const QgsRenderContext &context ) const override;
693  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
694  QColor dxfColor( QgsSymbolRenderContext &context ) const override;
695  Qt::PenStyle dxfPenStyle() const override;
696  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
697  bool hasDataDefinedProperties() const override;
698 
699  protected:
700  QBrush mBrush;
701  double mNextAngle = 0.0; // mAngle / data defined angle
702 
704  double mStrokeWidth = 0.0;
707 
709  std::unique_ptr< QgsLineSymbol > mStroke;
710 
711  virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context ) { Q_UNUSED( context ) }
712 
713  private:
714 #ifdef SIP_RUN
716 #endif
717 };
718 
726 {
727  public:
728 
731  {
734  };
735 
740  QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
741 
746  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
747 
753  static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
754 
755  // implemented from base classes
756  QString layerType() const override;
757  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
758  void startRender( QgsSymbolRenderContext &context ) override;
759  void stopRender( QgsSymbolRenderContext &context ) override;
760  QgsStringMap properties() const override;
761  QgsRasterFillSymbolLayer *clone() const override SIP_FACTORY;
762  double estimateMaxBleed( const QgsRenderContext &context ) const override;
763 
764  //override QgsImageFillSymbolLayer's support for sub symbols
765  QgsSymbol *subSymbol() override { return nullptr; }
766  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
767 
773  void setImageFilePath( const QString &imagePath );
774 
780  QString imageFilePath() const { return mImageFilePath; }
781 
788  void setCoordinateMode( FillCoordinateMode mode );
789 
796  FillCoordinateMode coordinateMode() const { return mCoordinateMode; }
797 
803  void setOpacity( double opacity );
804 
810  double opacity() const { return mOpacity; }
811 
819  void setOffset( QPointF offset ) { mOffset = offset; }
820 
828  QPointF offset() const { return mOffset; }
829 
837  void setOffsetUnit( const QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
838 
846  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
847 
855  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
856 
864  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
865 
874  void setWidth( const double width ) { mWidth = width; }
875 
884  double width() const { return mWidth; }
885 
893  void setWidthUnit( const QgsUnitTypes::RenderUnit unit ) { mWidthUnit = unit; }
894 
902  QgsUnitTypes::RenderUnit widthUnit() const { return mWidthUnit; }
903 
911  void setWidthMapUnitScale( const QgsMapUnitScale &scale ) { mWidthMapUnitScale = scale; }
912 
920  const QgsMapUnitScale &widthMapUnitScale() const { return mWidthMapUnitScale; }
921 
922  protected:
923 
924  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
925 
926  private:
927 
929  QString mImageFilePath;
930  FillCoordinateMode mCoordinateMode = QgsRasterFillSymbolLayer::Feature;
931  double mOpacity = 1.0;
932 
933  QPointF mOffset;
935  QgsMapUnitScale mOffsetMapUnitScale;
936 
937  double mWidth = 0.0;
939  QgsMapUnitScale mWidthMapUnitScale;
940 
942  void applyPattern( QBrush &brush, const QString &imageFilePath, double width, double opacity,
943  const QgsSymbolRenderContext &context );
944 };
945 
951 {
952  public:
953 
957  QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
958 
962  QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
963 
968  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
969 
974  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
975 
981  static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
982 
983  // implemented from base classes
984 
985  QString layerType() const override;
986  void startRender( QgsSymbolRenderContext &context ) override;
987  void stopRender( QgsSymbolRenderContext &context ) override;
988  QgsStringMap properties() const override;
989  QgsSVGFillSymbolLayer *clone() const override SIP_FACTORY;
990  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
991 
1003  void setSvgFilePath( const QString &svgPath );
1004 
1010  QString svgFilePath() const { return mSvgFilePath; }
1011 
1021  void setPatternWidth( double width ) { mPatternWidth = width;}
1022 
1032  double patternWidth() const { return mPatternWidth; }
1033 
1043  void setSvgFillColor( const QColor &c ) { setColor( c ); }
1044 
1053  QColor svgFillColor() const { return color(); }
1054 
1064  void setSvgStrokeColor( const QColor &c ) { mSvgStrokeColor = c; }
1065 
1074  QColor svgStrokeColor() const { return mSvgStrokeColor; }
1075 
1086  void setSvgStrokeWidth( double w ) { mSvgStrokeWidth = w; }
1087 
1098  double svgStrokeWidth() const { return mSvgStrokeWidth; }
1099 
1107  void setPatternWidthUnit( QgsUnitTypes::RenderUnit unit ) { mPatternWidthUnit = unit; }
1108 
1116  QgsUnitTypes::RenderUnit patternWidthUnit() const { return mPatternWidthUnit; }
1117 
1125  void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale ) { mPatternWidthMapUnitScale = scale; }
1126 
1134  const QgsMapUnitScale &patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
1135 
1143  void setSvgStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mSvgStrokeWidthUnit = unit; }
1144 
1152  QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const { return mSvgStrokeWidthUnit; }
1153 
1161  void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mSvgStrokeWidthMapUnitScale = scale; }
1162 
1170  const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const { return mSvgStrokeWidthMapUnitScale; }
1171 
1172  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1173  QgsUnitTypes::RenderUnit outputUnit() const override;
1174 
1175  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1176  QgsMapUnitScale mapUnitScale() const override;
1177 
1178  protected:
1179 
1180  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1181 
1182  private:
1183 
1185  double mPatternWidth = 20;
1187  QgsMapUnitScale mPatternWidthMapUnitScale;
1188 
1190  QByteArray mSvgData;
1192  QString mSvgFilePath;
1194  QRectF mSvgViewBox;
1195 
1196  //param(fill), param(stroke), param(stroke-width) are going
1197  //to be replaced in memory
1198  QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1199  double mSvgStrokeWidth = 0.2;
1201  QgsMapUnitScale mSvgStrokeWidthMapUnitScale;
1202 
1204  void storeViewBox();
1205  void setDefaultSvgParams(); //fills mSvgFillColor, mSvgStrokeColor, mSvgStrokeWidth with default values for mSvgFilePath
1206 
1208  void applyPattern( QBrush &brush, const QString &svgFilePath, double patternWidth, QgsUnitTypes::RenderUnit patternWidthUnit, const QColor &svgFillColor, const QColor &svgStrokeColor,
1209  double svgStrokeWidth, QgsUnitTypes::RenderUnit svgStrokeWidthUnit, const QgsSymbolRenderContext &context, const QgsMapUnitScale &patternWidthMapUnitScale, const QgsMapUnitScale &svgStrokeWidthMapUnitScale );
1210 };
1211 
1218 {
1219  public:
1221  ~QgsLinePatternFillSymbolLayer() override;
1222 
1227  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
1228 
1233  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1234 
1235  QString layerType() const override;
1236  void startRender( QgsSymbolRenderContext &context ) override;
1237  void stopRender( QgsSymbolRenderContext &context ) override;
1238  QgsStringMap properties() const override;
1240  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
1241  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1242 
1243  QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
1244 
1252  void setLineAngle( double a ) { mLineAngle = a; }
1253 
1261  double lineAngle() const { return mLineAngle; }
1262 
1269  void setDistance( double d ) { mDistance = d; }
1270 
1276  double distance() const { return mDistance; }
1277 
1284  void setLineWidth( double w );
1285 
1292  double lineWidth() const { return mLineWidth; }
1293 
1294  void setColor( const QColor &c ) override;
1295  QColor color() const override;
1296 
1308  void setOffset( double offset ) { mOffset = offset; }
1309 
1321  double offset() const { return mOffset; }
1322 
1329  void setDistanceUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceUnit = unit; }
1330 
1337  QgsUnitTypes::RenderUnit distanceUnit() const { return mDistanceUnit; }
1338 
1346  void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
1347 
1355  const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
1356 
1362  void setLineWidthUnit( QgsUnitTypes::RenderUnit unit ) { mLineWidthUnit = unit; }
1363 
1369  QgsUnitTypes::RenderUnit lineWidthUnit() const { return mLineWidthUnit; }
1370 
1378  void setLineWidthMapUnitScale( const QgsMapUnitScale &scale ) { mLineWidthMapUnitScale = scale; }
1379 
1387  const QgsMapUnitScale &lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
1388 
1394  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
1395 
1401  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
1402 
1410  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
1411 
1419  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1420 
1421  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1422  QgsUnitTypes::RenderUnit outputUnit() const override;
1423  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1424  QgsMapUnitScale mapUnitScale() const override;
1425  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1426  QgsSymbol *subSymbol() override;
1427  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1428  bool hasDataDefinedProperties() const override;
1429 
1430  protected:
1431 
1432  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1433 
1434  private:
1436  double mDistance = 5.0;
1438  QgsMapUnitScale mDistanceMapUnitScale;
1440  double mLineWidth = 0;
1442  QgsMapUnitScale mLineWidthMapUnitScale;
1444  double mLineAngle = 45.0;
1446  double mOffset = 0.0;
1448  QgsMapUnitScale mOffsetMapUnitScale;
1449 
1450 #ifdef SIP_RUN
1452 #endif
1453 
1455  void applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double lineAngle, double distance );
1456 
1458  QgsLineSymbol *mFillLineSymbol = nullptr;
1459 };
1460 
1466 {
1467  public:
1469  ~QgsPointPatternFillSymbolLayer() override;
1470 
1476  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
1477  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1478 
1479  QString layerType() const override;
1480 
1481  void startRender( QgsSymbolRenderContext &context ) override;
1482  void stopRender( QgsSymbolRenderContext &context ) override;
1483  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1484 
1485  QgsStringMap properties() const override;
1486 
1488 
1489  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
1490 
1491  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1492 
1493  //getters and setters
1494  double distanceX() const { return mDistanceX; }
1495  void setDistanceX( double d ) { mDistanceX = d; }
1496 
1497  double distanceY() const { return mDistanceY; }
1498  void setDistanceY( double d ) { mDistanceY = d; }
1499 
1500  double displacementX() const { return mDisplacementX; }
1501  void setDisplacementX( double d ) { mDisplacementX = d; }
1502 
1503  double displacementY() const { return mDisplacementY; }
1504  void setDisplacementY( double d ) { mDisplacementY = d; }
1505 
1513  void setOffsetX( double offset ) { mOffsetX = offset; }
1514 
1521  double offsetX() const { return mOffsetX; }
1522 
1530  void setOffsetY( double offset ) { mOffsetY = offset; }
1531 
1538  double offsetY() const { return mOffsetY; }
1539 
1540  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1541  QgsSymbol *subSymbol() override { return mMarkerSymbol; }
1542 
1549  void setDistanceXUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceXUnit = unit; }
1550 
1556  QgsUnitTypes::RenderUnit distanceXUnit() const { return mDistanceXUnit; }
1557 
1558  void setDistanceXMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceXMapUnitScale = scale; }
1559  const QgsMapUnitScale &distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
1560 
1567  void setDistanceYUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceYUnit = unit; }
1568 
1574  QgsUnitTypes::RenderUnit distanceYUnit() const { return mDistanceYUnit; }
1575 
1576  void setDistanceYMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceYMapUnitScale = scale; }
1577  const QgsMapUnitScale &distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
1578 
1585  void setDisplacementXUnit( QgsUnitTypes::RenderUnit unit ) { mDisplacementXUnit = unit; }
1586 
1592  QgsUnitTypes::RenderUnit displacementXUnit() const { return mDisplacementXUnit; }
1593 
1594  void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementXMapUnitScale = scale; }
1595  const QgsMapUnitScale &displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
1596 
1603  void setDisplacementYUnit( QgsUnitTypes::RenderUnit unit ) { mDisplacementYUnit = unit; }
1604 
1610  QgsUnitTypes::RenderUnit displacementYUnit() const { return mDisplacementYUnit; }
1611 
1612  void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementYMapUnitScale = scale; }
1613  const QgsMapUnitScale &displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
1614 
1622  void setOffsetXUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetXUnit = unit; }
1623 
1630  QgsUnitTypes::RenderUnit offsetXUnit() const { return mOffsetXUnit; }
1631 
1639  void setOffsetXMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetXMapUnitScale = scale; }
1640 
1647  const QgsMapUnitScale &offsetXMapUnitScale() const { return mOffsetXMapUnitScale; }
1648 
1656  void setOffsetYUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetYUnit = unit; }
1657 
1664  QgsUnitTypes::RenderUnit offsetYUnit() const { return mOffsetYUnit; }
1665 
1673  void setOffsetYMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetYMapUnitScale = scale; }
1674 
1681  const QgsMapUnitScale &offsetYMapUnitScale() const { return mOffsetYMapUnitScale; }
1682 
1683  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1684  QgsUnitTypes::RenderUnit outputUnit() const override;
1685 
1686  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1687  QgsMapUnitScale mapUnitScale() const override;
1688 
1689  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1690  bool hasDataDefinedProperties() const override;
1691  void setColor( const QColor &c ) override;
1692  QColor color() const override;
1693 
1694  protected:
1695  QgsMarkerSymbol *mMarkerSymbol = nullptr;
1696  double mDistanceX = 15;
1699  double mDistanceY = 15;
1702  double mDisplacementX = 0;
1705  double mDisplacementY = 0;
1708  double mOffsetX = 0;
1711  double mOffsetY = 0;
1714 
1715  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1716 
1717  private:
1718 #ifdef SIP_RUN
1720 #endif
1721 
1722  void applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double distanceX, double distanceY,
1723  double displacementX, double displacementY, double offsetX, double offsetY );
1724 
1725  bool mRenderUsingMarkers = false;
1726 };
1727 
1737 {
1738  public:
1739 
1742  {
1745  };
1746 
1753  QgsRandomMarkerFillSymbolLayer( int pointCount = 10, CountMethod method = AbsoluteCount, double densityArea = 250.0, unsigned long seed = 0 );
1754 
1760  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
1761 
1762  QString layerType() const override;
1763  void startRender( QgsSymbolRenderContext &context ) override;
1764  void stopRender( QgsSymbolRenderContext &context ) override;
1765  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1766  QgsStringMap properties() const override;
1767  QgsRandomMarkerFillSymbolLayer *clone() const override SIP_FACTORY;
1768 
1769  void setColor( const QColor &color ) override;
1770  QColor color() const override;
1771 
1772  QgsSymbol *subSymbol() override;
1773  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1774 
1775  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1776  QgsUnitTypes::RenderUnit outputUnit() const override;
1777 
1778  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1779  QgsMapUnitScale mapUnitScale() const override;
1780 
1781  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1782  bool hasDataDefinedProperties() const override;
1783 
1789  int pointCount() const;
1790 
1796  void setPointCount( int count );
1797 
1803  unsigned long seed() const;
1804 
1812  void setSeed( unsigned long seed );
1813 
1819  bool clipPoints() const;
1820 
1826  void setClipPoints( bool clipped );
1827 
1833  CountMethod countMethod() const;
1834 
1840  void setCountMethod( CountMethod method );
1841 
1851  double densityArea() const;
1852 
1858  void setDensityArea( double area );
1859 
1865  void setDensityAreaUnit( QgsUnitTypes::RenderUnit unit ) { mDensityAreaUnit = unit; }
1866 
1871  QgsUnitTypes::RenderUnit densityAreaUnit() const { return mDensityAreaUnit; }
1872 
1880  void setDensityAreaUnitScale( const QgsMapUnitScale &scale ) { mDensityAreaUnitScale = scale; }
1881 
1888  const QgsMapUnitScale &densityAreaUnitScale() const { return mDensityAreaUnitScale; }
1889 
1890  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1891  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1892 
1893  private:
1894 #ifdef SIP_RUN
1896 #endif
1897 
1898  struct Part
1899  {
1900  QPolygonF exterior;
1901  QVector<QPolygonF> rings;
1902  };
1903 
1904  QVector< Part > mCurrentParts;
1905 
1906  void render( QgsRenderContext &context, const QVector< Part > &parts, const QgsFeature &feature, bool selected );
1907 
1908  std::unique_ptr< QgsMarkerSymbol > mMarker;
1909  CountMethod mCountMethod = AbsoluteCount;
1910  int mPointCount = 10;
1911  double mDensityArea = 250.0;
1913  QgsMapUnitScale mDensityAreaUnitScale;
1914  unsigned long mSeed = 0;
1915  bool mClipPoints = false;
1916 
1917  bool mRenderingFeature = false;
1918 };
1919 
1920 
1926 {
1927  public:
1929 
1930  // static stuff
1931 
1937  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
1938  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1939 
1940  // implemented from base classes
1941 
1942  QString layerType() const override;
1943 
1944  void startRender( QgsSymbolRenderContext &context ) override;
1945 
1946  void stopRender( QgsSymbolRenderContext &context ) override;
1947 
1948  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1949 
1950  QgsStringMap properties() const override;
1951 
1952  QgsCentroidFillSymbolLayer *clone() const override SIP_FACTORY;
1953 
1954  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
1955 
1956  void setColor( const QColor &color ) override;
1957  QColor color() const override;
1958 
1959  QgsSymbol *subSymbol() override;
1960  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1961 
1962  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1963  QgsUnitTypes::RenderUnit outputUnit() const override;
1964 
1965  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1966  QgsMapUnitScale mapUnitScale() const override;
1967 
1968  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1969  bool hasDataDefinedProperties() const override;
1970 
1971  void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
1972  bool pointOnSurface() const { return mPointOnSurface; }
1973 
1978  void setPointOnAllParts( bool pointOnAllParts ) { mPointOnAllParts = pointOnAllParts; }
1979 
1984  bool pointOnAllParts() const { return mPointOnAllParts; }
1985 
1992  bool clipPoints() const { return mClipPoints; }
1993 
2000  void setClipPoints( bool clipPoints ) { mClipPoints = clipPoints; }
2001 
2008  bool clipOnCurrentPartOnly() const { return mClipOnCurrentPartOnly; }
2009 
2016  void setClipOnCurrentPartOnly( bool clipOnCurrentPartOnly ) { mClipOnCurrentPartOnly = clipOnCurrentPartOnly; }
2017 
2018  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2019  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2020 
2021  protected:
2022 
2023  std::unique_ptr< QgsMarkerSymbol > mMarker;
2024  bool mPointOnSurface = false;
2025  bool mPointOnAllParts = true;
2026  bool mClipPoints = false;
2027  bool mClipOnCurrentPartOnly = false;
2028 
2029  bool mRenderingFeature = false;
2030 
2031  QgsFeatureId mCurrentFeatureId = -1;
2032  int mBiggestPartIndex = -1;
2033 
2034  private:
2035 #ifdef SIP_RUN
2037 #endif
2038  struct Part
2039  {
2040  QPolygonF exterior;
2041  QVector<QPolygonF> rings;
2042  };
2043 
2044  void render( QgsRenderContext &context, const QVector<Part> &parts, const QgsFeature &feature, bool selected );
2045  QVector<Part> mCurrentParts;
2046 };
2047 
2048 #endif
2049 
2050 
QgsCentroidFillSymbolLayer::pointOnAllParts
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
Definition: qgsfillsymbollayer.h:1984
QgsSVGFillSymbolLayer::setSvgStrokeColor
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1064
QgsSimpleFillSymbolLayer::strokeColor
QColor strokeColor() const override
Gets stroke color.
Definition: qgsfillsymbollayer.h:81
QgsSymbolLayer::mapUnitScale
virtual QgsMapUnitScale mapUnitScale() const
Definition: qgssymbollayer.h:390
QgsPointPatternFillSymbolLayer
Definition: qgsfillsymbollayer.h:1465
QgsImageFillSymbolLayer::setSubSymbol
bool setSubSymbol(QgsSymbol *symbol) override
Sets layer's subsymbol. takes ownership of the passed symbol.
Definition: qgsfillsymbollayer.cpp:1641
QgsColorRamp
Abstract base class for color ramps.
Definition: qgscolorramp.h:31
QgsImageFillSymbolLayer::hasDataDefinedProperties
bool hasDataDefinedProperties() const override
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Definition: qgsfillsymbollayer.cpp:1740
QgsPointPatternFillSymbolLayer::displacementY
double displacementY() const
Definition: qgsfillsymbollayer.h:1503
QgsGradientFillSymbolLayer::setReferencePoint2
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayer.h:286
QgsRandomMarkerFillSymbolLayer::setDensityAreaUnitScale
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
Definition: qgsfillsymbollayer.h:1880
QgsShapeburstFillSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:593
QgsGradientFillSymbolLayer::mGradientColorType
GradientColorType mGradientColorType
Definition: qgsfillsymbollayer.h:314
QgsPointPatternFillSymbolLayer::mOffsetXMapUnitScale
QgsMapUnitScale mOffsetXMapUnitScale
Definition: qgsfillsymbollayer.h:1710
QgsPointPatternFillSymbolLayer::mDisplacementXMapUnitScale
QgsMapUnitScale mDisplacementXMapUnitScale
Definition: qgsfillsymbollayer.h:1704
QgsRasterFillSymbolLayer::setWidthUnit
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width.
Definition: qgsfillsymbollayer.h:893
QgsSymbolLayer::setSubSymbol
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
Definition: qgssymbollayer.h:351
QgsPointPatternFillSymbolLayer::setOffsetYMapUnitScale
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1673
QgsGradientFillSymbolLayer::offset
QPointF offset() const
Definition: qgsfillsymbollayer.h:295
QgsSymbolLayer::startFeatureRender
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
Definition: qgssymbollayer.cpp:117
QgsSimpleFillSymbolLayer::strokeWidthMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Definition: qgsfillsymbollayer.h:113
QgsSymbolLayer::dxfAngle
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle.
Definition: qgssymbollayer.cpp:157
QgsGradientFillSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Definition: qgsfillsymbollayer.h:299
QgsRasterFillSymbolLayer::opacity
double opacity() const
Returns the opacity for the raster image used in the fill.
Definition: qgsfillsymbollayer.h:810
QgsUnitTypes::RenderUnit
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:166
QgsDxfExport
Definition: qgsdxfexport.h:62
QgsRasterFillSymbolLayer::Feature
@ Feature
Tiling is based on feature bounding box.
Definition: qgsfillsymbollayer.h:732
QgsLinePatternFillSymbolLayer::setOffsetUnit
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset.
Definition: qgsfillsymbollayer.h:1394
QgsSVGFillSymbolLayer::svgStrokeWidth
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1098
QgsGradientFillSymbolLayer::setCoordinateMode
void setCoordinateMode(GradientCoordinateMode coordinateMode)
Definition: qgsfillsymbollayer.h:271
QgsLinePatternFillSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
Definition: qgsfillsymbollayer.h:1419
QgsSVGFillSymbolLayer::setSvgFillColor
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1043
QgsSymbolLayer::dxfPenStyle
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
Definition: qgssymbollayer.cpp:169
QgsSimpleFillSymbolLayer::setStrokeWidthUnit
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke.
Definition: qgsfillsymbollayer.h:104
QgsRandomMarkerFillSymbolLayer::densityAreaUnitScale
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
Definition: qgsfillsymbollayer.h:1888
QgsRandomMarkerFillSymbolLayer::CountMethod
CountMethod
Methods to define the number of points randomly filling the polygon.
Definition: qgsfillsymbollayer.h:1741
QgsShapeburstFillSymbolLayer::setIgnoreRings
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
Definition: qgsfillsymbollayer.h:547
QgsRasterFillSymbolLayer::setWidthMapUnitScale
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
Definition: qgsfillsymbollayer.h:911
QgsGradientFillSymbolLayer::GradientType
GradientType
Definition: qgsfillsymbollayer.h:185
QgsPointPatternFillSymbolLayer::mDistanceYMapUnitScale
QgsMapUnitScale mDistanceYMapUnitScale
Definition: qgsfillsymbollayer.h:1701
QgsPointPatternFillSymbolLayer::setDistanceYMapUnitScale
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:1576
QgsGradientFillSymbolLayer
Definition: qgsfillsymbollayer.h:175
QgsShapeburstFillSymbolLayer::ShapeburstColorType
ShapeburstColorType
Definition: qgsfillsymbollayer.h:353
QgsGradientFillSymbolLayer::gradientColorType
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
Definition: qgsfillsymbollayer.h:245
QgsSVGFillSymbolLayer::svgStrokeWidthUnit
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width.
Definition: qgsfillsymbollayer.h:1152
QgsSimpleFillSymbolLayer::mOffset
QPointF mOffset
Definition: qgsfillsymbollayer.h:160
QgsSimpleFillSymbolLayer::strokeWidthUnit
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
Definition: qgsfillsymbollayer.h:110
QgsLinePatternFillSymbolLayer::distance
double distance() const
Returns the distance between lines in the fill pattern.
Definition: qgsfillsymbollayer.h:1276
QgsLinePatternFillSymbolLayer::setLineWidthUnit
void setLineWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's width.
Definition: qgsfillsymbollayer.h:1362
QgsImageFillSymbolLayer::setStrokeWidthMapUnitScale
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
Definition: qgsfillsymbollayer.h:676
QgsPointPatternFillSymbolLayer::offsetYUnit
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1664
QgsSimpleFillSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:128
QgsGradientFillSymbolLayer::GradientCoordinateMode
GradientCoordinateMode
Definition: qgsfillsymbollayer.h:192
QgsSymbolLayer::setColor
virtual void setColor(const QColor &color)
The fill color.
Definition: qgssymbollayer.h:231
QgsImageFillSymbolLayer::setStrokeWidthUnit
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units fo the symbol's stroke width.
Definition: qgsfillsymbollayer.h:661
QgsShapeburstFillSymbolLayer::setColor2
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayer.h:529
QgsImageFillSymbolLayer::applyDataDefinedSettings
virtual void applyDataDefinedSettings(QgsSymbolRenderContext &context)
Definition: qgsfillsymbollayer.h:711
QgsSimpleFillSymbolLayer::offset
QPointF offset()
Definition: qgsfillsymbollayer.h:97
QgsGradientFillSymbolLayer::mSelBrush
QBrush mSelBrush
Definition: qgsfillsymbollayer.h:312
QgsSimpleFillSymbolLayer::mOffsetMapUnitScale
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayer.h:162
QgsImageFillSymbolLayer::strokeWidthMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
Definition: qgsfillsymbollayer.h:686
QgsSymbolLayer::color
virtual QColor color() const
The fill color.
Definition: qgssymbollayer.h:226
QgsLinePatternFillSymbolLayer::lineAngle
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
Definition: qgsfillsymbollayer.h:1261
QgsGradientFillSymbolLayer::mBrush
QBrush mBrush
Definition: qgsfillsymbollayer.h:311
QgsShapeburstFillSymbolLayer::setMaxDistance
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
Definition: qgsfillsymbollayer.h:445
QgsImageFillSymbolLayer::mapUnitScale
QgsMapUnitScale mapUnitScale() const override
Definition: qgsfillsymbollayer.cpp:1681
QgsImageFillSymbolLayer::outputUnit
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
Definition: qgsfillsymbollayer.cpp:1671
QgsGradientFillSymbolLayer::GradientSpread
GradientSpread
Definition: qgsfillsymbollayer.h:198
QgsSimpleFillSymbolLayer::setBrushStyle
void setBrushStyle(Qt::BrushStyle style)
Definition: qgsfillsymbollayer.h:79
QgsSimpleFillSymbolLayer::mStrokeWidthMapUnitScale
QgsMapUnitScale mStrokeWidthMapUnitScale
Definition: qgsfillsymbollayer.h:155
QgsSymbolLayer::hasDataDefinedProperties
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Definition: qgssymbollayer.cpp:215
QgsSVGFillSymbolLayer::svgFillColor
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1053
qgis.h
DEFAULT_SIMPLEFILL_COLOR
#define DEFAULT_SIMPLEFILL_COLOR
Definition: qgsfillsymbollayer.h:23
QgsRenderContext
Definition: qgsrendercontext.h:57
QgsRasterFillSymbolLayer
A class for filling symbols with a repeated raster image.
Definition: qgsfillsymbollayer.h:725
QgsGradientFillSymbolLayer::mColor2
QColor mColor2
Definition: qgsfillsymbollayer.h:315
QgsRasterFillSymbolLayer::setOffset
void setOffset(QPointF offset)
Sets the offset for the fill.
Definition: qgsfillsymbollayer.h:819
QgsLinePatternFillSymbolLayer::offset
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
Definition: qgsfillsymbollayer.h:1321
QgsPointPatternFillSymbolLayer::setOffsetX
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
Definition: qgsfillsymbollayer.h:1513
QgsUnitTypes::RenderMillimeters
@ RenderMillimeters
Millimeters.
Definition: qgsunittypes.h:168
QgsLinePatternFillSymbolLayer::setLineAngle
void setLineAngle(double a)
Sets the angle for the parallel lines used to fill the symbol.
Definition: qgsfillsymbollayer.h:1252
QgsPointPatternFillSymbolLayer::offsetY
double offsetY() const
Returns the vertical offset values for points in the pattern.
Definition: qgsfillsymbollayer.h:1538
QgsCentroidFillSymbolLayer::setPointOnSurface
void setPointOnSurface(bool pointOnSurface)
Definition: qgsfillsymbollayer.h:1971
QgsGradientFillSymbolLayer::mGradientSpread
GradientSpread mGradientSpread
Definition: qgsfillsymbollayer.h:319
QgsSymbolLayer::estimateMaxBleed
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
Definition: qgssymbollayer.h:367
QgsImageFillSymbolLayer::setOutputUnit
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
Definition: qgsfillsymbollayer.cpp:1666
QgsRasterFillSymbolLayer::width
double width() const
Returns the width used for scaling the image used in the fill.
Definition: qgsfillsymbollayer.h:884
QgsSymbol
Definition: qgssymbol.h:63
DEFAULT_SIMPLEFILL_STYLE
#define DEFAULT_SIMPLEFILL_STYLE
Definition: qgsfillsymbollayer.h:24
QgsPointPatternFillSymbolLayer::distanceXMapUnitScale
const QgsMapUnitScale & distanceXMapUnitScale() const
Definition: qgsfillsymbollayer.h:1559
QgsSymbolLayer::ogrFeatureStyle
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
Definition: qgssymbollayer.h:334
QgsGradientFillSymbolLayer::mGradientType
GradientType mGradientType
Definition: qgsfillsymbollayer.h:317
QgsSVGFillSymbolLayer::patternWidth
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e.
Definition: qgsfillsymbollayer.h:1032
QgsPointPatternFillSymbolLayer::setDistanceY
void setDistanceY(double d)
Definition: qgsfillsymbollayer.h:1498
QgsGradientFillSymbolLayer::Feature
@ Feature
Definition: qgsfillsymbollayer.h:194
QgsFillSymbolLayer::renderPolygon
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,...
QgsSVGFillSymbolLayer::setPatternWidthUnit
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
Definition: qgsfillsymbollayer.h:1107
QgsGradientFillSymbolLayer::setGradientSpread
void setGradientSpread(GradientSpread gradientSpread)
Definition: qgsfillsymbollayer.h:275
QgsSimpleFillSymbolLayer::mSelPen
QPen mSelPen
Definition: qgsfillsymbollayer.h:158
QgsLinePatternFillSymbolLayer::setDistance
void setDistance(double d)
Sets the distance between lines in the fill pattern.
Definition: qgsfillsymbollayer.h:1269
QgsRandomMarkerFillSymbolLayer::AbsoluteCount
@ AbsoluteCount
The point count is used as an absolute count of markers.
Definition: qgsfillsymbollayer.h:1743
QgsSimpleFillSymbolLayer::setStrokeWidthMapUnitScale
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:112
QgsSymbolLayer::properties
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QgsPointPatternFillSymbolLayer::distanceY
double distanceY() const
Definition: qgsfillsymbollayer.h:1497
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsGradientFillSymbolLayer::referencePoint1
QPointF referencePoint1() const
Definition: qgsfillsymbollayer.h:279
QgsPointPatternFillSymbolLayer::offsetXUnit
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1630
QgsPointPatternFillSymbolLayer::setOffsetYUnit
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1656
QgsSymbolRenderContext
Definition: qgssymbol.h:681
QgsPointPatternFillSymbolLayer::setDisplacementX
void setDisplacementX(double d)
Definition: qgsfillsymbollayer.h:1501
QgsPointPatternFillSymbolLayer::displacementXUnit
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
Definition: qgsfillsymbollayer.h:1592
QgsSimpleFillSymbolLayer::setStrokeWidth
void setStrokeWidth(double strokeWidth)
Definition: qgsfillsymbollayer.h:91
QgsPointPatternFillSymbolLayer::setDistanceX
void setDistanceX(double d)
Definition: qgsfillsymbollayer.h:1495
QgsSVGFillSymbolLayer::svgStrokeWidthMapUnitScale
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
Definition: qgsfillsymbollayer.h:1170
QgsSymbolLayer::clone
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
QgsCentroidFillSymbolLayer::setClipPoints
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
Definition: qgsfillsymbollayer.h:2000
QgsCentroidFillSymbolLayer::pointOnSurface
bool pointOnSurface() const
Definition: qgsfillsymbollayer.h:1972
QgsLinePatternFillSymbolLayer::setDistanceUnit
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
Definition: qgsfillsymbollayer.h:1329
QgsImageFillSymbolLayer::setMapUnitScale
void setMapUnitScale(const QgsMapUnitScale &scale) override
Definition: qgsfillsymbollayer.cpp:1676
QgsSymbolLayer
Definition: qgssymbollayer.h:52
QgsGradientFillSymbolLayer::color2
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
Definition: qgsfillsymbollayer.h:266
QgsRasterFillSymbolLayer::FillCoordinateMode
FillCoordinateMode
Fill coordinate modes, dictates fill tiling behavior.
Definition: qgsfillsymbollayer.h:730
QgsShapeburstFillSymbolLayer::setOffset
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
Definition: qgsfillsymbollayer.h:564
DEFAULT_SIMPLEFILL_BORDERWIDTH
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
Definition: qgsfillsymbollayer.h:27
QgsSimpleFillSymbolLayer::mBrush
QBrush mBrush
Definition: qgsfillsymbollayer.h:148
QgsGradientFillSymbolLayer::mOffsetMapUnitScale
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayer.h:328
QgsShapeburstFillSymbolLayer::maxDistance
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
Definition: qgsfillsymbollayer.h:455
QgsImageFillSymbolLayer::renderPolygon
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,...
Definition: qgsfillsymbollayer.cpp:1588
QgsPointPatternFillSymbolLayer::setOffsetXMapUnitScale
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1639
QgsSimpleFillSymbolLayer::setPenJoinStyle
void setPenJoinStyle(Qt::PenJoinStyle style)
Definition: qgsfillsymbollayer.h:94
QgsSimpleFillSymbolLayer::mStrokeColor
QColor mStrokeColor
Definition: qgsfillsymbollayer.h:151
QgsGradientFillSymbolLayer::Radial
@ Radial
Definition: qgsfillsymbollayer.h:188
QgsMarkerSymbol
Definition: qgssymbol.h:917
QgsSymbolLayer::stopFeatureRender
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
Definition: qgssymbollayer.cpp:122
QgsPointPatternFillSymbolLayer::mDistanceXMapUnitScale
QgsMapUnitScale mDistanceXMapUnitScale
Definition: qgsfillsymbollayer.h:1698
QgsPointPatternFillSymbolLayer::displacementX
double displacementX() const
Definition: qgsfillsymbollayer.h:1500
QgsSimpleFillSymbolLayer::penJoinStyle
Qt::PenJoinStyle penJoinStyle() const
Definition: qgsfillsymbollayer.h:93
QgsSimpleFillSymbolLayer::strokeWidth
double strokeWidth() const
Definition: qgsfillsymbollayer.h:90
QgsLinePatternFillSymbolLayer
Definition: qgsfillsymbollayer.h:1217
QgsGradientFillSymbolLayer::coordinateMode
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient. Controls how the gradient stops are positioned.
Definition: qgsfillsymbollayer.h:270
QgsRasterFillSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
Definition: qgsfillsymbollayer.h:864
QgsSimpleFillSymbolLayer::mPen
QPen mPen
Definition: qgsfillsymbollayer.h:157
QgsGradientFillSymbolLayer::Reflect
@ Reflect
Definition: qgsfillsymbollayer.h:201
QgsCentroidFillSymbolLayer::clipPoints
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
Definition: qgsfillsymbollayer.h:1992
QgsLinePatternFillSymbolLayer::distanceMapUnitScale
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
Definition: qgsfillsymbollayer.h:1355
QgsRasterFillSymbolLayer::offset
QPointF offset() const
Returns the offset for the fill.
Definition: qgsfillsymbollayer.h:828
QgsGradientFillSymbolLayer::mOffset
QPointF mOffset
Definition: qgsfillsymbollayer.h:326
QgsRasterFillSymbolLayer::Viewport
@ Viewport
Tiling is based on complete map viewport.
Definition: qgsfillsymbollayer.h:733
QgsSimpleFillSymbolLayer::mBrushStyle
Qt::BrushStyle mBrushStyle
Definition: qgsfillsymbollayer.h:150
QgsSymbolLayer::setOutputUnit
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
Definition: qgssymbollayer.h:377
QgsShapeburstFillSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayer.h:594
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsGradientFillSymbolLayer::mReferencePoint1
QPointF mReferencePoint1
Definition: qgsfillsymbollayer.h:321
QgsShapeburstFillSymbolLayer::setDistanceMapUnitScale
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:475
QgsGradientFillSymbolLayer::mCoordinateMode
GradientCoordinateMode mCoordinateMode
Definition: qgsfillsymbollayer.h:318
QgsShapeburstFillSymbolLayer::setOffsetUnit
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
Definition: qgsfillsymbollayer.h:582
QgsLineSymbol
Definition: qgssymbol.h:1117
QgsRasterFillSymbolLayer::coordinateMode
FillCoordinateMode coordinateMode() const
Coordinate mode for fill.
Definition: qgsfillsymbollayer.h:796
QgsSVGFillSymbolLayer
Definition: qgsfillsymbollayer.h:950
QgsUnitTypes
Helper functions for various unit types.
Definition: qgsunittypes.h:38
QgsShapeburstFillSymbolLayer
Definition: qgsfillsymbollayer.h:349
QgsGradientFillSymbolLayer::setOffset
void setOffset(QPointF offset)
Offset for gradient fill.
Definition: qgsfillsymbollayer.h:294
QgsImageFillSymbolLayer::mStroke
std::unique_ptr< QgsLineSymbol > mStroke
Custom stroke.
Definition: qgsfillsymbollayer.h:709
QgsSimpleFillSymbolLayer::mSelBrush
QBrush mSelBrush
Definition: qgsfillsymbollayer.h:149
QgsRasterFillSymbolLayer::imageFilePath
QString imageFilePath() const
The path to the raster image used for the fill.
Definition: qgsfillsymbollayer.h:780
qgssymbollayer.h
QgsLinePatternFillSymbolLayer::lineWidthUnit
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns the units for the line's width.
Definition: qgsfillsymbollayer.h:1369
QgsPointPatternFillSymbolLayer::setDisplacementXMapUnitScale
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:1594
QgsShapeburstFillSymbolLayer::setDistanceUnit
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
Definition: qgsfillsymbollayer.h:464
QgsSimpleFillSymbolLayer::setOffsetUnit
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
Definition: qgsfillsymbollayer.h:120
QgsPointPatternFillSymbolLayer::displacementYMapUnitScale
const QgsMapUnitScale & displacementYMapUnitScale() const
Definition: qgsfillsymbollayer.h:1613
DEFAULT_SIMPLEFILL_BORDERSTYLE
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
Definition: qgsfillsymbollayer.h:26
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition: qgsmapunitscale.h:37
QgsGradientFillSymbolLayer::setReferencePoint1IsCentroid
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayer.h:282
QgsGradientFillSymbolLayer::gradientSpread
GradientSpread gradientSpread() const
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops.
Definition: qgsfillsymbollayer.h:274
QgsSVGFillSymbolLayer::svgStrokeColor
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1074
QgsCentroidFillSymbolLayer::setClipOnCurrentPartOnly
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
Definition: qgsfillsymbollayer.h:2016
QgsRasterFillSymbolLayer::widthMapUnitScale
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
Definition: qgsfillsymbollayer.h:920
QgsCentroidFillSymbolLayer::clipOnCurrentPartOnly
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
Definition: qgsfillsymbollayer.h:2008
QgsRandomMarkerFillSymbolLayer::densityAreaUnit
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area.
Definition: qgsfillsymbollayer.h:1871
QgsPointPatternFillSymbolLayer::mOffsetYMapUnitScale
QgsMapUnitScale mOffsetYMapUnitScale
Definition: qgsfillsymbollayer.h:1713
QgsPointPatternFillSymbolLayer::displacementYUnit
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
Definition: qgsfillsymbollayer.h:1610
QgsGradientFillSymbolLayer::colorRamp
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
Definition: qgsfillsymbollayer.h:254
QgsSVGFillSymbolLayer::setSvgStrokeWidth
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
Definition: qgsfillsymbollayer.h:1086
QgsGradientFillSymbolLayer::referencePoint2
QPointF referencePoint2() const
Definition: qgsfillsymbollayer.h:287
QgsLinePatternFillSymbolLayer::setOffset
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
Definition: qgsfillsymbollayer.h:1308
QgsShapeburstFillSymbolLayer::blurRadius
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
Definition: qgsfillsymbollayer.h:416
QgsCentroidFillSymbolLayer::mMarker
std::unique_ptr< QgsMarkerSymbol > mMarker
Definition: qgsfillsymbollayer.h:2023
QgsSymbolLayer::subSymbol
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
Definition: qgssymbollayer.h:348
QgsSymbolLayer::usedAttributes
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Definition: qgssymbollayer.cpp:246
QgsUnitTypes::RenderPixels
@ RenderPixels
Pixels.
Definition: qgsunittypes.h:170
QgsShapeburstFillSymbolLayer::setColorType
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill.
Definition: qgsfillsymbollayer.h:488
QgsPointPatternFillSymbolLayer::distanceX
double distanceX() const
Definition: qgsfillsymbollayer.h:1494
QgsRasterFillSymbolLayer::widthUnit
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width.
Definition: qgsfillsymbollayer.h:902
QgsPointPatternFillSymbolLayer::setOffsetY
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
Definition: qgsfillsymbollayer.h:1530
QgsRasterFillSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
Definition: qgsfillsymbollayer.h:846
QgsPointPatternFillSymbolLayer::setDisplacementY
void setDisplacementY(double d)
Definition: qgsfillsymbollayer.h:1504
QgsGradientFillSymbolLayer::mReferencePoint2
QPointF mReferencePoint2
Definition: qgsfillsymbollayer.h:323
QgsSimpleFillSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
Definition: qgsfillsymbollayer.h:126
QgsImageFillSymbolLayer::estimateMaxBleed
double estimateMaxBleed(const QgsRenderContext &context) const override
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
Definition: qgsfillsymbollayer.cpp:1686
QgsPointPatternFillSymbolLayer::distanceXUnit
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
Definition: qgsfillsymbollayer.h:1556
QgsPointPatternFillSymbolLayer::distanceYMapUnitScale
const QgsMapUnitScale & distanceYMapUnitScale() const
Definition: qgsfillsymbollayer.h:1577
QgsSymbolLayer::outputUnit
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
Definition: qgssymbollayer.h:387
QgsSimpleFillSymbolLayer::mStrokeWidth
double mStrokeWidth
Definition: qgsfillsymbollayer.h:153
QgsShapeburstFillSymbolLayer::colorRamp
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
Definition: qgsfillsymbollayer.h:520
QgsRasterFillSymbolLayer::setOffsetUnit
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
Definition: qgsfillsymbollayer.h:837
QgsSymbolLayer::dxfBrushStyle
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style.
Definition: qgssymbollayer.cpp:180
QgsGradientFillSymbolLayer::setReferencePoint1
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayer.h:278
QgsStringMap
QMap< QString, QString > QgsStringMap
Definition: qgis.h:714
QgsPointPatternFillSymbolLayer::setDisplacementYUnit
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
Definition: qgsfillsymbollayer.h:1603
QgsLinePatternFillSymbolLayer::setDistanceMapUnitScale
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
Definition: qgsfillsymbollayer.h:1346
QgsSimpleFillSymbolLayer::brushStyle
Qt::BrushStyle brushStyle() const
Definition: qgsfillsymbollayer.h:78
c
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
Definition: porting_processing.dox:1
QgsShapeburstFillSymbolLayer::distanceMapUnitScale
const QgsMapUnitScale & distanceMapUnitScale() const
Definition: qgsfillsymbollayer.h:476
QgsPointPatternFillSymbolLayer::setDistanceXMapUnitScale
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:1558
QgsShapeburstFillSymbolLayer::distanceUnit
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
Definition: qgsfillsymbollayer.h:473
QgsFillSymbolLayer::operator=
QgsFillSymbolLayer & operator=(const QgsFillSymbolLayer &other)=delete
QgsFillSymbolLayer cannot be copied.
QgsLinePatternFillSymbolLayer::setLineWidthMapUnitScale
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line width.
Definition: qgsfillsymbollayer.h:1378
QgsPointPatternFillSymbolLayer::setDisplacementYMapUnitScale
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:1612
QgsPointPatternFillSymbolLayer::setDistanceXUnit
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal distance between points in the pattern.
Definition: qgsfillsymbollayer.h:1549
QgsSimpleFillSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayer.h:129
QgsSVGFillSymbolLayer::patternWidthMapUnitScale
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
Definition: qgsfillsymbollayer.h:1134
QgsImageFillSymbolLayer::subSymbol
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
Definition: qgsfillsymbollayer.h:653
QgsLinePatternFillSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
Definition: qgsfillsymbollayer.h:1410
QgsRasterFillSymbolLayer::setWidth
void setWidth(const double width)
Sets the width for scaling the image used in the fill.
Definition: qgsfillsymbollayer.h:874
QgsShapeburstFillSymbolLayer::color2
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayer.h:538
QgsFillSymbolLayer
Definition: qgssymbollayer.h:1092
QgsGradientFillSymbolLayer::Linear
@ Linear
Definition: qgsfillsymbollayer.h:187
QgsGradientFillSymbolLayer::referencePoint1IsCentroid
bool referencePoint1IsCentroid() const
Definition: qgsfillsymbollayer.h:283
QgsRandomMarkerFillSymbolLayer
Definition: qgsfillsymbollayer.h:1736
QgsSimpleFillSymbolLayer
Definition: qgsfillsymbollayer.h:39
QgsSimpleFillSymbolLayer::setOffset
void setOffset(QPointF offset)
Definition: qgsfillsymbollayer.h:96
QgsPointPatternFillSymbolLayer::setDisplacementXUnit
void setDisplacementXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
Definition: qgsfillsymbollayer.h:1585
QgsGradientFillSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayer.h:301
QgsSymbolLayer::stopRender
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
QgsGradientFillSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayer.h:302
QgsSVGFillSymbolLayer::patternWidthUnit
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
Definition: qgsfillsymbollayer.h:1116
QgsSymbolLayer::setMapUnitScale
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgssymbollayer.h:389
QgsSVGFillSymbolLayer::setSvgStrokeWidthMapUnitScale
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
Definition: qgsfillsymbollayer.h:1161
QgsGradientFillSymbolLayer::setReferencePoint2IsCentroid
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayer.h:290
QgsSymbolLayer::dxfColor
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
Definition: qgssymbollayer.cpp:151
QgsPointPatternFillSymbolLayer::offsetYMapUnitScale
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
Definition: qgsfillsymbollayer.h:1681
QgsSVGFillSymbolLayer::svgFilePath
QString svgFilePath() const
Returns the path to the SVG file used to render the fill.
Definition: qgsfillsymbollayer.h:1010
QgsImageFillSymbolLayer::mStrokeWidthMapUnitScale
QgsMapUnitScale mStrokeWidthMapUnitScale
Definition: qgsfillsymbollayer.h:706
QgsSimpleFillSymbolLayer::fillColor
QColor fillColor() const override
Gets fill color.
Definition: qgsfillsymbollayer.h:84
QgsLinePatternFillSymbolLayer::distanceUnit
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
Definition: qgsfillsymbollayer.h:1337
DEFAULT_SIMPLEFILL_JOINSTYLE
#define DEFAULT_SIMPLEFILL_JOINSTYLE
Definition: qgsfillsymbollayer.h:28
QgsSymbolLayer::layerType
virtual QString layerType() const =0
Returns a string that represents this layer type.
QgsSVGFillSymbolLayer::setPatternWidthMapUnitScale
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
Definition: qgsfillsymbollayer.h:1125
QgsLinePatternFillSymbolLayer::lineWidthMapUnitScale
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width.
Definition: qgsfillsymbollayer.h:1387
QgsFeature
Definition: qgsfeature.h:55
QgsCentroidFillSymbolLayer::setPointOnAllParts
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
Definition: qgsfillsymbollayer.h:1978
QgsPointPatternFillSymbolLayer::distanceYUnit
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
Definition: qgsfillsymbollayer.h:1574
QgsImageFillSymbolLayer
Definition: qgsfillsymbollayer.h:646
QgsGradientFillSymbolLayer::setGradientColorType
void setGradientColorType(GradientColorType gradientColorType)
Definition: qgsfillsymbollayer.h:246
QgsRasterFillSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
Definition: qgsfillsymbollayer.h:855
QgsImageFillSymbolLayer::strokeWidthUnit
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
Definition: qgsfillsymbollayer.h:668
QgsGradientFillSymbolLayer::setOffsetUnit
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Units for gradient fill offset.
Definition: qgsfillsymbollayer.h:298
QgsShapeburstFillSymbolLayer::offset
QPointF offset() const
Returns the offset for the shapeburst fill.
Definition: qgsfillsymbollayer.h:573
QgsLinePatternFillSymbolLayer::lineWidth
double lineWidth() const
Returns the width of the line subsymbol used to render the parallel lines in the fill.
Definition: qgsfillsymbollayer.h:1292
QgsSimpleFillSymbolLayer::strokeStyle
Qt::PenStyle strokeStyle() const
Definition: qgsfillsymbollayer.h:87
QgsSymbolLayer::toSld
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
Definition: qgssymbollayer.h:331
QgsShapeburstFillSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
Definition: qgsfillsymbollayer.h:591
QgsSymbolLayer::startRender
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
QgsShapeburstFillSymbolLayer::colorType
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
Definition: qgsfillsymbollayer.h:500
QgsRandomMarkerFillSymbolLayer::DensityBasedCount
@ DensityBasedCount
The point count is part of a marker density count.
Definition: qgsfillsymbollayer.h:1744
QgsShapeburstFillSymbolLayer::useWholeShape
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
Definition: qgsfillsymbollayer.h:435
QgsPointPatternFillSymbolLayer::mDisplacementYMapUnitScale
QgsMapUnitScale mDisplacementYMapUnitScale
Definition: qgsfillsymbollayer.h:1707
QgsCentroidFillSymbolLayer
Definition: qgsfillsymbollayer.h:1925
QgsLinePatternFillSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
Definition: qgsfillsymbollayer.h:1401
QgsPointPatternFillSymbolLayer::setDistanceYUnit
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical distance between points in the pattern.
Definition: qgsfillsymbollayer.h:1567
QgsSVGFillSymbolLayer::setSvgStrokeWidthUnit
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width.
Definition: qgsfillsymbollayer.h:1143
QgsImageFillSymbolLayer::mBrush
QBrush mBrush
Definition: qgsfillsymbollayer.h:700
QgsSimpleFillSymbolLayer::mPenJoinStyle
Qt::PenJoinStyle mPenJoinStyle
Definition: qgsfillsymbollayer.h:156
QgsShapeburstFillSymbolLayer::ignoreRings
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
Definition: qgsfillsymbollayer.h:555
QgsSymbolLayer::dxfWidth
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width.
Definition: qgssymbollayer.cpp:137
QgsGradientFillSymbolLayer::GradientColorType
GradientColorType
Definition: qgsfillsymbollayer.h:179
MathUtils::angle
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)
Definition: MathUtils.cpp:786
QgsSimpleFillSymbolLayer::mStrokeStyle
Qt::PenStyle mStrokeStyle
Definition: qgsfillsymbollayer.h:152
QgsSimpleFillSymbolLayer::setStrokeColor
void setStrokeColor(const QColor &strokeColor) override
Set stroke color.
Definition: qgsfillsymbollayer.h:82
QgsImageFillSymbolLayer::usedAttributes
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns the set of attributes referenced by the layer.
Definition: qgsfillsymbollayer.cpp:1732
QgsSymbolLayer::strokeColor
virtual QColor strokeColor() const
Gets stroke color.
Definition: qgssymbollayer.h:241
QgsSVGFillSymbolLayer::setPatternWidth
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e.
Definition: qgsfillsymbollayer.h:1021
QgsPathResolver
Definition: qgspathresolver.h:31
QgsGradientFillSymbolLayer::referencePoint2IsCentroid
bool referencePoint2IsCentroid() const
Definition: qgsfillsymbollayer.h:291
QgsPointPatternFillSymbolLayer::displacementXMapUnitScale
const QgsMapUnitScale & displacementXMapUnitScale() const
Definition: qgsfillsymbollayer.h:1595
QgsPointPatternFillSymbolLayer::subSymbol
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
Definition: qgsfillsymbollayer.h:1541
QgsSymbolLayer::dxfBrushColor
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color.
Definition: qgssymbollayer.cpp:174
QgsShapeburstFillSymbolLayer::setUseWholeShape
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
Definition: qgsfillsymbollayer.h:426
QgsPointPatternFillSymbolLayer::offsetX
double offsetX() const
Returns the horizontal offset values for points in the pattern.
Definition: qgsfillsymbollayer.h:1521
QgsShapeburstFillSymbolLayer::SimpleTwoColor
@ SimpleTwoColor
Definition: qgsfillsymbollayer.h:355
QgsPointPatternFillSymbolLayer::offsetXMapUnitScale
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
Definition: qgsfillsymbollayer.h:1647
DEFAULT_SIMPLEFILL_BORDERCOLOR
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
Definition: qgsfillsymbollayer.h:25
QgsGradientFillSymbolLayer::SimpleTwoColor
@ SimpleTwoColor
Definition: qgsfillsymbollayer.h:181
QgsSimpleFillSymbolLayer::setFillColor
void setFillColor(const QColor &color) override
Set fill color.
Definition: qgsfillsymbollayer.h:85
QgsPointPatternFillSymbolLayer::setOffsetXUnit
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
Definition: qgsfillsymbollayer.h:1622
QgsSimpleFillSymbolLayer::setStrokeStyle
void setStrokeStyle(Qt::PenStyle strokeStyle)
Definition: qgsfillsymbollayer.h:88
QgsGradientFillSymbolLayer::setGradientType
void setGradientType(GradientType gradientType)
Definition: qgsfillsymbollayer.h:242
QgsFeatureId
qint64 QgsFeatureId
Definition: qgsfeatureid.h:25
QgsGradientFillSymbolLayer::setColor2
void setColor2(const QColor &color2)
Definition: qgsfillsymbollayer.h:267
QgsGradientFillSymbolLayer::Pad
@ Pad
Definition: qgsfillsymbollayer.h:200