QGIS API Documentation 3.43.0-Master (ac9f54ad1f7)
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 Qgis::DEFAULT_LINE_WIDTH
28#define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
29
30#define INF 1E20
31
32#include <QPen>
33#include <QBrush>
34
35class QgsMarkerSymbol;
36class QgsLineSymbol;
37class QgsPathResolver;
38
45{
46 public:
48 Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
49 const QColor &strokeColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
50 Qt::PenStyle strokeStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
51 double strokeWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
52 Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
53 );
54
56
57 // static stuff
58
64 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
65 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
66
67 // implemented from base classes
68
69 QString layerType() const override;
70 Qgis::SymbolLayerFlags flags() const override;
71 void startRender( QgsSymbolRenderContext &context ) override;
72 void stopRender( QgsSymbolRenderContext &context ) override;
73 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
74 QVariantMap properties() const override;
75 QgsSimpleFillSymbolLayer *clone() const override SIP_FACTORY;
76 Q_DECL_DEPRECATED void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override SIP_DEPRECATED;
77 bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const override;
78 QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
79
80 Qt::BrushStyle brushStyle() const { return mBrushStyle; }
81 void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
82
83 QColor strokeColor() const override { return mStrokeColor; }
84 void setStrokeColor( const QColor &strokeColor ) override { mStrokeColor = strokeColor; }
85 QColor fillColor() const override { return color(); }
86 void setFillColor( const QColor &color ) override { setColor( color ); }
87
88 Qt::PenStyle strokeStyle() const { return mStrokeStyle; }
89 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
90
91 double strokeWidth() const { return mStrokeWidth; }
92 void setStrokeWidth( double strokeWidth ) { mStrokeWidth = strokeWidth; }
93
94 Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
95 void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
96
105 void setOffset( QPointF offset ) { mOffset = offset; }
106
115 QPointF offset() const { return mOffset; }
116
122 void setStrokeWidthUnit( Qgis::RenderUnit unit ) { mStrokeWidthUnit = unit; }
123
128 Qgis::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
129
130 void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
131 const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
132
138 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
139
145 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
146
152 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
153
159 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
160
161 void setOutputUnit( Qgis::RenderUnit unit ) override;
162 Qgis::RenderUnit outputUnit() const override;
163 bool usesMapUnits() const override;
164
165 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
166 QgsMapUnitScale mapUnitScale() const override;
167
168 double estimateMaxBleed( const QgsRenderContext &context ) const override;
169
170 double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
171 QColor dxfColor( QgsSymbolRenderContext &context ) const override;
172 double dxfAngle( QgsSymbolRenderContext &context ) const override;
173
174 Qt::PenStyle dxfPenStyle() const override;
175 QColor dxfBrushColor( QgsSymbolRenderContext &context ) const override;
176 Qt::BrushStyle dxfBrushStyle() const override;
177 QImage toTiledPatternImage( ) const override;
178
179 protected:
180 QBrush mBrush;
181 QBrush mSelBrush;
182 Qt::BrushStyle mBrushStyle;
184 Qt::PenStyle mStrokeStyle;
188 Qt::PenJoinStyle mPenJoinStyle;
189 QPen mPen;
191
192 QPointF mOffset;
195
196 private:
197 //helper functions for data defined symbology
198 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
199
200};
201
202class QgsColorRamp;
203
210{
211 public:
212
217 const QColor &color2 = Qt::white,
222 );
223
225
226 // static stuff
227
233 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
234
235 // implemented from base classes
236
237 Qgis::SymbolLayerFlags flags() const override;
238 QString layerType() const override;
239 void startRender( QgsSymbolRenderContext &context ) override;
240 void stopRender( QgsSymbolRenderContext &context ) override;
241 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
242 QVariantMap properties() const override;
244 double estimateMaxBleed( const QgsRenderContext &context ) const override;
245 bool canCauseArtifactsBetweenAdjacentTiles() const override;
246
252 Qgis::GradientType gradientType() const { return mGradientType; }
253
259 void setGradientType( Qgis::GradientType gradientType ) { mGradientType = gradientType; }
260
266 Qgis::GradientColorSource gradientColorType() const { return mGradientColorType; }
267
273 void setGradientColorType( Qgis::GradientColorSource gradientColorType ) { mGradientColorType = gradientColorType; }
274
281 QgsColorRamp *colorRamp() { return mGradientRamp.get(); }
282
290 void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
291
297 QColor color2() const { return mColor2; }
298
304 void setColor2( const QColor &color2 ) { mColor2 = color2; }
305
311 Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
312
318 void setCoordinateMode( Qgis::SymbolCoordinateReference coordinateMode ) { mCoordinateMode = coordinateMode; }
319
325 Qgis::GradientSpread gradientSpread() const { return mGradientSpread; }
326
332 void setGradientSpread( Qgis::GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
333
339 void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
340
346 QPointF referencePoint1() const { return mReferencePoint1; }
347
353 void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
354
360 bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
361
367 void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
368
374 QPointF referencePoint2() const { return mReferencePoint2; }
375
381 void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
382
383
389 bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
390
399 void setOffset( QPointF offset ) { mOffset = offset; }
400
409 QPointF offset() const { return mOffset; }
410
416 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
417
423 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
424
430 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
431
437 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
438
439 void setOutputUnit( Qgis::RenderUnit unit ) override;
440 Qgis::RenderUnit outputUnit() const override;
441 bool usesMapUnits() const override;
442
443 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
444 QgsMapUnitScale mapUnitScale() const override;
445
446 protected:
447 QBrush mBrush;
448 QBrush mSelBrush;
449
451 QColor mColor2;
452 std::unique_ptr<QgsColorRamp> mGradientRamp;
456
458 bool mReferencePoint1IsCentroid = false;
460 bool mReferencePoint2IsCentroid = false;
461
462 QPointF mOffset;
465
466 private:
467
468 //helper functions for data defined symbology
469 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, const QPolygonF &points );
470
472 void applyGradient( const QgsSymbolRenderContext &context, QBrush &brush, const QColor &color, const QColor &color2,
473 Qgis::GradientColorSource gradientColorType, QgsColorRamp *gradientRamp, Qgis::GradientType gradientType,
474 Qgis::SymbolCoordinateReference coordinateMode, Qgis::GradientSpread gradientSpread,
475 QPointF referencePoint1, QPointF referencePoint2, double angle );
476
478 QPointF rotateReferencePoint( QPointF refPoint, double angle );
479};
480
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 Qgis::SymbolLayerFlags flags() const override;
524 void startRender( QgsSymbolRenderContext &context ) override;
525 void stopRender( QgsSymbolRenderContext &context ) override;
526 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
527 QVariantMap properties() const override;
528 QgsShapeburstFillSymbolLayer *clone() const override SIP_FACTORY;
529 double estimateMaxBleed( const QgsRenderContext &context ) const override;
530 bool canCauseArtifactsBetweenAdjacentTiles() const override;
531
537 void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
538
544 int blurRadius() const { return mBlurRadius; }
545
553 void setUseWholeShape( bool useWholeShape ) { mUseWholeShape = useWholeShape; }
554
561 bool useWholeShape() const { return mUseWholeShape; }
562
570 void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
571
579 double maxDistance() const { return mMaxDistance; }
580
587 void setDistanceUnit( Qgis::RenderUnit unit ) { mDistanceUnit = unit; }
588
595 Qgis::RenderUnit distanceUnit() const { return mDistanceUnit; }
596
597 void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
598 const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
599
609 void setColorType( Qgis::GradientColorSource colorType ) { mColorType = colorType; }
610
620 Qgis::GradientColorSource colorType() const { return mColorType; }
621
630 void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
631
638 QgsColorRamp *colorRamp() { return mGradientRamp.get(); }
639
646 void setColor2( const QColor &color2 ) { mColor2 = color2; }
647
654 QColor color2() const { return mColor2; }
655
662 void setIgnoreRings( bool ignoreRings ) { mIgnoreRings = ignoreRings; }
663
669 bool ignoreRings() const { return mIgnoreRings; }
670
677 void setOffset( QPointF offset ) { mOffset = offset; }
678
685 QPointF offset() const { return mOffset; }
686
693 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
694
701 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
702
703 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
704 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
705
706 void setOutputUnit( Qgis::RenderUnit unit ) override;
707 Qgis::RenderUnit outputUnit() const override;
708 bool usesMapUnits() const override;
709
710 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
711 QgsMapUnitScale mapUnitScale() const override;
712
713 private:
714 QBrush mBrush;
715 QBrush mSelBrush;
716
717 int mBlurRadius = 0;
718
719 bool mUseWholeShape = true;
720 double mMaxDistance = 5.0;
722 QgsMapUnitScale mDistanceMapUnitScale;
723
725 QColor mColor2;
726
727 bool mIgnoreRings = false;
728
729 QPointF mOffset;
731 QgsMapUnitScale mOffsetMapUnitScale;
732
733 std::unique_ptr< QgsColorRamp > mGradientRamp;
734
735 //helper functions for data defined symbology
736 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QColor &color, QColor &color2, int &blurRadius, bool &useWholeShape,
737 double &maxDistance, bool &ignoreRings );
738
739 /* distance transform of a 1d function using squared distance */
740 void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
741 /* distance transform of 2d function using squared distance */
742 void distanceTransform2d( double *im, int width, int height, QgsRenderContext &context );
743 /* distance transform of a binary QImage */
744 double *distanceTransform( QImage *im, QgsRenderContext &context );
745
746 /* fills a QImage with values from an array of doubles containing squared distance transform values */
747 void dtArrayToQImage( double *array, QImage *im, QgsColorRamp *ramp, QgsRenderContext &context, bool useWholeShape = true, int maxPixelDistance = 0 );
748
749#ifdef SIP_RUN
751#endif
752};
753
759{
760 public:
761
764
765 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
766
772 void setStrokeWidthUnit( Qgis::RenderUnit unit ) { mStrokeWidthUnit = unit; }
773
779 Qgis::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
780
787 void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
788
796 const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
797
805 void setCoordinateReference( Qgis::SymbolCoordinateReference coordinateReference ) { mCoordinateReference = coordinateReference; }
806
814 Qgis::SymbolCoordinateReference coordinateReference() const { return mCoordinateReference; }
815
816 void setOutputUnit( Qgis::RenderUnit unit ) override;
817 Qgis::RenderUnit outputUnit() const override;
818 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
819 QgsMapUnitScale mapUnitScale() const override;
820 double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
821 Qt::PenStyle dxfPenStyle() const override;
822 QVariantMap properties() const override;
823
824 protected:
825 QBrush mBrush;
827 double mNextAngle = 0.0; // mAngle / data defined angle
828
830 double mStrokeWidth = 0.0;
833
837 virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context ) { Q_UNUSED( context ) }
838
844 virtual bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const;
845
846 private:
847#ifdef SIP_RUN
849#endif
850};
851
858{
859 public:
860
865 QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
866
868
873 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
874
880 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
881
886 static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
887
888 // implemented from base classes
889 QString layerType() const override;
890 Qgis::SymbolLayerFlags flags() const override;
891 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
892 void startRender( QgsSymbolRenderContext &context ) override;
893 void stopRender( QgsSymbolRenderContext &context ) override;
894 QVariantMap properties() const override;
895 QgsRasterFillSymbolLayer *clone() const override SIP_FACTORY;
896 double estimateMaxBleed( const QgsRenderContext &context ) const override;
897 bool usesMapUnits() const override;
898 QColor color() const override;
899 void setOutputUnit( Qgis::RenderUnit unit ) override;
900
901 //override QgsImageFillSymbolLayer's support for sub symbols
902 QgsSymbol *subSymbol() override { return nullptr; }
903 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
904
910 void setImageFilePath( const QString &imagePath );
911
917 QString imageFilePath() const { return mImageFilePath; }
918
925 void setCoordinateMode( Qgis::SymbolCoordinateReference mode );
926
933 Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
934
940 void setOpacity( double opacity );
941
947 double opacity() const { return mOpacity; }
948
956 void setOffset( QPointF offset ) { mOffset = offset; }
957
965 QPointF offset() const { return mOffset; }
966
974 void setOffsetUnit( const Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
975
983 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
984
992 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
993
1001 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1002
1014 void setWidth( double width ) { mWidth = width; }
1015
1026 double width() const { return mWidth; }
1027
1039 void setHeight( double height ) { mHeight = height; }
1040
1051 double height() const { return mHeight; }
1052
1062 Q_DECL_DEPRECATED void setWidthUnit( Qgis::RenderUnit unit ) SIP_DEPRECATED { mSizeUnit = unit; }
1063
1073 void setSizeUnit( Qgis::RenderUnit unit ) { mSizeUnit = unit; }
1074
1084 Q_DECL_DEPRECATED Qgis::RenderUnit widthUnit() const SIP_DEPRECATED { return mSizeUnit; }
1085
1096 Qgis::RenderUnit sizeUnit() const { return mSizeUnit; }
1097
1107 Q_DECL_DEPRECATED void setWidthMapUnitScale( const QgsMapUnitScale &scale ) SIP_DEPRECATED { mSizeMapUnitScale = scale; }
1108
1119 void setSizeMapUnitScale( const QgsMapUnitScale &scale ) { mSizeMapUnitScale = scale; }
1120
1130 Q_DECL_DEPRECATED const QgsMapUnitScale &widthMapUnitScale() const SIP_DEPRECATED { return mSizeMapUnitScale; }
1131
1142 const QgsMapUnitScale &sizeMapUnitScale() const { return mSizeMapUnitScale; }
1143
1144 protected:
1145
1146 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1147 bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const override;
1148 private:
1149
1151 QString mImageFilePath;
1153 double mOpacity = 1.0;
1154
1155 QPointF mOffset;
1157 QgsMapUnitScale mOffsetMapUnitScale;
1158
1159 double mWidth = 0.0;
1161 QgsMapUnitScale mSizeMapUnitScale;
1162
1163 double mHeight = 0.0;
1164
1166 void applyPattern( QBrush &brush, const QString &imageFilePath, double width, double height, double opacity,
1167 const QgsSymbolRenderContext &context );
1168};
1169
1175{
1176 public:
1177
1181 QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
1182
1186 QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
1187
1189
1194 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1195
1200 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1201
1206 static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
1207
1208 // implemented from base classes
1209
1210 QString layerType() const override;
1211 void startRender( QgsSymbolRenderContext &context ) override;
1212 void stopRender( QgsSymbolRenderContext &context ) override;
1213 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1214 QVariantMap properties() const override;
1215 QgsSVGFillSymbolLayer *clone() const override SIP_FACTORY;
1216 Q_DECL_DEPRECATED void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override SIP_DEPRECATED;
1217 bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const override;
1218 bool usesMapUnits() const override;
1219 QgsSymbol *subSymbol() override;
1220 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1221 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1222 QColor dxfColor( QgsSymbolRenderContext &context ) const override;
1223 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1224 bool hasDataDefinedProperties() const override;
1225
1237 void setSvgFilePath( const QString &svgPath );
1238
1244 QString svgFilePath() const { return mSvgFilePath; }
1245
1255 void setPatternWidth( double width ) { mPatternWidth = width;}
1256
1266 double patternWidth() const { return mPatternWidth; }
1267
1277 void setSvgFillColor( const QColor &c ) { setColor( c ); }
1278
1287 QColor svgFillColor() const { return color(); }
1288
1298 void setSvgStrokeColor( const QColor &c ) { mSvgStrokeColor = c; }
1299
1308 QColor svgStrokeColor() const { return mSvgStrokeColor; }
1309
1320 void setSvgStrokeWidth( double w ) { mSvgStrokeWidth = w; }
1321
1332 double svgStrokeWidth() const { return mSvgStrokeWidth; }
1333
1341 void setPatternWidthUnit( Qgis::RenderUnit unit ) { mPatternWidthUnit = unit; }
1342
1350 Qgis::RenderUnit patternWidthUnit() const { return mPatternWidthUnit; }
1351
1359 void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale ) { mPatternWidthMapUnitScale = scale; }
1360
1368 const QgsMapUnitScale &patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
1369
1377 void setSvgStrokeWidthUnit( Qgis::RenderUnit unit ) { mSvgStrokeWidthUnit = unit; }
1378
1386 Qgis::RenderUnit svgStrokeWidthUnit() const { return mSvgStrokeWidthUnit; }
1387
1395 void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mSvgStrokeWidthMapUnitScale = scale; }
1396
1404 const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const { return mSvgStrokeWidthMapUnitScale; }
1405
1406 void setOutputUnit( Qgis::RenderUnit unit ) override;
1407 Qgis::RenderUnit outputUnit() const override;
1408
1409 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1410 QgsMapUnitScale mapUnitScale() const override;
1411
1416 QMap<QString, QgsProperty> parameters() const { return mParameters; }
1417
1422 void setParameters( const QMap<QString, QgsProperty> &parameters );
1423
1424 protected:
1425
1426 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1427
1428 private:
1429
1431 double mPatternWidth = 20;
1433 QgsMapUnitScale mPatternWidthMapUnitScale;
1434 QMap<QString, QgsProperty> mParameters;
1435
1437 QByteArray mSvgData;
1439 QString mSvgFilePath;
1441 QRectF mSvgViewBox;
1442
1443 //param(fill), param(stroke), param(stroke-width) are going
1444 //to be replaced in memory
1445 QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1446 double mSvgStrokeWidth = 0.2;
1447 Qgis::RenderUnit mSvgStrokeWidthUnit = Qgis::RenderUnit::Millimeters;
1448 QgsMapUnitScale mSvgStrokeWidthMapUnitScale;
1449
1451 std::unique_ptr< QgsLineSymbol > mStroke;
1452
1454 void storeViewBox();
1455 void setDefaultSvgParams(); //fills mSvgFillColor, mSvgStrokeColor, mSvgStrokeWidth with default values for mSvgFilePath
1456
1458 void applyPattern( QBrush &brush, const QString &svgFilePath, double patternWidth, Qgis::RenderUnit patternWidthUnit, const QColor &svgFillColor, const QColor &svgStrokeColor,
1459 double svgStrokeWidth, Qgis::RenderUnit svgStrokeWidthUnit, const QgsSymbolRenderContext &context, const QgsMapUnitScale &patternWidthMapUnitScale, const QgsMapUnitScale &svgStrokeWidthMapUnitScale,
1460 const QgsStringMap svgParameters );
1461};
1462
1469{
1470 public:
1473
1478 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1479
1484 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1485
1486 QString layerType() const override;
1487 void startRender( QgsSymbolRenderContext &context ) override;
1488 void stopRender( QgsSymbolRenderContext &context ) override;
1489 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1490 QVariantMap properties() const override;
1491 QgsLinePatternFillSymbolLayer *clone() const override SIP_FACTORY;
1492 Q_DECL_DEPRECATED void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override SIP_DEPRECATED;
1493 bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const override;
1494 QImage toTiledPatternImage( ) const override;
1495 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1496
1497 QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
1498
1506 void setLineAngle( double a ) { mLineAngle = a; }
1507
1515 double lineAngle() const { return mLineAngle; }
1516
1523 void setDistance( double d ) { mDistance = d; }
1524
1530 double distance() const { return mDistance; }
1531
1538 void setLineWidth( double w );
1539
1546 double lineWidth() const { return mLineWidth; }
1547
1548 void setColor( const QColor &c ) override;
1549 QColor color() const override;
1550
1562 void setOffset( double offset ) { mOffset = offset; }
1563
1575 double offset() const { return mOffset; }
1576
1583 void setDistanceUnit( Qgis::RenderUnit unit ) { mDistanceUnit = unit; }
1584
1591 Qgis::RenderUnit distanceUnit() const { return mDistanceUnit; }
1592
1600 void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
1601
1609 const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
1610
1616 void setLineWidthUnit( Qgis::RenderUnit unit ) { mLineWidthUnit = unit; }
1617
1623 Qgis::RenderUnit lineWidthUnit() const { return mLineWidthUnit; }
1624
1632 void setLineWidthMapUnitScale( const QgsMapUnitScale &scale ) { mLineWidthMapUnitScale = scale; }
1633
1641 const QgsMapUnitScale &lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
1642
1648 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
1649
1655 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
1656
1664 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
1665
1673 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1674
1681 Qgis::LineClipMode clipMode() const { return mClipMode; }
1682
1689 void setClipMode( Qgis::LineClipMode mode ) { mClipMode = mode; }
1690
1691 void setOutputUnit( Qgis::RenderUnit unit ) override;
1692 Qgis::RenderUnit outputUnit() const override;
1693 bool usesMapUnits() const override;
1694 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1695 QgsMapUnitScale mapUnitScale() const override;
1696 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1697 QgsSymbol *subSymbol() override;
1698 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1699 bool hasDataDefinedProperties() const override;
1700 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1701 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1702
1703 protected:
1704
1705 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1706
1707 private:
1709 double mDistance = 5.0;
1711 QgsMapUnitScale mDistanceMapUnitScale;
1713 double mLineWidth = 0;
1715 QgsMapUnitScale mLineWidthMapUnitScale;
1717 double mLineAngle = 45.0;
1719 double mOffset = 0.0;
1721 QgsMapUnitScale mOffsetMapUnitScale;
1722
1723 bool mRenderUsingLines = false;
1724
1725#ifdef SIP_RUN
1727#endif
1728
1730 bool applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double lineAngle, double distance );
1731
1733 std::unique_ptr< QgsLineSymbol > mFillLineSymbol;
1734 bool mFillLineSymbolRenderStarted = false;
1735
1737};
1738
1745{
1746 public:
1749
1755 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1756 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1757
1758 QString layerType() const override;
1759 void startRender( QgsSymbolRenderContext &context ) override;
1760 void stopRender( QgsSymbolRenderContext &context ) override;
1761 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1762 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1763 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1764 QVariantMap properties() const override;
1765 QgsPointPatternFillSymbolLayer *clone() const override SIP_FACTORY;
1766 Q_DECL_DEPRECATED void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override SIP_DEPRECATED;
1767 bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const override;
1768 QImage toTiledPatternImage( ) const override;
1769 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1770 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1771 QgsSymbol *subSymbol() override;
1772 void setOutputUnit( Qgis::RenderUnit unit ) override;
1773 Qgis::RenderUnit outputUnit() const override;
1774 bool usesMapUnits() const override;
1775 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1776 QgsMapUnitScale mapUnitScale() const override;
1777 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1778 bool hasDataDefinedProperties() const override;
1779 void setColor( const QColor &c ) override;
1780 QColor color() const override;
1781
1791 double distanceX() const { return mDistanceX; }
1792
1802 void setDistanceX( double d ) { mDistanceX = d; }
1803
1810 void setDistanceXUnit( Qgis::RenderUnit unit ) { mDistanceXUnit = unit; }
1811
1817 Qgis::RenderUnit distanceXUnit() const { return mDistanceXUnit; }
1818
1825 void setDistanceXMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceXMapUnitScale = scale; }
1826
1833 const QgsMapUnitScale &distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
1834
1844 double distanceY() const { return mDistanceY; }
1845
1855 void setDistanceY( double d ) { mDistanceY = d; }
1856
1863 void setDistanceYUnit( Qgis::RenderUnit unit ) { mDistanceYUnit = unit; }
1864
1870 Qgis::RenderUnit distanceYUnit() const { return mDistanceYUnit; }
1871
1878 void setDistanceYMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceYMapUnitScale = scale; }
1879
1886 const QgsMapUnitScale &distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
1887
1897 double displacementX() const { return mDisplacementX; }
1898
1908 void setDisplacementX( double d ) { mDisplacementX = d; }
1909
1916 void setDisplacementXUnit( Qgis::RenderUnit unit ) { mDisplacementXUnit = unit; }
1917
1923 Qgis::RenderUnit displacementXUnit() const { return mDisplacementXUnit; }
1924
1931 void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementXMapUnitScale = scale; }
1932
1939 const QgsMapUnitScale &displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
1940
1950 double displacementY() const { return mDisplacementY; }
1951
1961 void setDisplacementY( double d ) { mDisplacementY = d; }
1962
1969 void setDisplacementYUnit( Qgis::RenderUnit unit ) { mDisplacementYUnit = unit; }
1970
1976 Qgis::RenderUnit displacementYUnit() const { return mDisplacementYUnit; }
1977
1984 void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementYMapUnitScale = scale; }
1985
1992 const QgsMapUnitScale &displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
1993
2001 void setOffsetX( double offset ) { mOffsetX = offset; }
2002
2009 double offsetX() const { return mOffsetX; }
2010
2018 void setOffsetY( double offset ) { mOffsetY = offset; }
2019
2026 double offsetY() const { return mOffsetY; }
2027
2035 void setOffsetXUnit( Qgis::RenderUnit unit ) { mOffsetXUnit = unit; }
2036
2043 Qgis::RenderUnit offsetXUnit() const { return mOffsetXUnit; }
2044
2052 void setOffsetXMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetXMapUnitScale = scale; }
2053
2060 const QgsMapUnitScale &offsetXMapUnitScale() const { return mOffsetXMapUnitScale; }
2061
2069 void setOffsetYUnit( Qgis::RenderUnit unit ) { mOffsetYUnit = unit; }
2070
2077 Qgis::RenderUnit offsetYUnit() const { return mOffsetYUnit; }
2078
2086 void setOffsetYMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetYMapUnitScale = scale; }
2087
2094 const QgsMapUnitScale &offsetYMapUnitScale() const { return mOffsetYMapUnitScale; }
2095
2102 Qgis::MarkerClipMode clipMode() const { return mClipMode; }
2103
2110 void setClipMode( Qgis::MarkerClipMode mode ) { mClipMode = mode; }
2111
2121 void setMaximumRandomDeviationX( double deviation ) { mRandomDeviationX = deviation; }
2122
2132 double maximumRandomDeviationX() const { return mRandomDeviationX; }
2133
2143 void setMaximumRandomDeviationY( double deviation ) { mRandomDeviationY = deviation; }
2144
2154 double maximumRandomDeviationY() const { return mRandomDeviationY; }
2155
2163 void setRandomDeviationXUnit( Qgis::RenderUnit unit ) { mRandomDeviationXUnit = unit; }
2164
2172 Qgis::RenderUnit randomDeviationXUnit() const { return mRandomDeviationXUnit; }
2173
2181 void setRandomDeviationYUnit( Qgis::RenderUnit unit ) { mRandomDeviationYUnit = unit; }
2182
2191 Qgis::RenderUnit randomDeviationYUnit() const { return mRandomDeviationYUnit; }
2192
2200 const QgsMapUnitScale &randomDeviationXMapUnitScale() const { return mRandomDeviationXMapUnitScale; }
2201
2209 const QgsMapUnitScale &randomDeviationYMapUnitScale() const { return mRandomDeviationYMapUnitScale; }
2210
2218 void setRandomDeviationXMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationXMapUnitScale = scale; }
2219
2227 void setRandomDeviationYMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationYMapUnitScale = scale; }
2228
2235 unsigned long seed() const { return mSeed; }
2236
2245 void setSeed( unsigned long seed ) { mSeed = seed; }
2246
2247 protected:
2248 std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol;
2249 bool mMarkerSymbolRenderStarted = false;
2250 double mDistanceX = 15;
2253 double mDistanceY = 15;
2256 double mDisplacementX = 0;
2259 double mDisplacementY = 0;
2262 double mOffsetX = 0;
2265 double mOffsetY = 0;
2268
2269 double mRandomDeviationX = 0;
2272 double mRandomDeviationY = 0;
2275 unsigned long mSeed = 0;
2276
2277 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
2278
2279 private:
2280#ifdef SIP_RUN
2282#endif
2283
2284 bool applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double distanceX, double distanceY,
2285 double displacementX, double displacementY, double offsetX, double offsetY );
2286
2288
2289 bool mRenderUsingMarkers = false;
2290};
2291
2301{
2302 public:
2303
2310 QgsRandomMarkerFillSymbolLayer( int pointCount = 10, Qgis::PointCountMethod method = Qgis::PointCountMethod::Absolute, double densityArea = 250.0, unsigned long seed = 0 );
2311
2313
2319 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2320
2321 QString layerType() const override;
2322 void startRender( QgsSymbolRenderContext &context ) override;
2323 void stopRender( QgsSymbolRenderContext &context ) override;
2324 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2325 QVariantMap properties() const override;
2326 QgsRandomMarkerFillSymbolLayer *clone() const override SIP_FACTORY;
2327 bool canCauseArtifactsBetweenAdjacentTiles() const override;
2328
2329 void setColor( const QColor &color ) override;
2330 QColor color() const override;
2331
2332 QgsSymbol *subSymbol() override;
2333 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL;
2334
2335 void setOutputUnit( Qgis::RenderUnit unit ) override;
2336 Qgis::RenderUnit outputUnit() const override;
2337 bool usesMapUnits() const override;
2338
2339 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2340 QgsMapUnitScale mapUnitScale() const override;
2341
2342 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2343 bool hasDataDefinedProperties() const override;
2344
2350 int pointCount() const;
2351
2357 void setPointCount( int count );
2358
2364 unsigned long seed() const;
2365
2373 void setSeed( unsigned long seed );
2374
2380 bool clipPoints() const;
2381
2387 void setClipPoints( bool clipped );
2388
2394 Qgis::PointCountMethod countMethod() const;
2395
2401 void setCountMethod( Qgis::PointCountMethod method );
2402
2412 double densityArea() const;
2413
2419 void setDensityArea( double area );
2420
2426 void setDensityAreaUnit( Qgis::RenderUnit unit ) { mDensityAreaUnit = unit; }
2427
2432 Qgis::RenderUnit densityAreaUnit() const { return mDensityAreaUnit; }
2433
2441 void setDensityAreaUnitScale( const QgsMapUnitScale &scale ) { mDensityAreaUnitScale = scale; }
2442
2449 const QgsMapUnitScale &densityAreaUnitScale() const { return mDensityAreaUnitScale; }
2450
2451 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2452 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2453
2454 private:
2455#ifdef SIP_RUN
2457#endif
2458
2459 struct Part
2460 {
2461 QPolygonF exterior;
2462 QVector<QPolygonF> rings;
2463 };
2464
2465 QVector< Part > mCurrentParts;
2466
2467 void render( QgsRenderContext &context, const QVector< Part > &parts, const QgsFeature &feature, bool selected );
2468
2469 std::unique_ptr< QgsMarkerSymbol > mMarker;
2471 int mPointCount = 10;
2472 double mDensityArea = 250.0;
2474 QgsMapUnitScale mDensityAreaUnitScale;
2475 unsigned long mSeed = 0;
2476 bool mClipPoints = false;
2477
2478 bool mRenderingFeature = false;
2479 double mFeatureSymbolOpacity = 1;
2480};
2481
2482
2490{
2491 public:
2494
2495 // static stuff
2496
2502 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2503 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
2504
2505 // implemented from base classes
2506
2507 QString layerType() const override;
2508 void startRender( QgsSymbolRenderContext &context ) override;
2509 void stopRender( QgsSymbolRenderContext &context ) override;
2510 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2511 QVariantMap properties() const override;
2512 QgsCentroidFillSymbolLayer *clone() const override SIP_FACTORY;
2513 Q_DECL_DEPRECATED void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override SIP_DEPRECATED;
2514 bool toSld( QDomDocument &doc, QDomElement &element, QgsSldExportContext &context ) const override;
2515 void setColor( const QColor &color ) override;
2516 QColor color() const override;
2517 QgsSymbol *subSymbol() override;
2518 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL;
2519 void setOutputUnit( Qgis::RenderUnit unit ) override;
2520 Qgis::RenderUnit outputUnit() const override;
2521 bool usesMapUnits() const override;
2522 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2523 QgsMapUnitScale mapUnitScale() const override;
2524 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2525 bool hasDataDefinedProperties() const override;
2526 bool canCauseArtifactsBetweenAdjacentTiles() const override;
2527
2528 void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
2529 bool pointOnSurface() const { return mPointOnSurface; }
2530
2535 void setPointOnAllParts( bool pointOnAllParts ) { mPointOnAllParts = pointOnAllParts; }
2536
2541 bool pointOnAllParts() const { return mPointOnAllParts; }
2542
2549 bool clipPoints() const { return mClipPoints; }
2550
2557 void setClipPoints( bool clipPoints ) { mClipPoints = clipPoints; }
2558
2565 bool clipOnCurrentPartOnly() const { return mClipOnCurrentPartOnly; }
2566
2573 void setClipOnCurrentPartOnly( bool clipOnCurrentPartOnly ) { mClipOnCurrentPartOnly = clipOnCurrentPartOnly; }
2574
2575 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2576 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2577
2578 protected:
2579
2580 std::unique_ptr< QgsMarkerSymbol > mMarker;
2581 bool mPointOnSurface = false;
2582 bool mPointOnAllParts = true;
2583 bool mClipPoints = false;
2584 bool mClipOnCurrentPartOnly = false;
2585
2586 bool mRenderingFeature = false;
2587 double mFeatureSymbolOpacity = 1;
2588 bool mUseSelectedColor = false;
2589
2590 private:
2591#ifdef SIP_RUN
2593#endif
2594 struct Part
2595 {
2596 QPolygonF exterior;
2597 QVector<QPolygonF> rings;
2598 };
2599
2600 void render( QgsRenderContext &context, const QVector<Part> &parts, const QgsFeature &feature, bool selected );
2601 QVector<Part> mCurrentParts;
2602};
2603
2604#endif
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:54
MarkerClipMode
Marker clipping modes.
Definition qgis.h:3143
@ Shape
Clip to polygon shape.
LineClipMode
Line clipping modes.
Definition qgis.h:3157
@ ClipPainterOnly
Applying clipping on the painter only (i.e. line endpoints will coincide with polygon bounding box,...
GradientColorSource
Gradient color sources.
Definition qgis.h:3072
@ 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:3116
@ 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:3131
@ Absolute
The point count is used as an absolute count of markers.
QFlags< SymbolLayerFlag > SymbolLayerFlags
Symbol layer flags.
Definition qgis.h:851
RenderUnit
Rendering size units.
Definition qgis.h:5029
@ Millimeters
Millimeters.
GradientType
Gradient types.
Definition qgis.h:3086
@ Linear
Linear gradient.
SymbolCoordinateReference
Symbol coordinate reference modes.
Definition qgis.h:3101
@ Feature
Relative to feature/shape being rendered.
A fill symbol layer which renders a marker symbol at the centroid of a polygon geometry.
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.
Exports QGIS layers to the DXF format.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Abstract base class for fill symbol layers.
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,...
virtual QImage toTiledPatternImage() const
Renders the symbol layer as an image that can be used as a seamless pattern fill for polygons,...
A fill symbol layer which draws a smooth color gradient over a polygon.
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::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
Qgis::SymbolCoordinateReference coordinateMode() const
Returns the coordinate mode for gradient, which controls how the gradient stops are positioned.
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 setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the fill's offset.
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.
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...
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
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.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns 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
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].
std::unique_ptr< QgsColorRamp > mGradientRamp
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 fill symbol layers which fill polygons with a repeated image.
QgsMapUnitScale mStrokeWidthMapUnitScale
void setStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the units for the symbol's stroke width.
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 ...
Qgis::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.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
~QgsImageFillSymbolLayer() override
A symbol fill consisting of repeated parallel lines.
Qgis::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
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.
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.
Qgis::RenderUnit lineWidthUnit() const
Returns the units for the line's width.
void setLineWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the line's width.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
const QgsMapUnitScale & lineWidthMapUnitScale() const
Returns the map unit scale for the pattern's line width.
void setClipMode(Qgis::LineClipMode mode)
Sets the line clipping mode, which defines how lines are clipped at the edges of shapes.
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the line pattern's offset.
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
void setDistanceUnit(Qgis::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
double distance() const
Returns 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...
Qgis::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
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.
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.
const QgsMapUnitScale & distanceYMapUnitScale() const
Returns the map unit scale for the vertical distance between points in the pattern.
void setDisplacementX(double d)
Sets the horizontal displacement for odd numbered rows in the pattern.
void setOffsetXUnit(Qgis::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
Qgis::RenderUnit offsetYUnit() const
Returns the units for the vertical 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 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.
void setDistanceYUnit(Qgis::RenderUnit unit)
Sets the unit for the vertical distance between points in the pattern.
Qgis::RenderUnit randomDeviationYUnit() const
Returns the units for the vertical random deviation of points in the pattern.
double displacementY() const
Returns the vertical displacement for odd numbered columns in the pattern.
void setDisplacementYUnit(Qgis::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setRandomDeviationYUnit(Qgis::RenderUnit unit)
Sets the unit for the vertical random deviation of points in the pattern.
const QgsMapUnitScale & distanceXMapUnitScale() const
Returns the map unit scale for the horizontal distance between points in the pattern.
void setRandomDeviationYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical random deviation of points 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.
void setRandomDeviationXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal random deviation of points in the pattern.
Qgis::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between 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.
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.
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
const QgsMapUnitScale & displacementXMapUnitScale() const
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the horizontal distance between points in the pattern.
Qgis::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
const QgsMapUnitScale & displacementYMapUnitScale() const
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
void setDistanceXUnit(Qgis::RenderUnit unit)
Sets the unit for the horizontal distance between points in the pattern.
void setOffsetYUnit(Qgis::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
const QgsMapUnitScale & randomDeviationYMapUnitScale() const
Returns the unit scale for the vertical random deviation of points in the pattern.
Qgis::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows 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.
Qgis::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
Qgis::RenderUnit randomDeviationXUnit() const
Returns the units for the horizontal random deviation of points in the pattern.
void setDisplacementXUnit(Qgis::RenderUnit unit)
Sets the units for the horizontal 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.
void setRandomDeviationXUnit(Qgis::RenderUnit unit)
Sets the unit for the horizontal random deviation of points in the pattern.
double maximumRandomDeviationX() const
Returns the maximum horizontal random deviation of points in the pattern.
std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol
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.
Qgis::RenderUnit displacementYUnit() const
Returns the units for the vertical 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.
~QgsPointPatternFillSymbolLayer() override
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.
A fill symbol layer which places markers at random locations within polygons.
~QgsRandomMarkerFillSymbolLayer() override
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
Qgis::RenderUnit densityAreaUnit() const
Returns the units for the density area.
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
A fill symbol layer which fills polygons with a repeated raster image.
const QgsMapUnitScale & sizeMapUnitScale() const
Returns the map unit scale for the image's width and height.
double width() const
Returns the width used for scaling the image used in the fill.
Q_DECL_DEPRECATED void setWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the image's width.
void setOffsetUnit(const Qgis::RenderUnit unit)
Sets the units for the fill's offset.
void setHeight(double height)
Sets the height for scaling the image.
Q_DECL_DEPRECATED const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
Qgis::SymbolCoordinateReference coordinateMode() const
Coordinate mode for fill.
Qgis::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
double opacity() const
Returns the opacity for the raster image used in the fill.
void setSizeUnit(Qgis::RenderUnit unit)
Sets the unit for the image's width and height.
~QgsRasterFillSymbolLayer() override
Q_DECL_DEPRECATED Qgis::RenderUnit widthUnit() const
Returns the units for the image's width.
Qgis::RenderUnit sizeUnit() const
Returns the units for the image's width and height.
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.
Q_DECL_DEPRECATED void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
double height() const
Returns the height used for scaling the image used in the fill.
void setWidth(double width)
Sets the width for scaling the image used in the fill.
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width and height.
QPointF offset() const
Returns the offset for the fill.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setOffset(QPointF offset)
Sets the offset for the fill.
Contains information about the context of a rendering operation.
A fill symbol layer which fills polygons with a repeated SVG file.
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
void setSvgStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the stroke width.
Qgis::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
QMap< QString, QgsProperty > parameters() const
Returns the dynamic SVG parameters.
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
void setPatternWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
Qgis::RenderUnit svgStrokeWidthUnit() const
Returns the units 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
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
A fill symbol layer which applies a gradient from the outer edges of a symbol to the inside.
~QgsShapeburstFillSymbolLayer() override
Qgis::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
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.
QgsShapeburstFillSymbolLayer & operator=(const QgsShapeburstFillSymbolLayer &other)=delete
QgsShapeburstFillSymbolLayer cannot be copied.
Qgis::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
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.
const QgsMapUnitScale & offsetMapUnitScale() const
void setDistanceUnit(Qgis::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
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.
const QgsMapUnitScale & distanceMapUnitScale() const
Renders polygons using a single fill and stroke color.
Qgis::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
Qt::PenJoinStyle penJoinStyle() const
QColor strokeColor() const override
Returns the stroke color for the symbol layer.
void setBrushStyle(Qt::BrushStyle style)
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & strokeWidthMapUnitScale() const
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
void setStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the units for the width of the fill's stroke.
~QgsSimpleFillSymbolLayer() override
void setPenJoinStyle(Qt::PenJoinStyle style)
QColor fillColor() const override
Returns the fill color for the symbol layer.
Qt::PenStyle strokeStyle() const
QgsMapUnitScale mOffsetMapUnitScale
void setStrokeWidth(double strokeWidth)
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
Qgis::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setStrokeStyle(Qt::PenStyle strokeStyle)
QgsMapUnitScale mStrokeWidthMapUnitScale
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the fill's offset.
void setFillColor(const QColor &color) override
Sets the fill color for the symbol layer.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setStrokeColor(const QColor &strokeColor) override
Sets the stroke color for the symbol layer.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
Holds SLD export options and other information related to SLD export of a QGIS layer style.
Abstract base class for symbol layers.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
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 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 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 Qgis::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
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 QColor strokeColor() const
Returns the stroke color for the symbol layer.
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 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 setOutputUnit(Qgis::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
virtual Qgis::SymbolLayerFlags flags() const
Returns flags which control the symbol layer's behavior.
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.
Encapsulates the context in which a symbol is being rendered.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
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:6816
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define FINAL
Definition qgis_sip.h:242
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_ABSTRACT
Definition qgis_sip.h:213
#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