QGIS API Documentation  3.23.0-Master (b5237dafc3)
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 
35 class QgsMarkerSymbol;
36 class QgsLineSymbol;
37 class QgsPathResolver;
38 
43 class CORE_EXPORT QgsSimpleFillSymbolLayer : public QgsFillSymbolLayer
44 {
45  public:
47  Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
48  const QColor &strokeColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
49  Qt::PenStyle strokeStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
50  double strokeWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
51  Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
52  );
53 
55 
56  // static stuff
57 
63  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
64  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
65 
66  // implemented from base classes
67 
68  QString layerType() const override;
69 
70  void startRender( QgsSymbolRenderContext &context ) override;
71 
72  void stopRender( QgsSymbolRenderContext &context ) override;
73 
74  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
75 
76  QVariantMap properties() const override;
77 
78  QgsSimpleFillSymbolLayer *clone() const override SIP_FACTORY;
79 
80  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
81 
82  QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
83 
84  Qt::BrushStyle brushStyle() const { return mBrushStyle; }
85  void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
86 
87  QColor strokeColor() const override { return mStrokeColor; }
88  void setStrokeColor( const QColor &strokeColor ) override { mStrokeColor = strokeColor; }
89 
90  QColor fillColor() const override { return color(); }
91  void setFillColor( const QColor &color ) override { setColor( color ); }
92 
93  Qt::PenStyle strokeStyle() const { return mStrokeStyle; }
94  void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
95 
96  double strokeWidth() const { return mStrokeWidth; }
97  void setStrokeWidth( double strokeWidth ) { mStrokeWidth = strokeWidth; }
98 
99  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
100  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
101 
110  void setOffset( QPointF offset ) { mOffset = offset; }
111 
120  QPointF offset() { return mOffset; }
121 
127  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
128 
133  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
134 
135  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
136  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
137 
143  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
144 
150  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
151 
157  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
158 
164  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
165 
166  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
167  QgsUnitTypes::RenderUnit outputUnit() const override;
168  bool usesMapUnits() const override;
169 
170  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
171  QgsMapUnitScale mapUnitScale() const override;
172 
173  double estimateMaxBleed( const QgsRenderContext &context ) const override;
174 
175  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
176  QColor dxfColor( QgsSymbolRenderContext &context ) const override;
177  double dxfAngle( QgsSymbolRenderContext &context ) const override;
178 
179  Qt::PenStyle dxfPenStyle() const override;
180  QColor dxfBrushColor( QgsSymbolRenderContext &context ) const override;
181  Qt::BrushStyle dxfBrushStyle() const override;
182 
183  protected:
184  QBrush mBrush;
185  QBrush mSelBrush;
186  Qt::BrushStyle mBrushStyle;
187  QColor mStrokeColor;
188  Qt::PenStyle mStrokeStyle;
189  double mStrokeWidth;
192  Qt::PenJoinStyle mPenJoinStyle;
193  QPen mPen;
194  QPen mSelPen;
195 
196  QPointF mOffset;
199 
200  private:
201  //helper functions for data defined symbology
202  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
203 };
204 
205 class QgsColorRamp;
206 
212 {
213  public:
214 
219  const QColor &color2 = Qt::white,
224  );
225 
226  ~QgsGradientFillSymbolLayer() override;
227 
228  // static stuff
229 
235  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
236 
237  // implemented from base classes
238 
239  QString layerType() const override;
240  void startRender( QgsSymbolRenderContext &context ) override;
241  void stopRender( QgsSymbolRenderContext &context ) override;
242  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
243  QVariantMap properties() const override;
244  QgsGradientFillSymbolLayer *clone() const override SIP_FACTORY;
245  double estimateMaxBleed( const QgsRenderContext &context ) const override;
246  bool canCauseArtifactsBetweenAdjacentTiles() const override;
247 
253  Qgis::GradientType gradientType() const { return mGradientType; }
254 
260  void setGradientType( Qgis::GradientType gradientType ) { mGradientType = gradientType; }
261 
267  Qgis::GradientColorSource gradientColorType() const { return mGradientColorType; }
268 
274  void setGradientColorType( Qgis::GradientColorSource gradientColorType ) { mGradientColorType = gradientColorType; }
275 
282  QgsColorRamp *colorRamp() { return mGradientRamp; }
283 
291  void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
292 
298  QColor color2() const { return mColor2; }
299 
305  void setColor2( const QColor &color2 ) { mColor2 = color2; }
306 
312  Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
313 
319  void setCoordinateMode( Qgis::SymbolCoordinateReference coordinateMode ) { mCoordinateMode = coordinateMode; }
320 
326  Qgis::GradientSpread gradientSpread() const { return mGradientSpread; }
327 
333  void setGradientSpread( Qgis::GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
334 
340  void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
341 
347  QPointF referencePoint1() const { return mReferencePoint1; }
348 
354  void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
355 
361  bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
362 
368  void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
369 
375  QPointF referencePoint2() const { return mReferencePoint2; }
376 
382  void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
383 
384 
390  bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
391 
400  void setOffset( QPointF offset ) { mOffset = offset; }
401 
410  QPointF offset() const { return mOffset; }
411 
417  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
418 
424  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
425 
431  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
432 
438  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
439 
440  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
441  QgsUnitTypes::RenderUnit outputUnit() const override;
442  bool usesMapUnits() const override;
443 
444  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
445  QgsMapUnitScale mapUnitScale() const override;
446 
447  protected:
448  QBrush mBrush;
449  QBrush mSelBrush;
450 
452  QColor mColor2;
453  QgsColorRamp *mGradientRamp = nullptr;
457 
459  bool mReferencePoint1IsCentroid = false;
461  bool mReferencePoint2IsCentroid = false;
462 
463  QPointF mOffset;
466 
467  private:
468 
469  //helper functions for data defined symbology
470  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, const QPolygonF &points );
471 
473  void applyGradient( const QgsSymbolRenderContext &context, QBrush &brush, const QColor &color, const QColor &color2,
474  Qgis::GradientColorSource gradientColorType, QgsColorRamp *gradientRamp, Qgis::GradientType gradientType,
475  Qgis::SymbolCoordinateReference coordinateMode, Qgis::GradientSpread gradientSpread,
476  QPointF referencePoint1, QPointF referencePoint2, double angle );
477 
479  QPointF rotateReferencePoint( QPointF refPoint, double angle );
480 };
481 
487 {
488  public:
489 
493  QgsShapeburstFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR, const QColor &color2 = Qt::white,
495  int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
496 
498 
504 
510 
511  // static stuff
512 
518  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
519 
520  // implemented from base classes
521 
522  QString layerType() const override;
523  void startRender( QgsSymbolRenderContext &context ) override;
524  void stopRender( QgsSymbolRenderContext &context ) override;
525  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
526  QVariantMap properties() const override;
527  QgsShapeburstFillSymbolLayer *clone() const override SIP_FACTORY;
528  double estimateMaxBleed( const QgsRenderContext &context ) const override;
529  bool canCauseArtifactsBetweenAdjacentTiles() const override;
530 
537  void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
538 
545  int blurRadius() const { return mBlurRadius; }
546 
555  void setUseWholeShape( bool useWholeShape ) { mUseWholeShape = useWholeShape; }
556 
564  bool useWholeShape() const { return mUseWholeShape; }
565 
574  void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
575 
584  double maxDistance() const { return mMaxDistance; }
585 
593  void setDistanceUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceUnit = unit; }
594 
602  QgsUnitTypes::RenderUnit distanceUnit() const { return mDistanceUnit; }
603 
604  void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
605  const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
606 
617  void setColorType( Qgis::GradientColorSource colorType ) { mColorType = colorType; }
618 
629  Qgis::GradientColorSource colorType() const { return mColorType; }
630 
640  void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
641 
649  QgsColorRamp *colorRamp() { return mGradientRamp.get(); }
650 
658  void setColor2( const QColor &color2 ) { mColor2 = color2; }
659 
667  QColor color2() const { return mColor2; }
668 
676  void setIgnoreRings( bool ignoreRings ) { mIgnoreRings = ignoreRings; }
677 
684  bool ignoreRings() const { return mIgnoreRings; }
685 
693  void setOffset( QPointF offset ) { mOffset = offset; }
694 
702  QPointF offset() const { return mOffset; }
703 
711  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
712 
720  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
721 
722  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
723  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
724 
725  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
726  QgsUnitTypes::RenderUnit outputUnit() const override;
727  bool usesMapUnits() const override;
728 
729  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
730  QgsMapUnitScale mapUnitScale() const override;
731 
732  private:
733  QBrush mBrush;
734  QBrush mSelBrush;
735 
736  int mBlurRadius = 0;
737 
738  bool mUseWholeShape = true;
739  double mMaxDistance = 5.0;
741  QgsMapUnitScale mDistanceMapUnitScale;
742 
744  QColor mColor2;
745 
746  bool mIgnoreRings = false;
747 
748  QPointF mOffset;
750  QgsMapUnitScale mOffsetMapUnitScale;
751 
752  std::unique_ptr< QgsColorRamp > mGradientRamp;
753 
754  //helper functions for data defined symbology
755  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QColor &color, QColor &color2, int &blurRadius, bool &useWholeShape,
756  double &maxDistance, bool &ignoreRings );
757 
758  /* distance transform of a 1d function using squared distance */
759  void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
760  /* distance transform of 2d function using squared distance */
761  void distanceTransform2d( double *im, int width, int height, QgsRenderContext &context );
762  /* distance transform of a binary QImage */
763  double *distanceTransform( QImage *im, QgsRenderContext &context );
764 
765  /* fills a QImage with values from an array of doubles containing squared distance transform values */
766  void dtArrayToQImage( double *array, QImage *im, QgsColorRamp *ramp, QgsRenderContext &context, bool useWholeShape = true, int maxPixelDistance = 0 );
767 
768 #ifdef SIP_RUN
770 #endif
771 };
772 
778 {
779  public:
780 
783 
784  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
785 
791  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
792 
798  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
799 
806  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
807 
816  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
817 
825  void setCoordinateReference( Qgis::SymbolCoordinateReference coordinateReference ) { mCoordinateReference = coordinateReference; }
826 
834  Qgis::SymbolCoordinateReference coordinateReference() const { return mCoordinateReference; }
835 
836  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
837  QgsUnitTypes::RenderUnit outputUnit() const override;
838  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
839  QgsMapUnitScale mapUnitScale() const override;
840  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
841  Qt::PenStyle dxfPenStyle() const override;
842  QVariantMap properties() const override;
843 
844  protected:
845  QBrush mBrush;
847  double mNextAngle = 0.0; // mAngle / data defined angle
848 
850  double mStrokeWidth = 0.0;
853 
857  virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context ) { Q_UNUSED( context ) }
858 
864  virtual bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const;
865 
866  private:
867 #ifdef SIP_RUN
869 #endif
870 };
871 
879 {
880  public:
881 
886  QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
887 
889 
894  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
895 
901  static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
902 
903  // implemented from base classes
904  QString layerType() const override;
905  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
906  void startRender( QgsSymbolRenderContext &context ) override;
907  void stopRender( QgsSymbolRenderContext &context ) override;
908  QVariantMap properties() const override;
909  QgsRasterFillSymbolLayer *clone() const override SIP_FACTORY;
910  double estimateMaxBleed( const QgsRenderContext &context ) const override;
911  bool usesMapUnits() const override;
912 
913  //override QgsImageFillSymbolLayer's support for sub symbols
914  QgsSymbol *subSymbol() override { return nullptr; }
915  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
916 
922  void setImageFilePath( const QString &imagePath );
923 
929  QString imageFilePath() const { return mImageFilePath; }
930 
937  void setCoordinateMode( Qgis::SymbolCoordinateReference mode );
938 
945  Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
946 
952  void setOpacity( double opacity );
953 
959  double opacity() const { return mOpacity; }
960 
968  void setOffset( QPointF offset ) { mOffset = offset; }
969 
977  QPointF offset() const { return mOffset; }
978 
986  void setOffsetUnit( const QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
987 
995  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
996 
1004  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
1005 
1013  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1014 
1023  void setWidth( const double width ) { mWidth = width; }
1024 
1033  double width() const { return mWidth; }
1034 
1042  void setWidthUnit( const QgsUnitTypes::RenderUnit unit ) { mWidthUnit = unit; }
1043 
1051  QgsUnitTypes::RenderUnit widthUnit() const { return mWidthUnit; }
1052 
1060  void setWidthMapUnitScale( const QgsMapUnitScale &scale ) { mWidthMapUnitScale = scale; }
1061 
1069  const QgsMapUnitScale &widthMapUnitScale() const { return mWidthMapUnitScale; }
1070 
1071  protected:
1072 
1073  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1074  bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const override;
1075  private:
1076 
1078  QString mImageFilePath;
1080  double mOpacity = 1.0;
1081 
1082  QPointF mOffset;
1084  QgsMapUnitScale mOffsetMapUnitScale;
1085 
1086  double mWidth = 0.0;
1088  QgsMapUnitScale mWidthMapUnitScale;
1089 
1091  void applyPattern( QBrush &brush, const QString &imageFilePath, double width, double opacity,
1092  const QgsSymbolRenderContext &context );
1093 };
1094 
1100 {
1101  public:
1102 
1106  QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
1107 
1111  QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
1112 
1114 
1119  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1120 
1125  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1126 
1132  static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
1133 
1134  // implemented from base classes
1135 
1136  QString layerType() const override;
1137  void startRender( QgsSymbolRenderContext &context ) override;
1138  void stopRender( QgsSymbolRenderContext &context ) override;
1139  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1140  QVariantMap properties() const override;
1141  QgsSVGFillSymbolLayer *clone() const override SIP_FACTORY;
1142  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1143  bool usesMapUnits() const override;
1144  QgsSymbol *subSymbol() override;
1145  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1146  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1147  QColor dxfColor( QgsSymbolRenderContext &context ) const override;
1148  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1149  bool hasDataDefinedProperties() const override;
1150 
1162  void setSvgFilePath( const QString &svgPath );
1163 
1169  QString svgFilePath() const { return mSvgFilePath; }
1170 
1180  void setPatternWidth( double width ) { mPatternWidth = width;}
1181 
1191  double patternWidth() const { return mPatternWidth; }
1192 
1202  void setSvgFillColor( const QColor &c ) { setColor( c ); }
1203 
1212  QColor svgFillColor() const { return color(); }
1213 
1223  void setSvgStrokeColor( const QColor &c ) { mSvgStrokeColor = c; }
1224 
1233  QColor svgStrokeColor() const { return mSvgStrokeColor; }
1234 
1245  void setSvgStrokeWidth( double w ) { mSvgStrokeWidth = w; }
1246 
1257  double svgStrokeWidth() const { return mSvgStrokeWidth; }
1258 
1266  void setPatternWidthUnit( QgsUnitTypes::RenderUnit unit ) { mPatternWidthUnit = unit; }
1267 
1275  QgsUnitTypes::RenderUnit patternWidthUnit() const { return mPatternWidthUnit; }
1276 
1284  void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale ) { mPatternWidthMapUnitScale = scale; }
1285 
1293  const QgsMapUnitScale &patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
1294 
1302  void setSvgStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mSvgStrokeWidthUnit = unit; }
1303 
1311  QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const { return mSvgStrokeWidthUnit; }
1312 
1320  void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mSvgStrokeWidthMapUnitScale = scale; }
1321 
1329  const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const { return mSvgStrokeWidthMapUnitScale; }
1330 
1331  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1332  QgsUnitTypes::RenderUnit outputUnit() const override;
1333 
1334  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1335  QgsMapUnitScale mapUnitScale() const override;
1336 
1341  QMap<QString, QgsProperty> parameters() const { return mParameters; }
1342 
1347  void setParameters( const QMap<QString, QgsProperty> &parameters );
1348 
1349  protected:
1350 
1351  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1352 
1353  private:
1354 
1356  double mPatternWidth = 20;
1358  QgsMapUnitScale mPatternWidthMapUnitScale;
1359  QMap<QString, QgsProperty> mParameters;
1360 
1362  QByteArray mSvgData;
1364  QString mSvgFilePath;
1366  QRectF mSvgViewBox;
1367 
1368  //param(fill), param(stroke), param(stroke-width) are going
1369  //to be replaced in memory
1370  QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1371  double mSvgStrokeWidth = 0.2;
1373  QgsMapUnitScale mSvgStrokeWidthMapUnitScale;
1374 
1376  std::unique_ptr< QgsLineSymbol > mStroke;
1377 
1379  void storeViewBox();
1380  void setDefaultSvgParams(); //fills mSvgFillColor, mSvgStrokeColor, mSvgStrokeWidth with default values for mSvgFilePath
1381 
1383  void applyPattern( QBrush &brush, const QString &svgFilePath, double patternWidth, QgsUnitTypes::RenderUnit patternWidthUnit, const QColor &svgFillColor, const QColor &svgStrokeColor,
1384  double svgStrokeWidth, QgsUnitTypes::RenderUnit svgStrokeWidthUnit, const QgsSymbolRenderContext &context, const QgsMapUnitScale &patternWidthMapUnitScale, const QgsMapUnitScale &svgStrokeWidthMapUnitScale,
1385  const QgsStringMap svgParameters );
1386 };
1387 
1394 {
1395  public:
1398 
1403  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1404 
1409  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1410 
1411  QString layerType() const override;
1412  void startRender( QgsSymbolRenderContext &context ) override;
1413  void stopRender( QgsSymbolRenderContext &context ) override;
1414  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1415  QVariantMap properties() const override;
1416  QgsLinePatternFillSymbolLayer *clone() const override SIP_FACTORY;
1417  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1418  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1419 
1420  QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
1421 
1429  void setLineAngle( double a ) { mLineAngle = a; }
1430 
1438  double lineAngle() const { return mLineAngle; }
1439 
1446  void setDistance( double d ) { mDistance = d; }
1447 
1453  double distance() const { return mDistance; }
1454 
1461  void setLineWidth( double w );
1462 
1469  double lineWidth() const { return mLineWidth; }
1470 
1471  void setColor( const QColor &c ) override;
1472  QColor color() const override;
1473 
1485  void setOffset( double offset ) { mOffset = offset; }
1486 
1498  double offset() const { return mOffset; }
1499 
1506  void setDistanceUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceUnit = unit; }
1507 
1514  QgsUnitTypes::RenderUnit distanceUnit() const { return mDistanceUnit; }
1515 
1523  void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
1524 
1532  const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
1533 
1539  void setLineWidthUnit( QgsUnitTypes::RenderUnit unit ) { mLineWidthUnit = unit; }
1540 
1546  QgsUnitTypes::RenderUnit lineWidthUnit() const { return mLineWidthUnit; }
1547 
1555  void setLineWidthMapUnitScale( const QgsMapUnitScale &scale ) { mLineWidthMapUnitScale = scale; }
1556 
1564  const QgsMapUnitScale &lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
1565 
1571  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
1572 
1578  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
1579 
1587  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
1588 
1596  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1597 
1604  Qgis::LineClipMode clipMode() const { return mClipMode; }
1605 
1612  void setClipMode( Qgis::LineClipMode mode ) { mClipMode = mode; }
1613 
1614  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1615  QgsUnitTypes::RenderUnit outputUnit() const override;
1616  bool usesMapUnits() const override;
1617  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1618  QgsMapUnitScale mapUnitScale() const override;
1619  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1620  QgsSymbol *subSymbol() override;
1621  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1622  bool hasDataDefinedProperties() const override;
1623  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1624  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1625 
1626  protected:
1627 
1628  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1629 
1630  private:
1632  double mDistance = 5.0;
1634  QgsMapUnitScale mDistanceMapUnitScale;
1636  double mLineWidth = 0;
1638  QgsMapUnitScale mLineWidthMapUnitScale;
1640  double mLineAngle = 45.0;
1642  double mOffset = 0.0;
1644  QgsMapUnitScale mOffsetMapUnitScale;
1645 
1646  bool mRenderUsingLines = false;
1647 
1648 #ifdef SIP_RUN
1650 #endif
1651 
1653  void applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double lineAngle, double distance );
1654 
1656  std::unique_ptr< QgsLineSymbol > mFillLineSymbol;
1657 
1659 };
1660 
1667 {
1668  public:
1671 
1677  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1678  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1679 
1680  QString layerType() const override;
1681  void startRender( QgsSymbolRenderContext &context ) override;
1682  void stopRender( QgsSymbolRenderContext &context ) override;
1683  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1684  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1685  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1686  QVariantMap properties() const override;
1687  QgsPointPatternFillSymbolLayer *clone() const override SIP_FACTORY;
1688  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1689  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1690  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1691  QgsSymbol *subSymbol() override;
1692  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1693  QgsUnitTypes::RenderUnit outputUnit() const override;
1694  bool usesMapUnits() const override;
1695  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1696  QgsMapUnitScale mapUnitScale() const override;
1697  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1698  bool hasDataDefinedProperties() const override;
1699  void setColor( const QColor &c ) override;
1700  QColor color() const override;
1701 
1711  double distanceX() const { return mDistanceX; }
1712 
1722  void setDistanceX( double d ) { mDistanceX = d; }
1723 
1730  void setDistanceXUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceXUnit = unit; }
1731 
1737  QgsUnitTypes::RenderUnit distanceXUnit() const { return mDistanceXUnit; }
1738 
1745  void setDistanceXMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceXMapUnitScale = scale; }
1746 
1753  const QgsMapUnitScale &distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
1754 
1764  double distanceY() const { return mDistanceY; }
1765 
1775  void setDistanceY( double d ) { mDistanceY = d; }
1776 
1783  void setDistanceYUnit( QgsUnitTypes::RenderUnit unit ) { mDistanceYUnit = unit; }
1784 
1790  QgsUnitTypes::RenderUnit distanceYUnit() const { return mDistanceYUnit; }
1791 
1798  void setDistanceYMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceYMapUnitScale = scale; }
1799 
1806  const QgsMapUnitScale &distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
1807 
1817  double displacementX() const { return mDisplacementX; }
1818 
1828  void setDisplacementX( double d ) { mDisplacementX = d; }
1829 
1836  void setDisplacementXUnit( QgsUnitTypes::RenderUnit unit ) { mDisplacementXUnit = unit; }
1837 
1843  QgsUnitTypes::RenderUnit displacementXUnit() const { return mDisplacementXUnit; }
1844 
1851  void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementXMapUnitScale = scale; }
1852 
1859  const QgsMapUnitScale &displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
1860 
1870  double displacementY() const { return mDisplacementY; }
1871 
1881  void setDisplacementY( double d ) { mDisplacementY = d; }
1882 
1889  void setDisplacementYUnit( QgsUnitTypes::RenderUnit unit ) { mDisplacementYUnit = unit; }
1890 
1896  QgsUnitTypes::RenderUnit displacementYUnit() const { return mDisplacementYUnit; }
1897 
1904  void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementYMapUnitScale = scale; }
1905 
1912  const QgsMapUnitScale &displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
1913 
1921  void setOffsetX( double offset ) { mOffsetX = offset; }
1922 
1929  double offsetX() const { return mOffsetX; }
1930 
1938  void setOffsetY( double offset ) { mOffsetY = offset; }
1939 
1946  double offsetY() const { return mOffsetY; }
1947 
1955  void setOffsetXUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetXUnit = unit; }
1956 
1963  QgsUnitTypes::RenderUnit offsetXUnit() const { return mOffsetXUnit; }
1964 
1972  void setOffsetXMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetXMapUnitScale = scale; }
1973 
1980  const QgsMapUnitScale &offsetXMapUnitScale() const { return mOffsetXMapUnitScale; }
1981 
1989  void setOffsetYUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetYUnit = unit; }
1990 
1997  QgsUnitTypes::RenderUnit offsetYUnit() const { return mOffsetYUnit; }
1998 
2006  void setOffsetYMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetYMapUnitScale = scale; }
2007 
2014  const QgsMapUnitScale &offsetYMapUnitScale() const { return mOffsetYMapUnitScale; }
2015 
2022  Qgis::MarkerClipMode clipMode() const { return mClipMode; }
2023 
2030  void setClipMode( Qgis::MarkerClipMode mode ) { mClipMode = mode; }
2031 
2041  void setMaximumRandomDeviationX( double deviation ) { mRandomDeviationX = deviation; }
2042 
2052  double maximumRandomDeviationX() const { return mRandomDeviationX; }
2053 
2063  void setMaximumRandomDeviationY( double deviation ) { mRandomDeviationY = deviation; }
2064 
2074  double maximumRandomDeviationY() const { return mRandomDeviationY; }
2075 
2083  void setRandomDeviationXUnit( QgsUnitTypes::RenderUnit unit ) { mRandomDeviationXUnit = unit; }
2084 
2092  QgsUnitTypes::RenderUnit randomDeviationXUnit() const { return mRandomDeviationXUnit; }
2093 
2101  void setRandomDeviationYUnit( QgsUnitTypes::RenderUnit unit ) { mRandomDeviationYUnit = unit; }
2102 
2111  QgsUnitTypes::RenderUnit randomDeviationYUnit() const { return mRandomDeviationYUnit; }
2112 
2120  const QgsMapUnitScale &randomDeviationXMapUnitScale() const { return mRandomDeviationXMapUnitScale; }
2121 
2129  const QgsMapUnitScale &randomDeviationYMapUnitScale() const { return mRandomDeviationYMapUnitScale; }
2130 
2138  void setRandomDeviationXMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationXMapUnitScale = scale; }
2139 
2147  void setRandomDeviationYMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationYMapUnitScale = scale; }
2148 
2155  unsigned long seed() const { return mSeed; }
2156 
2165  void setSeed( unsigned long seed ) { mSeed = seed; }
2166 
2173  double angle() const { return mAngle; }
2174 
2181  void setAngle( double angle ) { mAngle = angle; }
2182 
2183  protected:
2184  std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol;
2185  double mDistanceX = 15;
2188  double mDistanceY = 15;
2191  double mDisplacementX = 0;
2194  double mDisplacementY = 0;
2197  double mOffsetX = 0;
2200  double mOffsetY = 0;
2203 
2204  double mRandomDeviationX = 0;
2207  double mRandomDeviationY = 0;
2210  unsigned long mSeed = 0;
2211 
2212  double mAngle = 0;
2213 
2214  void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
2215 
2216  private:
2217 #ifdef SIP_RUN
2219 #endif
2220 
2221  void applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double distanceX, double distanceY,
2222  double displacementX, double displacementY, double offsetX, double offsetY );
2223 
2225 
2226  bool mRenderUsingMarkers = false;
2227 };
2228 
2238 {
2239  public:
2240 
2247  QgsRandomMarkerFillSymbolLayer( int pointCount = 10, Qgis::PointCountMethod method = Qgis::PointCountMethod::Absolute, double densityArea = 250.0, unsigned long seed = 0 );
2248 
2250 
2256  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2257 
2258  QString layerType() const override;
2259  void startRender( QgsSymbolRenderContext &context ) override;
2260  void stopRender( QgsSymbolRenderContext &context ) override;
2261  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2262  QVariantMap properties() const override;
2263  QgsRandomMarkerFillSymbolLayer *clone() const override SIP_FACTORY;
2264  bool canCauseArtifactsBetweenAdjacentTiles() const override;
2265 
2266  void setColor( const QColor &color ) override;
2267  QColor color() const override;
2268 
2269  QgsSymbol *subSymbol() override;
2270  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
2271 
2272  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
2273  QgsUnitTypes::RenderUnit outputUnit() const override;
2274  bool usesMapUnits() const override;
2275 
2276  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2277  QgsMapUnitScale mapUnitScale() const override;
2278 
2279  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2280  bool hasDataDefinedProperties() const override;
2281 
2287  int pointCount() const;
2288 
2294  void setPointCount( int count );
2295 
2301  unsigned long seed() const;
2302 
2310  void setSeed( unsigned long seed );
2311 
2317  bool clipPoints() const;
2318 
2324  void setClipPoints( bool clipped );
2325 
2331  Qgis::PointCountMethod countMethod() const;
2332 
2338  void setCountMethod( Qgis::PointCountMethod method );
2339 
2349  double densityArea() const;
2350 
2356  void setDensityArea( double area );
2357 
2363  void setDensityAreaUnit( QgsUnitTypes::RenderUnit unit ) { mDensityAreaUnit = unit; }
2364 
2369  QgsUnitTypes::RenderUnit densityAreaUnit() const { return mDensityAreaUnit; }
2370 
2378  void setDensityAreaUnitScale( const QgsMapUnitScale &scale ) { mDensityAreaUnitScale = scale; }
2379 
2386  const QgsMapUnitScale &densityAreaUnitScale() const { return mDensityAreaUnitScale; }
2387 
2388  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2389  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2390 
2391  private:
2392 #ifdef SIP_RUN
2394 #endif
2395 
2396  struct Part
2397  {
2398  QPolygonF exterior;
2399  QVector<QPolygonF> rings;
2400  };
2401 
2402  QVector< Part > mCurrentParts;
2403 
2404  void render( QgsRenderContext &context, const QVector< Part > &parts, const QgsFeature &feature, bool selected );
2405 
2406  std::unique_ptr< QgsMarkerSymbol > mMarker;
2407  Qgis::PointCountMethod mCountMethod = Qgis::PointCountMethod::Absolute;
2408  int mPointCount = 10;
2409  double mDensityArea = 250.0;
2411  QgsMapUnitScale mDensityAreaUnitScale;
2412  unsigned long mSeed = 0;
2413  bool mClipPoints = false;
2414 
2415  bool mRenderingFeature = false;
2416  double mFeatureSymbolOpacity = 1;
2417 };
2418 
2419 
2425 {
2426  public:
2429 
2430  // static stuff
2431 
2437  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2438  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
2439 
2440  // implemented from base classes
2441 
2442  QString layerType() const override;
2443  void startRender( QgsSymbolRenderContext &context ) override;
2444  void stopRender( QgsSymbolRenderContext &context ) override;
2445  void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2446  QVariantMap properties() const override;
2447  QgsCentroidFillSymbolLayer *clone() const override SIP_FACTORY;
2448  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
2449  void setColor( const QColor &color ) override;
2450  QColor color() const override;
2451  QgsSymbol *subSymbol() override;
2452  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
2453  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
2454  QgsUnitTypes::RenderUnit outputUnit() const override;
2455  bool usesMapUnits() const override;
2456  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2457  QgsMapUnitScale mapUnitScale() const override;
2458  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2459  bool hasDataDefinedProperties() const override;
2460  bool canCauseArtifactsBetweenAdjacentTiles() const override;
2461 
2462  void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
2463  bool pointOnSurface() const { return mPointOnSurface; }
2464 
2470  void setPointOnAllParts( bool pointOnAllParts ) { mPointOnAllParts = pointOnAllParts; }
2471 
2477  bool pointOnAllParts() const { return mPointOnAllParts; }
2478 
2485  bool clipPoints() const { return mClipPoints; }
2486 
2493  void setClipPoints( bool clipPoints ) { mClipPoints = clipPoints; }
2494 
2501  bool clipOnCurrentPartOnly() const { return mClipOnCurrentPartOnly; }
2502 
2509  void setClipOnCurrentPartOnly( bool clipOnCurrentPartOnly ) { mClipOnCurrentPartOnly = clipOnCurrentPartOnly; }
2510 
2511  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2512  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2513 
2514  protected:
2515 
2516  std::unique_ptr< QgsMarkerSymbol > mMarker;
2517  bool mPointOnSurface = false;
2518  bool mPointOnAllParts = true;
2519  bool mClipPoints = false;
2520  bool mClipOnCurrentPartOnly = false;
2521 
2522  bool mRenderingFeature = false;
2523  double mFeatureSymbolOpacity = 1;
2524 
2525  private:
2526 #ifdef SIP_RUN
2528 #endif
2529  struct Part
2530  {
2531  QPolygonF exterior;
2532  QVector<QPolygonF> rings;
2533  };
2534 
2535  void render( QgsRenderContext &context, const QVector<Part> &parts, const QgsFeature &feature, bool selected );
2536  QVector<Part> mCurrentParts;
2537 };
2538 
2539 #endif
2540 
2541 
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:64
MarkerClipMode
Marker clipping modes.
Definition: qgis.h:1156
@ Shape
Clip to polygon shape.
LineClipMode
Line clipping modes.
Definition: qgis.h:1170
@ ClipPainterOnly
Applying clipping on the painter only (i.e. line endpoints will coincide with polygon bounding box,...
GradientColorSource
Gradient color sources.
Definition: qgis.h:1085
@ SimpleTwoColor
Simple two color gradient.
GradientSpread
Gradient spread options, which control how gradients are rendered outside of their start and end poin...
Definition: qgis.h:1129
@ Pad
Pad out gradient using colors at endpoint of gradient.
PointCountMethod
Methods which define the number of points randomly filling a polygon.
Definition: qgis.h:1144
GradientType
Gradient types.
Definition: qgis.h:1099
@ Linear
Linear gradient.
SymbolCoordinateReference
Symbol coordinate reference modes.
Definition: qgis.h:1114
@ Feature
Relative to feature/shape being rendered.
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
std::unique_ptr< QgsMarkerSymbol > mMarker
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
~QgsCentroidFillSymbolLayer() override
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
Abstract base class for color ramps.
Definition: qgscolorramp.h:30
Exports QGIS layers to the DXF format.
Definition: qgsdxfexport.h:65
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition: qgsfeature.h:56
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,...
double angle() const
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
QColor color2() const
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoC...
void setGradientSpread(Qgis::GradientSpread gradientSpread)
Sets the gradient spread mode, which controls how the gradient behaves outside of the predefined stop...
Qgis::SymbolCoordinateReference coordinateMode() const
Returns the coordinate mode for gradient, which controls how the gradient stops are positioned.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
bool referencePoint2IsCentroid() const
Returns whether the end point for the gradient is taken from the feature centroid.
void setGradientType(Qgis::GradientType gradientType)
Sets the type of gradient, e.g., linear or radial.
void setReferencePoint2(QPointF referencePoint)
Sets the end point of gradient fill, in the range [0,0] - [1,1].
void setCoordinateMode(Qgis::SymbolCoordinateReference coordinateMode)
Sets the coordinate mode for gradient, which controls how the gradient stops are positioned.
Qgis::SymbolCoordinateReference mCoordinateMode
Qgis::GradientSpread mGradientSpread
void setReferencePoint2IsCentroid(bool isCentroid)
Sets whether the end point for the gradient is taken from the feature centroid.
Qgis::GradientType mGradientType
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setReferencePoint1IsCentroid(bool isCentroid)
Sets whether the starting point for the gradient is taken from the feature centroid.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setGradientColorType(Qgis::GradientColorSource gradientColorType)
Sets the gradient color mode, which controls how gradient color stops are created.
QPointF referencePoint1() const
Returns the starting point of gradient fill, in the range [0,0] - [1,1].
Qgis::GradientSpread gradientSpread() const
Returns the gradient spread mode, which controls how the gradient behaves outside of the predefined s...
void setReferencePoint1(QPointF referencePoint)
Sets the starting point of gradient fill, in the range [0,0] - [1,1].
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
Qgis::GradientColorSource gradientColorType() const
Returns the gradient color mode, which controls how gradient color stops are created.
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
Qgis::GradientColorSource mGradientColorType
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
Qgis::GradientType gradientType() const
Returns the type of gradient, e.g., linear or radial.
bool referencePoint1IsCentroid() const
Returns whether the starting point for the gradient is taken from the feature centroid.
QPointF referencePoint2() const
Returns the end point of gradient fill, in the range [0,0] - [1,1].
void setColor2(const QColor &color2)
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColo...
Base class for polygon renderers generating texture images.
QgsMapUnitScale mStrokeWidthMapUnitScale
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
Qgis::SymbolCoordinateReference coordinateReference() const
Returns the coordinate reference mode for fill which controls how the top left corner of the image fi...
void setCoordinateReference(Qgis::SymbolCoordinateReference coordinateReference)
Sets the coordinate reference mode for fill which controls how the top left corner of the image fill ...
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
virtual void applyDataDefinedSettings(QgsSymbolRenderContext &context)
Applies data defined settings prior to generating the fill symbol brush.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units fo the symbol's stroke width.
~QgsImageFillSymbolLayer() override
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
A symbol fill consisting of repeated parallel lines.
void setLineWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's width.
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line width.
double lineWidth() const
Returns the width of the line subsymbol used to render the parallel lines in the fill.
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width.
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns the units for the line's width.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
Qgis::LineClipMode clipMode() const
Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
void setClipMode(Qgis::LineClipMode mode)
Sets the line clipping mode, which defines how lines are clipped at the edges of shapes.
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset.
double distance() const
Returns the distance between lines in the fill pattern.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
~QgsLinePatternFillSymbolLayer() override
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition: qgslinesymbol.h:30
Struct for storing maximum and minimum scales for measurements in map units.
A marker symbol type, for rendering Point and MultiPoint geometries.
Resolves relative paths into absolute paths and vice versa.
A fill symbol layer which fills polygon shapes with repeating marker symbols.
void setDisplacementX(double d)
Sets the horizontal displacement for odd numbered rows in the pattern.
const QgsMapUnitScale & displacementYMapUnitScale() const
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
void setRandomDeviationXUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the horizontal random deviation of points in the pattern.
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
double maximumRandomDeviationY() const
Returns the maximum vertical random deviation of points in the pattern.
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
double displacementY() const
Returns the vertical displacement for odd numbered columns in the pattern.
void setRandomDeviationYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical random deviation of points in the pattern.
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
unsigned long seed() const
Returns the random number seed to use when randomly shifting points, or 0 if a truly random sequence ...
Qgis::MarkerClipMode clipMode() const
Returns the marker clipping mode, which defines how markers are clipped at the edges of shapes.
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
void setRandomDeviationXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal random deviation of points in the pattern.
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
QgsUnitTypes::RenderUnit randomDeviationYUnit() const
Returns the units for the vertical random deviation of points in the pattern.
double offsetY() const
Returns the vertical offset values for points in the pattern.
void setDisplacementY(double d)
Sets the vertical displacement for odd numbered columns in the pattern.
QgsUnitTypes::RenderUnit randomDeviationXUnit() const
Returns the units for the horizontal random deviation of points in the pattern.
const QgsMapUnitScale & distanceYMapUnitScale() const
Returns the map unit scale for the vertical distance between points in the pattern.
void setMaximumRandomDeviationX(double deviation)
Sets the maximum horizontal random deviation of points in the pattern.
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the vertical displacement between odd numbered columns in the pattern.
void setSeed(unsigned long seed)
Sets the random number seed to use when randomly shifting points, or 0 if a truly random sequence wil...
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern.
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the horizontal distance between points in the pattern.
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the horizontal distance between points in the pattern.
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
const QgsMapUnitScale & randomDeviationXMapUnitScale() const
Returns the unit scale for the horizontal random deviation of points in the pattern.
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern.
void setDistanceY(double d)
Sets the vertical distance between rendered markers in the fill.
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setDistanceX(double d)
Sets the horizontal distance between rendered markers in the fill.
double offsetX() const
Returns the horizontal offset values for points in the pattern.
double maximumRandomDeviationX() const
Returns the maximum horizontal random deviation of points in the pattern.
const QgsMapUnitScale & randomDeviationYMapUnitScale() const
Returns the unit scale for the vertical random deviation of points in the pattern.
std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol
void setDisplacementXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
void setMaximumRandomDeviationY(double deviation)
Sets the maximum vertical random deviation of points in the pattern.
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the vertical distance between points in the pattern.
void setRandomDeviationYUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the vertical random deviation of points in the pattern.
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
double displacementX() const
Returns the horizontal displacement for odd numbered rows in the pattern.
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
double angle() const
Returns the rotation angle of the pattern, in degrees clockwise.
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
const QgsMapUnitScale & distanceXMapUnitScale() const
Returns the map unit scale for the horizontal distance between points in the pattern.
~QgsPointPatternFillSymbolLayer() override
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the vertical distance between points in the pattern.
void setAngle(double angle)
Sets the rotation angle of the pattern, in degrees clockwise.
double distanceY() const
Returns the vertical distance between rendered markers in the fill.
void setClipMode(Qgis::MarkerClipMode mode)
Sets the marker clipping mode, which defines how markers are clipped at the edges of shapes.
const QgsMapUnitScale & displacementXMapUnitScale() const
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
A fill symbol layer which places markers at random locations within polygons.
~QgsRandomMarkerFillSymbolLayer() override
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area.
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
A class for filling symbols with a repeated raster image.
double width() const
Returns the width used for scaling the image used in the fill.
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width.
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
Qgis::SymbolCoordinateReference coordinateMode() const
Coordinate mode for fill.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width.
void setWidth(const double width)
Sets the width for scaling the image used in the fill.
double opacity() const
Returns the opacity for the raster image used in the fill.
~QgsRasterFillSymbolLayer() override
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QString imageFilePath() const
The path to the raster image used for the fill.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
QPointF offset() const
Returns the offset for the fill.
void setOffset(QPointF offset)
Sets the offset for the fill.
Contains information about the context of a rendering operation.
A class for filling symbols with a repeated SVG file.
QMap< QString, QgsProperty > parameters() const
Returns the dynamic SVG parameters.
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width.
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width.
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e.
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e.
~QgsSVGFillSymbolLayer() override
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
~QgsShapeburstFillSymbolLayer() override
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
const QgsMapUnitScale & distanceMapUnitScale() const
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
QgsShapeburstFillSymbolLayer & operator=(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill.
const QgsMapUnitScale & offsetMapUnitScale() const
QPointF offset() const
Returns the offset for the shapeburst fill.
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
void setColorType(Qgis::GradientColorSource colorType)
Sets the color mode to use for the shapeburst fill.
Qgis::GradientColorSource colorType() const
Returns the color mode used for the shapeburst fill.
QgsShapeburstFillSymbolLayer(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
Qt::PenJoinStyle penJoinStyle() const
QColor strokeColor() const override
Gets stroke color.
void setBrushStyle(Qt::BrushStyle style)
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
~QgsSimpleFillSymbolLayer() override
void setPenJoinStyle(Qt::PenJoinStyle style)
QColor fillColor() const override
Gets fill color.
Qt::PenStyle strokeStyle() const
QgsMapUnitScale mOffsetMapUnitScale
void setStrokeWidth(double strokeWidth)
void setStrokeStyle(Qt::PenStyle strokeStyle)
QgsMapUnitScale mStrokeWidthMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
void setFillColor(const QColor &color) override
Set fill color.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QPointF offset()
Returns the offset by which polygons will be translated during rendering.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setStrokeColor(const QColor &strokeColor) override
Set stroke color.
Qt::PenJoinStyle mPenJoinStyle
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke.
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
virtual QgsMapUnitScale mapUnitScale() const
virtual QColor color() const
The fill color.
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width.
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle.
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
virtual QColor strokeColor() const
Gets stroke color.
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
virtual void setColor(const QColor &color)
The fill color.
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:38
Helper functions for various unit types.
Definition: qgsunittypes.h:39
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:168
@ RenderPixels
Pixels.
Definition: qgsunittypes.h:171
@ RenderMillimeters
Millimeters.
Definition: qgsunittypes.h:169
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
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
QMap< QString, QString > QgsStringMap
Definition: qgis.h:1990
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_FACTORY
Definition: qgis_sip.h:76
#define DEFAULT_SIMPLEFILL_JOINSTYLE
#define DEFAULT_SIMPLEFILL_COLOR
#define DEFAULT_SIMPLEFILL_STYLE
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
#define DEFAULT_SIMPLEFILL_BORDERWIDTH