QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslinesymbollayer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslinesymbollayer.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 QGSLINESYMBOLLAYER_H
17 #define QGSLINESYMBOLLAYER_H
18 
19 #include "qgis_core.h"
20 #include "qgis.h"
21 #include "qgssymbollayer.h"
22 
23 #include <QPen>
24 #include <QVector>
25 
26 class QgsExpression;
27 class QgsMarkerSymbol;
28 class QgsLineSymbol;
29 class QgsPathResolver;
30 class QgsColorRamp;
31 
32 #define DEFAULT_SIMPLELINE_COLOR QColor(35,35,35)
33 #define DEFAULT_SIMPLELINE_WIDTH DEFAULT_LINE_WIDTH
34 #define DEFAULT_SIMPLELINE_PENSTYLE Qt::SolidLine
35 #define DEFAULT_SIMPLELINE_JOINSTYLE Qt::BevelJoin
36 #define DEFAULT_SIMPLELINE_CAPSTYLE Qt::SquareCap
37 
43 class CORE_EXPORT QgsSimpleLineSymbolLayer : public QgsLineSymbolLayer
44 {
45  public:
46 
53  double width = DEFAULT_SIMPLELINE_WIDTH,
54  Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );
55 
56  ~QgsSimpleLineSymbolLayer() override;
57 
58  // static stuff
59 
65  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
66 
70  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
71 
72  QString layerType() const override;
73  void startRender( QgsSymbolRenderContext &context ) override;
74  void stopRender( QgsSymbolRenderContext &context ) override;
75  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
76  //overridden so that clip path can be set when using draw inside polygon option
77  void renderPolygonStroke( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
78  QVariantMap properties() const override;
79  QgsSimpleLineSymbolLayer *clone() const override SIP_FACTORY;
80  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
81  QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
82  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
83  QgsUnitTypes::RenderUnit outputUnit() const override;
84  bool usesMapUnits() const override;
85  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
86  QgsMapUnitScale mapUnitScale() const override;
87  double estimateMaxBleed( const QgsRenderContext &context ) const override;
88  QVector<qreal> dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const override;
89  Qt::PenStyle dxfPenStyle() const override;
90  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
91  double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
92  QColor dxfColor( QgsSymbolRenderContext &context ) const override;
93  bool canCauseArtifactsBetweenAdjacentTiles() const override;
94 
100  Qt::PenStyle penStyle() const { return mPenStyle; }
101 
107  void setPenStyle( Qt::PenStyle style ) { mPenStyle = style; }
108 
114  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
115 
121  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
122 
128  Qt::PenCapStyle penCapStyle() const { return mPenCapStyle; }
129 
135  void setPenCapStyle( Qt::PenCapStyle style ) { mPenCapStyle = style; }
136 
143  bool useCustomDashPattern() const { return mUseCustomDashPattern; }
144 
151  void setUseCustomDashPattern( bool b ) { mUseCustomDashPattern = b; }
152 
157  void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit ) { mCustomDashPatternUnit = unit; }
158 
163  QgsUnitTypes::RenderUnit customDashPatternUnit() const { return mCustomDashPatternUnit; }
164 
169  const QgsMapUnitScale &customDashPatternMapUnitScale() const { return mCustomDashPatternMapUnitScale; }
170 
175  void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale ) { mCustomDashPatternMapUnitScale = scale; }
176 
189  QVector<qreal> customDashVector() const { return mCustomDashVector; }
190 
203  void setCustomDashVector( const QVector<qreal> &vector ) { mCustomDashVector = vector; }
204 
217  double dashPatternOffset() const { return mDashPatternOffset; }
218 
231  void setDashPatternOffset( double offset ) { mDashPatternOffset = offset; }
232 
242  void setDashPatternOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mDashPatternOffsetUnit = unit; }
243 
253  QgsUnitTypes::RenderUnit dashPatternOffsetUnit() const { return mDashPatternOffsetUnit; }
254 
264  const QgsMapUnitScale &dashPatternOffsetMapUnitScale() const { return mDashPatternOffsetMapUnitScale; }
265 
275  void setDashPatternOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mDashPatternOffsetMapUnitScale = scale; }
276 
290  double trimDistanceStart() const { return mTrimDistanceStart; }
291 
305  void setTrimDistanceStart( double distance ) { mTrimDistanceStart = distance; }
306 
317  void setTrimDistanceStartUnit( QgsUnitTypes::RenderUnit unit ) { mTrimDistanceStartUnit = unit; }
318 
329  QgsUnitTypes::RenderUnit trimDistanceStartUnit() const { return mTrimDistanceStartUnit; }
330 
341  const QgsMapUnitScale &trimDistanceStartMapUnitScale() const { return mTrimDistanceStartMapUnitScale; }
342 
353  void setTrimDistanceStartMapUnitScale( const QgsMapUnitScale &scale ) { mTrimDistanceStartMapUnitScale = scale; }
354 
368  double trimDistanceEnd() const { return mTrimDistanceEnd; }
369 
383  void setTrimDistanceEnd( double distance ) { mTrimDistanceEnd = distance; }
384 
395  void setTrimDistanceEndUnit( QgsUnitTypes::RenderUnit unit ) { mTrimDistanceEndUnit = unit; }
396 
407  QgsUnitTypes::RenderUnit trimDistanceEndUnit() const { return mTrimDistanceEndUnit; }
408 
419  const QgsMapUnitScale &trimDistanceEndMapUnitScale() const { return mTrimDistanceEndMapUnitScale; }
420 
431  void setTrimDistanceEndMapUnitScale( const QgsMapUnitScale &scale ) { mTrimDistanceEndMapUnitScale = scale; }
432 
442  bool drawInsidePolygon() const { return mDrawInsidePolygon; }
443 
453  void setDrawInsidePolygon( bool drawInsidePolygon ) { mDrawInsidePolygon = drawInsidePolygon; }
454 
464  bool alignDashPattern() const;
465 
475  void setAlignDashPattern( bool enabled );
476 
487  bool tweakDashPatternOnCorners() const;
488 
499  void setTweakDashPatternOnCorners( bool enabled );
500 
501  private:
502 
503  Qt::PenStyle mPenStyle = Qt::SolidLine;
504  Qt::PenJoinStyle mPenJoinStyle = DEFAULT_SIMPLELINE_JOINSTYLE;
505  Qt::PenCapStyle mPenCapStyle = DEFAULT_SIMPLELINE_CAPSTYLE;
506  QPen mPen;
507  QPen mSelPen;
508 
509  bool mUseCustomDashPattern = false;
511  QgsMapUnitScale mCustomDashPatternMapUnitScale;
512 
513  double mDashPatternOffset = 0;
515  QgsMapUnitScale mDashPatternOffsetMapUnitScale;
516 
517  double mTrimDistanceStart = 0;
519  QgsMapUnitScale mTrimDistanceStartMapUnitScale;
520 
521  double mTrimDistanceEnd = 0;
523  QgsMapUnitScale mTrimDistanceEndMapUnitScale;
524 
526  QVector<qreal> mCustomDashVector;
527 
528  bool mAlignDashPattern = false;
529  bool mPatternCartographicTweakOnSharpCorners = false;
530 
531  bool mDrawInsidePolygon = false;
532 
533  //helper functions for data defined symbology
534  void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QPen &pen, QPen &selPen, double &offset );
535  void drawPathWithDashPatternTweaks( QPainter *painter, const QPolygonF &points, QPen pen ) const;
536 };
537 
539 
540 #define DEFAULT_MARKERLINE_ROTATE true
541 #define DEFAULT_MARKERLINE_INTERVAL 3
542 
553 {
554  public:
555 
563  QgsTemplatedLineSymbolLayerBase( bool rotateSymbol = true,
564  double interval = 3 );
565 
567 
572  bool rotateSymbols() const { return mRotateSymbols; }
573 
578  void setRotateSymbols( bool rotate ) { mRotateSymbols = rotate; }
579 
585  double interval() const { return mInterval; }
586 
593  void setInterval( double interval ) { mInterval = interval; }
594 
601  void setIntervalUnit( QgsUnitTypes::RenderUnit unit ) { mIntervalUnit = unit; }
602 
608  QgsUnitTypes::RenderUnit intervalUnit() const { return mIntervalUnit; }
609 
616  void setIntervalMapUnitScale( const QgsMapUnitScale &scale ) { mIntervalMapUnitScale = scale; }
617 
624  const QgsMapUnitScale &intervalMapUnitScale() const { return mIntervalMapUnitScale; }
625 
631  Q_DECL_DEPRECATED Qgis::MarkerLinePlacement placement() const SIP_DEPRECATED;
632 
638  Q_DECL_DEPRECATED void setPlacement( Qgis::MarkerLinePlacement placement ) SIP_DEPRECATED;
639 
645  Qgis::MarkerLinePlacements placements() const { return mPlacements; }
646 
652  void setPlacements( Qgis::MarkerLinePlacements placements ) { mPlacements = placements; }
653 
668  bool placeOnEveryPart() const { return mPlaceOnEveryPart; }
669 
684  void setPlaceOnEveryPart( bool respect ) { mPlaceOnEveryPart = respect; }
685 
696  double offsetAlongLine() const { return mOffsetAlongLine; }
697 
709  void setOffsetAlongLine( double offsetAlongLine ) { mOffsetAlongLine = offsetAlongLine; }
710 
717  QgsUnitTypes::RenderUnit offsetAlongLineUnit() const { return mOffsetAlongLineUnit; }
718 
725  void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetAlongLineUnit = unit; }
726 
731  const QgsMapUnitScale &offsetAlongLineMapUnitScale() const { return mOffsetAlongLineMapUnitScale; }
732 
737  void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetAlongLineMapUnitScale = scale; }
738 
749  double averageAngleLength() const { return mAverageAngleLength; }
750 
761  void setAverageAngleLength( double length ) { mAverageAngleLength = length; }
762 
771  void setAverageAngleUnit( QgsUnitTypes::RenderUnit unit ) { mAverageAngleLengthUnit = unit; }
772 
781  QgsUnitTypes::RenderUnit averageAngleUnit() const { return mAverageAngleLengthUnit; }
782 
791  void setAverageAngleMapUnitScale( const QgsMapUnitScale &scale ) { mAverageAngleLengthMapUnitScale = scale; }
792 
801  const QgsMapUnitScale &averageAngleMapUnitScale() const { return mAverageAngleLengthMapUnitScale; }
802 
803  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
804  void renderPolygonStroke( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) FINAL;
806  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
807  void setMapUnitScale( const QgsMapUnitScale &scale ) FINAL;
808  QgsMapUnitScale mapUnitScale() const FINAL;
809  QVariantMap properties() const override;
810  bool canCauseArtifactsBetweenAdjacentTiles() const override;
811 
812  void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
813  void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
814 
815  protected:
816 
823  virtual void setSymbolLineAngle( double angle ) = 0;
824 
828  virtual double symbolAngle() const = 0;
829 
833  virtual void setSymbolAngle( double angle ) = 0;
834 
847  virtual void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false ) = 0;
848 
852  void copyTemplateSymbolProperties( QgsTemplatedLineSymbolLayerBase *destLayer ) const;
853 
858  static void setCommonProperties( QgsTemplatedLineSymbolLayerBase *destLayer, const QVariantMap &properties );
859 
860  private:
861 
862  void renderPolylineInterval( const QPolygonF &points, QgsSymbolRenderContext &context, double averageAngleOver );
863  void renderPolylineVertex( const QPolygonF &points, QgsSymbolRenderContext &context, Qgis::MarkerLinePlacement placement = Qgis::MarkerLinePlacement::Vertex );
864  void renderPolylineCentral( const QPolygonF &points, QgsSymbolRenderContext &context, double averageAngleOver );
865  double markerAngle( const QPolygonF &points, bool isRing, int vertex );
866 
879  void renderOffsetVertexAlongLine( const QPolygonF &points, int vertex, double distance, QgsSymbolRenderContext &context,
880  Qgis::MarkerLinePlacement placement );
881 
882 
883  static void collectOffsetPoints( const QVector< QPointF> &points,
884  QVector< QPointF> &dest, double intervalPainterUnits, double initialOffset, double initialLag = 0,
885  int numberPointsRequired = -1 );
886 
887  bool mRotateSymbols = true;
888  double mInterval = 3;
889  QgsUnitTypes::RenderUnit mIntervalUnit = QgsUnitTypes::RenderMillimeters;
890  QgsMapUnitScale mIntervalMapUnitScale;
891  Qgis::MarkerLinePlacements mPlacements = Qgis::MarkerLinePlacement::Interval;
892  double mOffsetAlongLine = 0; //distance to offset along line before marker is drawn
893  QgsUnitTypes::RenderUnit mOffsetAlongLineUnit = QgsUnitTypes::RenderMillimeters; //unit for offset along line
894  QgsMapUnitScale mOffsetAlongLineMapUnitScale;
895  double mAverageAngleLength = 4;
896  QgsUnitTypes::RenderUnit mAverageAngleLengthUnit = QgsUnitTypes::RenderMillimeters;
897  QgsMapUnitScale mAverageAngleLengthMapUnitScale;
898  bool mPlaceOnEveryPart = true;
899 
900  bool mRenderingFeature = false;
901  bool mHasRenderedFirstPart = false;
902  QPointF mFinalVertex;
903  bool mCurrentFeatureIsSelected = false;
904  double mFeatureSymbolOpacity = 1;
905 
906  friend class TestQgsMarkerLineSymbol;
907 
908 };
909 
916 {
917  public:
918 
927  double interval = DEFAULT_MARKERLINE_INTERVAL );
928 
929  ~QgsMarkerLineSymbolLayer() override;
930 
931  // static stuff
932 
938  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
939 
943  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
944 
945  // implemented from base classes
946 
947  QString layerType() const override;
948  void startRender( QgsSymbolRenderContext &context ) override;
949  void stopRender( QgsSymbolRenderContext &context ) override;
950  QgsMarkerLineSymbolLayer *clone() const override SIP_FACTORY;
951  void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
952  void setColor( const QColor &color ) override;
953  QColor color() const override;
954  QgsSymbol *subSymbol() override;
955  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
956  void setWidth( double width ) override;
957  double width() const override;
958  double width( const QgsRenderContext &context ) const override;
959  double estimateMaxBleed( const QgsRenderContext &context ) const override;
960  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
961  bool usesMapUnits() const override;
962  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
963  bool hasDataDefinedProperties() const override;
964  void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property ) override;
965 
972  Q_DECL_DEPRECATED bool rotateMarker() const SIP_DEPRECATED { return rotateSymbols(); }
973 
978  Q_DECL_DEPRECATED void setRotateMarker( bool rotate ) SIP_DEPRECATED { setRotateSymbols( rotate ); }
979 
980  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
981 
982  protected:
983 
984  std::unique_ptr< QgsMarkerSymbol > mMarker;
985 
986  void setSymbolLineAngle( double angle ) override;
987  double symbolAngle() const override;
988  void setSymbolAngle( double angle ) override;
989  void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false ) override;
990 
991  private:
992 
993 #ifdef SIP_RUN
995 #endif
996 
997 
998 };
999 
1000 
1010 {
1011  public:
1012 
1020  QgsHashedLineSymbolLayer( bool rotateSymbol = true,
1021  double interval = 3 );
1022 
1023  ~QgsHashedLineSymbolLayer() override;
1024 
1030  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1031 
1032  QString layerType() const override;
1033  void startRender( QgsSymbolRenderContext &context ) override;
1034  void stopRender( QgsSymbolRenderContext &context ) override;
1035  QVariantMap properties() const override;
1036  QgsHashedLineSymbolLayer *clone() const override SIP_FACTORY;
1037  void setColor( const QColor &color ) override;
1038  QColor color() const override;
1039  QgsSymbol *subSymbol() override;
1040  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1041  void setWidth( double width ) override;
1042  double width() const override;
1043  double width( const QgsRenderContext &context ) const override;
1044  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1045  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1046  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1047  bool hasDataDefinedProperties() const override;
1048  void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property ) override;
1049  bool usesMapUnits() const override;
1050 
1056  double hashAngle() const;
1057 
1063  void setHashAngle( double angle );
1064 
1070  double hashLength() const { return mHashLength; }
1071 
1077  void setHashLength( double length ) { mHashLength = length; }
1078 
1084  void setHashLengthUnit( QgsUnitTypes::RenderUnit unit ) { mHashLengthUnit = unit; }
1085 
1091  QgsUnitTypes::RenderUnit hashLengthUnit() const { return mHashLengthUnit; }
1092 
1099  void setHashLengthMapUnitScale( const QgsMapUnitScale &scale ) { mHashLengthMapUnitScale = scale; }
1100 
1107  const QgsMapUnitScale &hashLengthMapUnitScale() const { return mHashLengthMapUnitScale; }
1108 
1109  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
1110 
1111  protected:
1112 
1113  void setSymbolLineAngle( double angle ) override;
1114  double symbolAngle() const override;
1115  void setSymbolAngle( double angle ) override;
1116  void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false ) override;
1117 
1118  private:
1119 #ifdef SIP_RUN
1121 #endif
1122 
1123  std::unique_ptr< QgsLineSymbol > mHashSymbol;
1124 
1125  double mSymbolLineAngle = 0;
1126  double mSymbolAngle = 0;
1127 
1128  double mHashAngle = 0;
1129  double mHashLength = 3;
1131  QgsMapUnitScale mHashLengthMapUnitScale;
1132 
1133 };
1134 
1135 
1145 {
1146  public:
1147 
1153  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
1154 
1160  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
1161 
1167  Qt::PenCapStyle penCapStyle() const { return mPenCapStyle; }
1168 
1174  void setPenCapStyle( Qt::PenCapStyle style ) { mPenCapStyle = style; }
1175 
1176  protected:
1177 
1181  void renderPolylineUsingBrush( const QPolygonF &points, QgsSymbolRenderContext &context, const QBrush &brush,
1182  double patternThickness, double patternLength );
1183 
1184  Qt::PenJoinStyle mPenJoinStyle = Qt::PenJoinStyle::RoundJoin;
1185  Qt::PenCapStyle mPenCapStyle = Qt::PenCapStyle::RoundCap;
1186 
1187  private:
1188  void renderLine( const QPolygonF &points, QgsSymbolRenderContext &context, const double lineThickness, const double patternLength, const QBrush &sourceBrush );
1189 };
1190 
1191 
1192 
1202 {
1203  public:
1204 
1208  QgsRasterLineSymbolLayer( const QString &path = QString() );
1209  virtual ~QgsRasterLineSymbolLayer();
1210 
1216  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1217 
1222  static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
1223 
1228  QString path() const { return mPath; }
1229 
1234  void setPath( const QString &path );
1235 
1241  double opacity() const { return mOpacity; }
1242 
1248  void setOpacity( double opacity ) { mOpacity = opacity; }
1249 
1250  QString layerType() const override;
1251  void startRender( QgsSymbolRenderContext &context ) override;
1252  void stopRender( QgsSymbolRenderContext &context ) override;
1253  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
1254  QVariantMap properties() const override;
1255  QgsRasterLineSymbolLayer *clone() const override SIP_FACTORY;
1256  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1257  QgsUnitTypes::RenderUnit outputUnit() const override;
1258  bool usesMapUnits() const override;
1259  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1260  QgsMapUnitScale mapUnitScale() const override;
1261  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1262  QColor color() const override;
1263 
1264  protected:
1265  QString mPath;
1266  double mOpacity = 1.0;
1267  QImage mLineImage;
1268 
1269 };
1270 
1271 
1284 {
1285  public:
1286 
1290  QgsLineburstSymbolLayer( const QColor &color = DEFAULT_SIMPLELINE_COLOR,
1291  const QColor &color2 = Qt::white );
1292  ~QgsLineburstSymbolLayer() override;
1293 
1299  static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1300 
1301  QString layerType() const override;
1302  void startRender( QgsSymbolRenderContext &context ) override;
1303  void stopRender( QgsSymbolRenderContext &context ) override;
1304  void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override;
1305  QVariantMap properties() const override;
1306  QgsLineburstSymbolLayer *clone() const override SIP_FACTORY;
1307  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
1308  QgsUnitTypes::RenderUnit outputUnit() const override;
1309  bool usesMapUnits() const override;
1310  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1311  QgsMapUnitScale mapUnitScale() const override;
1312  double estimateMaxBleed( const QgsRenderContext &context ) const override;
1313  QColor color() const override;
1314 
1320  Qgis::GradientColorSource gradientColorType() const { return mGradientColorType; }
1321 
1327  void setGradientColorType( Qgis::GradientColorSource gradientColorType ) { mGradientColorType = gradientColorType; }
1328 
1335  QgsColorRamp *colorRamp();
1336 
1344  void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
1345 
1351  QColor color2() const { return mColor2; }
1352 
1358  void setColor2( const QColor &color2 ) { mColor2 = color2; }
1359 
1360  protected:
1362  QColor mColor2;
1363  std::unique_ptr< QgsColorRamp > mGradientRamp;
1364 
1365 };
1366 
1367 #endif
1368 
1369 
QgsLineSymbolLayer
Definition: qgssymbollayer.h:1024
QgsRasterLineSymbolLayer
Line symbol layer type which draws line sections using a raster image file.
Definition: qgslinesymbollayer.h:1201
QgsSimpleLineSymbolLayer::setTrimDistanceStartMapUnitScale
void setTrimDistanceStartMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the trim distance for the start of the line.
Definition: qgslinesymbollayer.h:353
QgsColorRamp
Abstract base class for color ramps.
Definition: qgscolorramp.h:29
QgsSimpleLineSymbolLayer::trimDistanceStartMapUnitScale
const QgsMapUnitScale & trimDistanceStartMapUnitScale() const
Returns the map unit scale for the trim distance for the start of the line.
Definition: qgslinesymbollayer.h:341
QgsAbstractBrushedLineSymbolLayer::setPenJoinStyle
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the pen join style used to render the line (e.g.
Definition: qgslinesymbollayer.h:1160
QgsSimpleLineSymbolLayer::dashPatternOffsetMapUnitScale
const QgsMapUnitScale & dashPatternOffsetMapUnitScale() const
Returns the map unit scale for the dash pattern offset value.
Definition: qgslinesymbollayer.h:264
QgsSimpleLineSymbolLayer::dashPatternOffset
double dashPatternOffset() const
Returns the dash pattern offset, which dictates how far along the dash pattern the pattern should sta...
Definition: qgslinesymbollayer.h:217
QgsTemplatedLineSymbolLayerBase::setOffsetAlongLine
void setOffsetAlongLine(double offsetAlongLine)
Sets the the offset along the line for the symbol placement.
Definition: qgslinesymbollayer.h:709
QgsTemplatedLineSymbolLayerBase::averageAngleMapUnitScale
const QgsMapUnitScale & averageAngleMapUnitScale() const
Returns the map unit scale for the length over which the line's direction is averaged when calculatin...
Definition: qgslinesymbollayer.h:801
QgsSymbolLayer::setColor
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
Definition: qgssymbollayer.cpp:252
QgsProperty
A store for object properties.
Definition: qgsproperty.h:230
QgsHashedLineSymbolLayer::setHashLengthUnit
void setHashLengthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the length of hash symbols.
Definition: qgslinesymbollayer.h:1084
QgsTemplatedLineSymbolLayerBase::placeOnEveryPart
bool placeOnEveryPart() const
Returns true if the placement applies for every part of multi-part feature geometries.
Definition: qgslinesymbollayer.h:668
QgsUnitTypes::RenderUnit
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:167
QgsDxfExport
Exports QGIS layers to the DXF format.
Definition: qgsdxfexport.h:64
QgsLineSymbolLayer::renderPolyline
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
Renders the line symbol layer along the line joining points, using the given render context.
QgsSimpleLineSymbolLayer::penCapStyle
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
Definition: qgslinesymbollayer.h:128
QgsSymbolLayer::dxfPenStyle
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
Definition: qgssymbollayer.cpp:207
QgsLineSymbolLayer::width
virtual double width() const
Returns the estimated width for the line symbol layer.
Definition: qgssymbollayer.h:1089
QgsLineburstSymbolLayer::mGradientRamp
std::unique_ptr< QgsColorRamp > mGradientRamp
Definition: qgslinesymbollayer.h:1363
QgsTemplatedLineSymbolLayerBase::offsetAlongLineUnit
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const
Returns the unit used for calculating the offset along line for symbols.
Definition: qgslinesymbollayer.h:717
QgsSymbolLayer::dxfCustomDashPattern
virtual QVector< qreal > dxfCustomDashPattern(QgsUnitTypes::RenderUnit &unit) const
Gets dash pattern.
Definition: qgssymbollayer.cpp:201
QgsRasterLineSymbolLayer::opacity
double opacity() const
Returns the line opacity.
Definition: qgslinesymbollayer.h:1241
QgsHashedLineSymbolLayer
Line symbol layer type which draws repeating line sections along a line feature.
Definition: qgslinesymbollayer.h:1009
DEFAULT_MARKERLINE_ROTATE
#define DEFAULT_MARKERLINE_ROTATE
Definition: qgslinesymbollayer.h:540
QgsSimpleLineSymbolLayer::setCustomDashPatternMapUnitScale
void setCustomDashPatternMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for lengths used in the custom dash pattern.
Definition: qgslinesymbollayer.h:175
QgsSymbolLayer::subSymbol
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
Definition: qgssymbollayer.cpp:154
QgsSimpleLineSymbolLayer::setPenJoinStyle
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the pen join style used to render the line (e.g.
Definition: qgslinesymbollayer.h:121
QgsSimpleLineSymbolLayer::penJoinStyle
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join style used to render the line (e.g.
Definition: qgslinesymbollayer.h:114
QgsLineSymbolLayer::setWidth
virtual void setWidth(double width)
Sets the width of the line symbol layer.
Definition: qgssymbollayer.h:1078
DEFAULT_MARKERLINE_INTERVAL
#define DEFAULT_MARKERLINE_INTERVAL
Definition: qgslinesymbollayer.h:541
QgsTemplatedLineSymbolLayerBase::renderSymbol
virtual void renderSymbol(const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer=-1, bool selected=false)=0
Renders the templated symbol at the specified point, using the given render context.
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:287
QgsHashedLineSymbolLayer::setHashLengthMapUnitScale
void setHashLengthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the hash length.
Definition: qgslinesymbollayer.h:1099
qgis.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsSimpleLineSymbolLayer::drawInsidePolygon
bool drawInsidePolygon() const
Returns true if the line should only be drawn inside polygons, and any portion of the line which fall...
Definition: qgslinesymbollayer.h:442
QgsSimpleLineSymbolLayer::setTrimDistanceEndUnit
void setTrimDistanceEndUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the trim distance for the end of the line.
Definition: qgslinesymbollayer.h:395
QgsSimpleLineSymbolLayer::trimDistanceStartUnit
QgsUnitTypes::RenderUnit trimDistanceStartUnit() const
Returns the unit for the trim distance for the start of the line.
Definition: qgslinesymbollayer.h:329
QgsHashedLineSymbolLayer::hashLength
double hashLength() const
Returns the length of hash symbols.
Definition: qgslinesymbollayer.h:1070
QgsSimpleLineSymbolLayer::useCustomDashPattern
bool useCustomDashPattern() const
Returns true if the line uses a custom dash pattern.
Definition: qgslinesymbollayer.h:143
QgsUnitTypes::RenderMillimeters
@ RenderMillimeters
Millimeters.
Definition: qgsunittypes.h:169
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:475
QgsSimpleLineSymbolLayer::setDashPatternOffsetUnit
void setDashPatternOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the dash pattern offset.
Definition: qgslinesymbollayer.h:242
QgsLineSymbolLayer::outputUnit
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
Definition: qgssymbollayer.cpp:727
QgsSymbol
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:92
Qgis::GradientColorSource::SimpleTwoColor
@ SimpleTwoColor
Simple two color gradient.
QgsSimpleLineSymbolLayer::setUseCustomDashPattern
void setUseCustomDashPattern(bool b)
Sets whether the line uses a custom dash pattern.
Definition: qgslinesymbollayer.h:151
QgsMarkerLineSymbolLayer
Line symbol layer type which draws repeating marker symbols along a line feature.
Definition: qgslinesymbollayer.h:915
QgsSymbolLayer::ogrFeatureStyle
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
Definition: qgssymbollayer.h:418
FINAL
#define FINAL
Definition: qgis_sip.h:237
QgsSimpleLineSymbolLayer::customDashVector
QVector< qreal > customDashVector() const
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while ...
Definition: qgslinesymbollayer.h:189
QgsLineSymbolLayer::mapUnitScale
QgsMapUnitScale mapUnitScale() const override
Definition: qgssymbollayer.cpp:737
QgsAbstractBrushedLineSymbolLayer::penJoinStyle
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join style used to render the line (e.g.
Definition: qgslinesymbollayer.h:1153
QgsSymbolLayer::usesMapUnits
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
Definition: qgssymbollayer.cpp:313
DEFAULT_SIMPLELINE_CAPSTYLE
#define DEFAULT_SIMPLELINE_CAPSTYLE
Definition: qgslinesymbollayer.h:36
QgsSimpleLineSymbolLayer::setTrimDistanceEndMapUnitScale
void setTrimDistanceEndMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the trim distance for the end of the line.
Definition: qgslinesymbollayer.h:431
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
Qgis::GradientColorSource
GradientColorSource
Gradient color sources.
Definition: qgis.h:1433
DEFAULT_SIMPLELINE_COLOR
#define DEFAULT_SIMPLELINE_COLOR
Definition: qgslinesymbollayer.h:32
QgsSimpleLineSymbolLayer::setCustomDashVector
void setCustomDashVector(const QVector< qreal > &vector)
Sets the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while ren...
Definition: qgslinesymbollayer.h:203
QgsTemplatedLineSymbolLayerBase::setIntervalMapUnitScale
void setIntervalMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the interval between symbols.
Definition: qgslinesymbollayer.h:616
QgsSimpleLineSymbolLayer::penStyle
Qt::PenStyle penStyle() const
Returns the pen style used to render the line (e.g.
Definition: qgslinesymbollayer.h:100
QgsTemplatedLineSymbolLayerBase::setInterval
void setInterval(double interval)
Sets the interval between individual symbols.
Definition: qgslinesymbollayer.h:593
DEFAULT_SIMPLELINE_JOINSTYLE
#define DEFAULT_SIMPLELINE_JOINSTYLE
Definition: qgslinesymbollayer.h:35
QgsSymbolRenderContext
Definition: qgssymbolrendercontext.h:35
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
QgsSimpleLineSymbolLayer::customDashPatternMapUnitScale
const QgsMapUnitScale & customDashPatternMapUnitScale() const
Returns the map unit scale for lengths used in the custom dash pattern.
Definition: qgslinesymbollayer.h:169
QgsAbstractBrushedLineSymbolLayer::penCapStyle
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
Definition: qgslinesymbollayer.h:1167
QgsSymbolLayer::clone
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
QgsSimpleLineSymbolLayer::setPenStyle
void setPenStyle(Qt::PenStyle style)
Sets the pen style used to render the line (e.g.
Definition: qgslinesymbollayer.h:107
QgsTemplatedLineSymbolLayerBase::setOutputUnit
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
Definition: qgslinesymbollayer.cpp:1470
QgsSymbolLayer
Definition: qgssymbollayer.h:54
QgsHashedLineSymbolLayer::hashLengthUnit
QgsUnitTypes::RenderUnit hashLengthUnit() const
Returns the units for the length of hash symbols.
Definition: qgslinesymbollayer.h:1091
QgsLineburstSymbolLayer::mColor2
QColor mColor2
Definition: qgslinesymbollayer.h:1362
QgsSymbolLayer::dxfOffset
virtual double dxfOffset(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets offset.
Definition: qgssymbollayer.cpp:182
QgsLineburstSymbolLayer::setColor2
void setColor2(const QColor &color2)
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColo...
Definition: qgslinesymbollayer.h:1358
QgsTemplatedLineSymbolLayerBase::setOffsetAlongLineUnit
void setOffsetAlongLineUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit used for calculating the offset along line for symbols.
Definition: qgslinesymbollayer.h:725
QgsSymbolLayer::setSubSymbol
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
Definition: qgssymbollayer.cpp:159
QgsHashedLineSymbolLayer::setHashLength
void setHashLength(double length)
Sets the length of hash symbols.
Definition: qgslinesymbollayer.h:1077
QgsSymbolLayer::toSld
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const
Saves the symbol layer as SLD.
Definition: qgssymbollayer.h:415
QgsMarkerSymbol
A marker symbol type, for rendering Point and MultiPoint geometries.
Definition: qgsmarkersymbol.h:30
QgsTemplatedLineSymbolLayerBase::setAverageAngleMapUnitScale
void setAverageAngleMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the length over which the line's direction is averaged when calculating i...
Definition: qgslinesymbollayer.h:791
QgsSimpleLineSymbolLayer
A simple line symbol layer, which renders lines using a line in a variety of styles (e....
Definition: qgslinesymbollayer.h:43
QgsTemplatedLineSymbolLayerBase::intervalMapUnitScale
const QgsMapUnitScale & intervalMapUnitScale() const
Returns the map unit scale for the interval between symbols.
Definition: qgslinesymbollayer.h:624
QgsSimpleLineSymbolLayer::customDashPatternUnit
QgsUnitTypes::RenderUnit customDashPatternUnit() const
Returns the units for lengths used in the custom dash pattern.
Definition: qgslinesymbollayer.h:163
QgsMarkerLineSymbolLayer::setRotateMarker
Q_DECL_DEPRECATED void setRotateMarker(bool rotate)
Shall the marker be rotated.
Definition: qgslinesymbollayer.h:978
QgsLineburstSymbolLayer
Line symbol layer type which draws a gradient pattern perpendicularly along a line.
Definition: qgslinesymbollayer.h:1283
QgsLineSymbolLayer::dxfWidth
double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const override
Gets line width.
Definition: qgssymbollayer.cpp:815
QgsLineSymbolLayer::renderPolygonStroke
virtual void renderPolygonStroke(const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context)
Renders the line symbol layer along the outline of polygon, using the given render context.
Definition: qgssymbollayer.cpp:762
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsTemplatedLineSymbolLayerBase::interval
double interval() const
Returns the interval between individual symbols.
Definition: qgslinesymbollayer.h:585
QgsSimpleLineSymbolLayer::setPenCapStyle
void setPenCapStyle(Qt::PenCapStyle style)
Sets the pen cap style used to render the line (e.g.
Definition: qgslinesymbollayer.h:135
QgsTemplatedLineSymbolLayerBase::offsetAlongLine
double offsetAlongLine() const
Returns the offset along the line for the symbol placement.
Definition: qgslinesymbollayer.h:696
QgsLineSymbol
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition: qgslinesymbol.h:29
QgsTemplatedLineSymbolLayerBase::setSymbolAngle
virtual void setSymbolAngle(double angle)=0
Sets the symbol's angle, in degrees clockwise.
QgsSimpleLineSymbolLayer::trimDistanceEndMapUnitScale
const QgsMapUnitScale & trimDistanceEndMapUnitScale() const
Returns the map unit scale for the trim distance for the end of the line.
Definition: qgslinesymbollayer.h:419
QgsSymbolLayer::properties
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QgsSimpleLineSymbolLayer::setDrawInsidePolygon
void setDrawInsidePolygon(bool drawInsidePolygon)
Sets whether the line should only be drawn inside polygons, and any portion of the line which falls o...
Definition: qgslinesymbollayer.h:453
QgsUnitTypes
Helper functions for various unit types.
Definition: qgsunittypes.h:38
DEFAULT_SIMPLELINE_WIDTH
#define DEFAULT_SIMPLELINE_WIDTH
Definition: qgslinesymbollayer.h:33
QgsTemplatedLineSymbolLayerBase::offsetAlongLineMapUnitScale
const QgsMapUnitScale & offsetAlongLineMapUnitScale() const
Returns the map unit scale used for calculating the offset in map units along line for symbols.
Definition: qgslinesymbollayer.h:731
qgssymbollayer.h
DEFAULT_SIMPLELINE_PENSTYLE
#define DEFAULT_SIMPLELINE_PENSTYLE
Definition: qgslinesymbollayer.h:34
QgsLineburstSymbolLayer::gradientColorType
Qgis::GradientColorSource gradientColorType() const
Returns the gradient color mode, which controls how gradient color stops are created.
Definition: qgslinesymbollayer.h:1320
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition: qgsmapunitscale.h:36
QgsTemplatedLineSymbolLayerBase::averageAngleLength
double averageAngleLength() const
Returns the length of line over which the line's direction is averaged when calculating individual sy...
Definition: qgslinesymbollayer.h:749
QgsSimpleLineSymbolLayer::setTrimDistanceStart
void setTrimDistanceStart(double distance)
Sets the trim distance for the start of the line, which dictates a length from the start of the line ...
Definition: qgslinesymbollayer.h:305
QgsLineburstSymbolLayer::setGradientColorType
void setGradientColorType(Qgis::GradientColorSource gradientColorType)
Sets the gradient color mode, which controls how gradient color stops are created.
Definition: qgslinesymbollayer.h:1327
QgsTemplatedLineSymbolLayerBase
Base class for templated line symbols, e.g. line symbols which draw markers or hash lines at interval...
Definition: qgslinesymbollayer.h:552
QgsSimpleLineSymbolLayer::setDashPatternOffset
void setDashPatternOffset(double offset)
Sets the dash pattern offset, which dictates how far along the dash pattern the pattern should start ...
Definition: qgslinesymbollayer.h:231
QgsSymbolLayer::canCauseArtifactsBetweenAdjacentTiles
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
Definition: qgssymbollayer.cpp:308
QgsTemplatedLineSymbolLayerBase::setOffsetAlongLineMapUnitScale
void setOffsetAlongLineMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for calculating the offset in map units along line for symbols.
Definition: qgslinesymbollayer.h:737
QgsRasterLineSymbolLayer::path
QString path() const
Returns the raster image path.
Definition: qgslinesymbollayer.h:1228
QgsSymbolLayer::usedAttributes
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Definition: qgssymbollayer.cpp:328
QgsTemplatedLineSymbolLayerBase::setAverageAngleLength
void setAverageAngleLength(double length)
Sets the length of line over which the line's direction is averaged when calculating individual symbo...
Definition: qgslinesymbollayer.h:761
QgsSimpleLineSymbolLayer::trimDistanceEndUnit
QgsUnitTypes::RenderUnit trimDistanceEndUnit() const
Returns the unit for the trim distance for the end of the line.
Definition: qgslinesymbollayer.h:407
QgsSimpleLineSymbolLayer::setDashPatternOffsetMapUnitScale
void setDashPatternOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the dash pattern offset.
Definition: qgslinesymbollayer.h:275
QgsHashedLineSymbolLayer::hashLengthMapUnitScale
const QgsMapUnitScale & hashLengthMapUnitScale() const
Returns the map unit scale for the hash length.
Definition: qgslinesymbollayer.h:1107
QgsSimpleLineSymbolLayer::setTrimDistanceEnd
void setTrimDistanceEnd(double distance)
Sets the trim distance for the end of the line, which dictates a length from the end of the line at w...
Definition: qgslinesymbollayer.h:383
QgsTemplatedLineSymbolLayerBase::setRotateSymbols
void setRotateSymbols(bool rotate)
Sets whether the repeating symbols should be rotated to match their line segment orientation.
Definition: qgslinesymbollayer.h:578
QgsTemplatedLineSymbolLayerBase::setSymbolLineAngle
virtual void setSymbolLineAngle(double angle)=0
Sets the line angle modification for the symbol's angle.
QgsTemplatedLineSymbolLayerBase::rotateSymbols
bool rotateSymbols() const
Returns true if the repeating symbols be rotated to match their line segment orientation.
Definition: qgslinesymbollayer.h:572
QgsLineSymbolLayer::setOutputUnit
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
Definition: qgssymbollayer.cpp:721
QgsSymbolLayer::stopRender
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
QgsTemplatedLineSymbolLayerBase::renderPolyline
void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context) override
Renders the line symbol layer along the line joining points, using the given render context.
Definition: qgslinesymbollayer.cpp:1269
QgsSymbolLayer::Property
Property
Data definable properties.
Definition: qgssymbollayer.h:142
QgsSymbolLayer::dxfColor
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
Definition: qgssymbollayer.cpp:189
QgsTemplatedLineSymbolLayerBase::setPlaceOnEveryPart
void setPlaceOnEveryPart(bool respect)
Sets whether the placement applies for every part of multi-part feature geometries.
Definition: qgslinesymbollayer.h:684
Qgis
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:71
QgsSymbolLayer::layerType
virtual QString layerType() const =0
Returns a string that represents this layer type.
QgsSymbolLayer::color
virtual QColor color() const
Returns the "representative" color of the symbol layer.
Definition: qgssymbollayer.cpp:247
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition: qgsfeature.h:55
QgsMarkerLineSymbolLayer::mMarker
std::unique_ptr< QgsMarkerSymbol > mMarker
Definition: qgslinesymbollayer.h:984
QgsLineSymbolLayer::offset
double offset() const
Returns the line's offset.
Definition: qgssymbollayer.h:1112
QgsSimpleLineSymbolLayer::trimDistanceEnd
double trimDistanceEnd() const
Returns the trim distance for the end of the line, which dictates a length from the end of the line a...
Definition: qgslinesymbollayer.h:368
QgsAbstractBrushedLineSymbolLayer::setPenCapStyle
void setPenCapStyle(Qt::PenCapStyle style)
Sets the pen cap style used to render the line (e.g.
Definition: qgslinesymbollayer.h:1174
QgsSymbolLayer::startRender
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
QgsTemplatedLineSymbolLayerBase::intervalUnit
QgsUnitTypes::RenderUnit intervalUnit() const
Returns the units for the interval between symbols.
Definition: qgslinesymbollayer.h:608
QgsSimpleLineSymbolLayer::setCustomDashPatternUnit
void setCustomDashPatternUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for lengths used in the custom dash pattern.
Definition: qgslinesymbollayer.h:157
QgsExpression
Class for parsing and evaluation of expressions (formerly called "search strings")....
Definition: qgsexpression.h:102
QgsAbstractBrushedLineSymbolLayer
Base class for line symbol layer types which draws line sections using a QBrush.
Definition: qgslinesymbollayer.h:1144
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
QgsLineburstSymbolLayer::color2
QColor color2() const
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoC...
Definition: qgslinesymbollayer.h:1351
QgsTemplatedLineSymbolLayerBase::symbolAngle
virtual double symbolAngle() const =0
Returns the symbol's current angle, in degrees clockwise.
QgsSimpleLineSymbolLayer::setTrimDistanceStartUnit
void setTrimDistanceStartUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the trim distance for the start of the line.
Definition: qgslinesymbollayer.h:317
QgsPathResolver
Resolves relative paths into absolute paths and vice versa. Used for writing.
Definition: qgspathresolver.h:31
QgsSimpleLineSymbolLayer::trimDistanceStart
double trimDistanceStart() const
Returns the trim distance for the start of the line, which dictates a length from the start of the li...
Definition: qgslinesymbollayer.h:290
QgsTemplatedLineSymbolLayerBase::setAverageAngleUnit
void setAverageAngleUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the length over which the line's direction is averaged when calculating individual ...
Definition: qgslinesymbollayer.h:771
QgsMarkerLineSymbolLayer::rotateMarker
Q_DECL_DEPRECATED bool rotateMarker() const
Shall the marker be rotated.
Definition: qgslinesymbollayer.h:972
QgsLineSymbolLayer::setMapUnitScale
void setMapUnitScale(const QgsMapUnitScale &scale) override
Definition: qgssymbollayer.cpp:732
QgsRasterLineSymbolLayer::setOpacity
void setOpacity(double opacity)
Set the line opacity.
Definition: qgslinesymbollayer.h:1248
QgsSymbolLayer::setDataDefinedProperty
virtual void setDataDefinedProperty(Property key, const QgsProperty &property)
Sets a data defined property for the layer.
Definition: qgssymbollayer.cpp:126
QgsSimpleLineSymbolLayer::dashPatternOffsetUnit
QgsUnitTypes::RenderUnit dashPatternOffsetUnit() const
Returns the units for the dash pattern offset.
Definition: qgslinesymbollayer.h:253
QgsTemplatedLineSymbolLayerBase::setPlacements
void setPlacements(Qgis::MarkerLinePlacements placements)
Sets the placement of the symbols.
Definition: qgslinesymbollayer.h:652
Qgis::MarkerLinePlacement
MarkerLinePlacement
Defines how/where the symbols should be placed on a line.
Definition: qgis.h:1411
QgsTemplatedLineSymbolLayerBase::averageAngleUnit
QgsUnitTypes::RenderUnit averageAngleUnit() const
Returns the unit for the length over which the line's direction is averaged when calculating individu...
Definition: qgslinesymbollayer.h:781
QgsTemplatedLineSymbolLayerBase::setIntervalUnit
void setIntervalUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the interval between symbols.
Definition: qgslinesymbollayer.h:601
QgsTemplatedLineSymbolLayerBase::properties
QVariantMap properties() const override
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
Definition: qgslinesymbollayer.cpp:1497