QGIS API Documentation 3.39.0-Master (47f7b3a4989)
Loading...
Searching...
No Matches
qgsfillsymbollayer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfillsymbollayer.h
3 ---------------------
4 begin : November 2009
5 copyright : (C) 2009 by Martin Dobias
6 email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSFILLSYMBOLLAYER_H
17#define QGSFILLSYMBOLLAYER_H
18
19#include "qgis_core.h"
20#include "qgis.h"
21#include "qgssymbollayer.h"
22
23#define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255)
24#define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern
25#define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor( 35, 35, 35 )
26#define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine
27#define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH
28#define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
29
30#define INF 1E20
31
32#include <QPen>
33#include <QBrush>
34
35class QgsMarkerSymbol;
36class QgsLineSymbol;
37class QgsPathResolver;
38
44{
45 public:
47 Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
48 const QColor &strokeColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
49 Qt::PenStyle strokeStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
50 double strokeWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
51 Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
52 );
53
55
56 // static stuff
57
63 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
64 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
65
66 // implemented from base classes
67
68 QString layerType() const override;
69 Qgis::SymbolLayerFlags flags() const override;
70 void startRender( QgsSymbolRenderContext &context ) override;
71 void stopRender( QgsSymbolRenderContext &context ) override;
72 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
73 QVariantMap properties() const override;
74 QgsSimpleFillSymbolLayer *clone() const override SIP_FACTORY;
75 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
76 QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
77
78 Qt::BrushStyle brushStyle() const { return mBrushStyle; }
79 void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
80
81 QColor strokeColor() const override { return mStrokeColor; }
82 void setStrokeColor( const QColor &strokeColor ) override { mStrokeColor = strokeColor; }
83 QColor fillColor() const override { return color(); }
84 void setFillColor( const QColor &color ) override { setColor( color ); }
85
86 Qt::PenStyle strokeStyle() const { return mStrokeStyle; }
87 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
88
89 double strokeWidth() const { return mStrokeWidth; }
90 void setStrokeWidth( double strokeWidth ) { mStrokeWidth = strokeWidth; }
91
92 Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
93 void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
94
103 void setOffset( QPointF offset ) { mOffset = offset; }
104
113 QPointF offset() const { return mOffset; }
114
120 void setStrokeWidthUnit( Qgis::RenderUnit unit ) { mStrokeWidthUnit = unit; }
121
126 Qgis::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
127
128 void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
129 const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
130
136 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
137
143 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
144
150 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
151
157 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
158
159 void setOutputUnit( Qgis::RenderUnit unit ) override;
160 Qgis::RenderUnit outputUnit() const override;
161 bool usesMapUnits() const override;
162
163 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
164 QgsMapUnitScale mapUnitScale() const override;
165
166 double estimateMaxBleed( const QgsRenderContext &context ) const override;
167
168 double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
169 QColor dxfColor( QgsSymbolRenderContext &context ) const override;
170 double dxfAngle( QgsSymbolRenderContext &context ) const override;
171
172 Qt::PenStyle dxfPenStyle() const override;
173 QColor dxfBrushColor( QgsSymbolRenderContext &context ) const override;
174 Qt::BrushStyle dxfBrushStyle() const override;
175 QImage toTiledPatternImage( ) const override;
176
177 protected:
178 QBrush mBrush;
179 QBrush mSelBrush;
180 Qt::BrushStyle mBrushStyle;
182 Qt::PenStyle mStrokeStyle;
186 Qt::PenJoinStyle mPenJoinStyle;
187 QPen mPen;
189
190 QPointF mOffset;
193
194 private:
195 //helper functions for data defined symbology
196 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QBrush &brush, QPen &pen, QPen &selPen );
197
198};
199
200class QgsColorRamp;
201
207{
208 public:
209
214 const QColor &color2 = Qt::white,
219 );
220
222
223 // static stuff
224
230 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
231
232 // implemented from base classes
233
234 Qgis::SymbolLayerFlags flags() const override;
235 QString layerType() const override;
236 void startRender( QgsSymbolRenderContext &context ) override;
237 void stopRender( QgsSymbolRenderContext &context ) override;
238 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
239 QVariantMap properties() const override;
241 double estimateMaxBleed( const QgsRenderContext &context ) const override;
242 bool canCauseArtifactsBetweenAdjacentTiles() const override;
243
249 Qgis::GradientType gradientType() const { return mGradientType; }
250
256 void setGradientType( Qgis::GradientType gradientType ) { mGradientType = gradientType; }
257
263 Qgis::GradientColorSource gradientColorType() const { return mGradientColorType; }
264
270 void setGradientColorType( Qgis::GradientColorSource gradientColorType ) { mGradientColorType = gradientColorType; }
271
278 QgsColorRamp *colorRamp() { return mGradientRamp; }
279
287 void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
288
294 QColor color2() const { return mColor2; }
295
301 void setColor2( const QColor &color2 ) { mColor2 = color2; }
302
308 Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
309
315 void setCoordinateMode( Qgis::SymbolCoordinateReference coordinateMode ) { mCoordinateMode = coordinateMode; }
316
322 Qgis::GradientSpread gradientSpread() const { return mGradientSpread; }
323
329 void setGradientSpread( Qgis::GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
330
336 void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
337
343 QPointF referencePoint1() const { return mReferencePoint1; }
344
350 void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
351
357 bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
358
364 void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
365
371 QPointF referencePoint2() const { return mReferencePoint2; }
372
378 void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
379
380
386 bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
387
396 void setOffset( QPointF offset ) { mOffset = offset; }
397
406 QPointF offset() const { return mOffset; }
407
413 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
414
420 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
421
427 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
428
434 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
435
436 void setOutputUnit( Qgis::RenderUnit unit ) override;
437 Qgis::RenderUnit outputUnit() const override;
438 bool usesMapUnits() const override;
439
440 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
441 QgsMapUnitScale mapUnitScale() const override;
442
443 protected:
444 QBrush mBrush;
445 QBrush mSelBrush;
446
448 QColor mColor2;
449 QgsColorRamp *mGradientRamp = nullptr;
453
455 bool mReferencePoint1IsCentroid = false;
457 bool mReferencePoint2IsCentroid = false;
458
459 QPointF mOffset;
462
463 private:
464
465 //helper functions for data defined symbology
466 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, const QPolygonF &points );
467
469 void applyGradient( const QgsSymbolRenderContext &context, QBrush &brush, const QColor &color, const QColor &color2,
470 Qgis::GradientColorSource gradientColorType, QgsColorRamp *gradientRamp, Qgis::GradientType gradientType,
471 Qgis::SymbolCoordinateReference coordinateMode, Qgis::GradientSpread gradientSpread,
472 QPointF referencePoint1, QPointF referencePoint2, double angle );
473
475 QPointF rotateReferencePoint( QPointF refPoint, double angle );
476};
477
483{
484 public:
485
489 QgsShapeburstFillSymbolLayer( const QColor &color = DEFAULT_SIMPLEFILL_COLOR, const QColor &color2 = Qt::white,
491 int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
492
494
500
506
507 // static stuff
508
514 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
515
516 // implemented from base classes
517
518 QString layerType() const override;
519 Qgis::SymbolLayerFlags flags() const override;
520 void startRender( QgsSymbolRenderContext &context ) override;
521 void stopRender( QgsSymbolRenderContext &context ) override;
522 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
523 QVariantMap properties() const override;
524 QgsShapeburstFillSymbolLayer *clone() const override SIP_FACTORY;
525 double estimateMaxBleed( const QgsRenderContext &context ) const override;
526 bool canCauseArtifactsBetweenAdjacentTiles() const override;
527
533 void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
534
540 int blurRadius() const { return mBlurRadius; }
541
549 void setUseWholeShape( bool useWholeShape ) { mUseWholeShape = useWholeShape; }
550
557 bool useWholeShape() const { return mUseWholeShape; }
558
566 void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
567
575 double maxDistance() const { return mMaxDistance; }
576
583 void setDistanceUnit( Qgis::RenderUnit unit ) { mDistanceUnit = unit; }
584
591 Qgis::RenderUnit distanceUnit() const { return mDistanceUnit; }
592
593 void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
594 const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
595
605 void setColorType( Qgis::GradientColorSource colorType ) { mColorType = colorType; }
606
616 Qgis::GradientColorSource colorType() const { return mColorType; }
617
626 void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER );
627
634 QgsColorRamp *colorRamp() { return mGradientRamp.get(); }
635
642 void setColor2( const QColor &color2 ) { mColor2 = color2; }
643
650 QColor color2() const { return mColor2; }
651
658 void setIgnoreRings( bool ignoreRings ) { mIgnoreRings = ignoreRings; }
659
665 bool ignoreRings() const { return mIgnoreRings; }
666
673 void setOffset( QPointF offset ) { mOffset = offset; }
674
681 QPointF offset() const { return mOffset; }
682
689 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
690
697 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
698
699 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
700 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
701
702 void setOutputUnit( Qgis::RenderUnit unit ) override;
703 Qgis::RenderUnit outputUnit() const override;
704 bool usesMapUnits() const override;
705
706 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
707 QgsMapUnitScale mapUnitScale() const override;
708
709 private:
710 QBrush mBrush;
711 QBrush mSelBrush;
712
713 int mBlurRadius = 0;
714
715 bool mUseWholeShape = true;
716 double mMaxDistance = 5.0;
718 QgsMapUnitScale mDistanceMapUnitScale;
719
721 QColor mColor2;
722
723 bool mIgnoreRings = false;
724
725 QPointF mOffset;
727 QgsMapUnitScale mOffsetMapUnitScale;
728
729 std::unique_ptr< QgsColorRamp > mGradientRamp;
730
731 //helper functions for data defined symbology
732 void applyDataDefinedSymbology( QgsSymbolRenderContext &context, QColor &color, QColor &color2, int &blurRadius, bool &useWholeShape,
733 double &maxDistance, bool &ignoreRings );
734
735 /* distance transform of a 1d function using squared distance */
736 void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
737 /* distance transform of 2d function using squared distance */
738 void distanceTransform2d( double *im, int width, int height, QgsRenderContext &context );
739 /* distance transform of a binary QImage */
740 double *distanceTransform( QImage *im, QgsRenderContext &context );
741
742 /* fills a QImage with values from an array of doubles containing squared distance transform values */
743 void dtArrayToQImage( double *array, QImage *im, QgsColorRamp *ramp, QgsRenderContext &context, bool useWholeShape = true, int maxPixelDistance = 0 );
744
745#ifdef SIP_RUN
747#endif
748};
749
755{
756 public:
757
760
761 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
762
768 void setStrokeWidthUnit( Qgis::RenderUnit unit ) { mStrokeWidthUnit = unit; }
769
775 Qgis::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
776
783 void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
784
792 const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
793
801 void setCoordinateReference( Qgis::SymbolCoordinateReference coordinateReference ) { mCoordinateReference = coordinateReference; }
802
810 Qgis::SymbolCoordinateReference coordinateReference() const { return mCoordinateReference; }
811
812 void setOutputUnit( Qgis::RenderUnit unit ) override;
813 Qgis::RenderUnit outputUnit() const override;
814 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
815 QgsMapUnitScale mapUnitScale() const override;
816 double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
817 Qt::PenStyle dxfPenStyle() const override;
818 QVariantMap properties() const override;
819
820 protected:
821 QBrush mBrush;
823 double mNextAngle = 0.0; // mAngle / data defined angle
824
826 double mStrokeWidth = 0.0;
829
833 virtual void applyDataDefinedSettings( QgsSymbolRenderContext &context ) { Q_UNUSED( context ) }
834
840 virtual bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const;
841
842 private:
843#ifdef SIP_RUN
845#endif
846};
847
854{
855 public:
856
861 QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );
862
864
869 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
870
876 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
877
882 static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
883
884 // implemented from base classes
885 QString layerType() const override;
886 Qgis::SymbolLayerFlags flags() const override;
887 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
888 void startRender( QgsSymbolRenderContext &context ) override;
889 void stopRender( QgsSymbolRenderContext &context ) override;
890 QVariantMap properties() const override;
891 QgsRasterFillSymbolLayer *clone() const override SIP_FACTORY;
892 double estimateMaxBleed( const QgsRenderContext &context ) const override;
893 bool usesMapUnits() const override;
894 QColor color() const override;
895 void setOutputUnit( Qgis::RenderUnit unit ) override;
896
897 //override QgsImageFillSymbolLayer's support for sub symbols
898 QgsSymbol *subSymbol() override { return nullptr; }
899 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
900
906 void setImageFilePath( const QString &imagePath );
907
913 QString imageFilePath() const { return mImageFilePath; }
914
921 void setCoordinateMode( Qgis::SymbolCoordinateReference mode );
922
929 Qgis::SymbolCoordinateReference coordinateMode() const { return mCoordinateMode; }
930
936 void setOpacity( double opacity );
937
943 double opacity() const { return mOpacity; }
944
952 void setOffset( QPointF offset ) { mOffset = offset; }
953
961 QPointF offset() const { return mOffset; }
962
970 void setOffsetUnit( const Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
971
979 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
980
988 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
989
997 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
998
1010 void setWidth( double width ) { mWidth = width; }
1011
1022 double width() const { return mWidth; }
1023
1035 void setHeight( double height ) { mHeight = height; }
1036
1047 double height() const { return mHeight; }
1048
1058 Q_DECL_DEPRECATED void setWidthUnit( Qgis::RenderUnit unit ) SIP_DEPRECATED { mSizeUnit = unit; }
1059
1069 void setSizeUnit( Qgis::RenderUnit unit ) { mSizeUnit = unit; }
1070
1080 Q_DECL_DEPRECATED Qgis::RenderUnit widthUnit() const SIP_DEPRECATED { return mSizeUnit; }
1081
1092 Qgis::RenderUnit sizeUnit() const { return mSizeUnit; }
1093
1103 Q_DECL_DEPRECATED void setWidthMapUnitScale( const QgsMapUnitScale &scale ) SIP_DEPRECATED { mSizeMapUnitScale = scale; }
1104
1115 void setSizeMapUnitScale( const QgsMapUnitScale &scale ) { mSizeMapUnitScale = scale; }
1116
1126 Q_DECL_DEPRECATED const QgsMapUnitScale &widthMapUnitScale() const SIP_DEPRECATED { return mSizeMapUnitScale; }
1127
1138 const QgsMapUnitScale &sizeMapUnitScale() const { return mSizeMapUnitScale; }
1139
1140 protected:
1141
1142 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1143 bool applyBrushTransformFromContext( QgsSymbolRenderContext *context = nullptr ) const override;
1144 private:
1145
1147 QString mImageFilePath;
1149 double mOpacity = 1.0;
1150
1151 QPointF mOffset;
1153 QgsMapUnitScale mOffsetMapUnitScale;
1154
1155 double mWidth = 0.0;
1157 QgsMapUnitScale mSizeMapUnitScale;
1158
1159 double mHeight = 0.0;
1160
1162 void applyPattern( QBrush &brush, const QString &imageFilePath, double width, double height, double opacity,
1163 const QgsSymbolRenderContext &context );
1164};
1165
1171{
1172 public:
1173
1177 QgsSVGFillSymbolLayer( const QString &svgFilePath, double width = 20, double rotation = 0.0 );
1178
1182 QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
1183
1185
1190 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1191
1196 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1197
1202 static void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
1203
1204 // implemented from base classes
1205
1206 QString layerType() const override;
1207 void startRender( QgsSymbolRenderContext &context ) override;
1208 void stopRender( QgsSymbolRenderContext &context ) override;
1209 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1210 QVariantMap properties() const override;
1211 QgsSVGFillSymbolLayer *clone() const override SIP_FACTORY;
1212 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1213 bool usesMapUnits() const override;
1214 QgsSymbol *subSymbol() override;
1215 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1216 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1217 QColor dxfColor( QgsSymbolRenderContext &context ) const override;
1218 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1219 bool hasDataDefinedProperties() const override;
1220
1232 void setSvgFilePath( const QString &svgPath );
1233
1239 QString svgFilePath() const { return mSvgFilePath; }
1240
1250 void setPatternWidth( double width ) { mPatternWidth = width;}
1251
1261 double patternWidth() const { return mPatternWidth; }
1262
1272 void setSvgFillColor( const QColor &c ) { setColor( c ); }
1273
1282 QColor svgFillColor() const { return color(); }
1283
1293 void setSvgStrokeColor( const QColor &c ) { mSvgStrokeColor = c; }
1294
1303 QColor svgStrokeColor() const { return mSvgStrokeColor; }
1304
1315 void setSvgStrokeWidth( double w ) { mSvgStrokeWidth = w; }
1316
1327 double svgStrokeWidth() const { return mSvgStrokeWidth; }
1328
1336 void setPatternWidthUnit( Qgis::RenderUnit unit ) { mPatternWidthUnit = unit; }
1337
1345 Qgis::RenderUnit patternWidthUnit() const { return mPatternWidthUnit; }
1346
1354 void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale ) { mPatternWidthMapUnitScale = scale; }
1355
1363 const QgsMapUnitScale &patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
1364
1372 void setSvgStrokeWidthUnit( Qgis::RenderUnit unit ) { mSvgStrokeWidthUnit = unit; }
1373
1381 Qgis::RenderUnit svgStrokeWidthUnit() const { return mSvgStrokeWidthUnit; }
1382
1390 void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mSvgStrokeWidthMapUnitScale = scale; }
1391
1399 const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const { return mSvgStrokeWidthMapUnitScale; }
1400
1401 void setOutputUnit( Qgis::RenderUnit unit ) override;
1402 Qgis::RenderUnit outputUnit() const override;
1403
1404 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1405 QgsMapUnitScale mapUnitScale() const override;
1406
1411 QMap<QString, QgsProperty> parameters() const { return mParameters; }
1412
1417 void setParameters( const QMap<QString, QgsProperty> &parameters );
1418
1419 protected:
1420
1421 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1422
1423 private:
1424
1426 double mPatternWidth = 20;
1428 QgsMapUnitScale mPatternWidthMapUnitScale;
1429 QMap<QString, QgsProperty> mParameters;
1430
1432 QByteArray mSvgData;
1434 QString mSvgFilePath;
1436 QRectF mSvgViewBox;
1437
1438 //param(fill), param(stroke), param(stroke-width) are going
1439 //to be replaced in memory
1440 QColor mSvgStrokeColor = QColor( 35, 35, 35 );
1441 double mSvgStrokeWidth = 0.2;
1442 Qgis::RenderUnit mSvgStrokeWidthUnit = Qgis::RenderUnit::Millimeters;
1443 QgsMapUnitScale mSvgStrokeWidthMapUnitScale;
1444
1446 std::unique_ptr< QgsLineSymbol > mStroke;
1447
1449 void storeViewBox();
1450 void setDefaultSvgParams(); //fills mSvgFillColor, mSvgStrokeColor, mSvgStrokeWidth with default values for mSvgFilePath
1451
1453 void applyPattern( QBrush &brush, const QString &svgFilePath, double patternWidth, Qgis::RenderUnit patternWidthUnit, const QColor &svgFillColor, const QColor &svgStrokeColor,
1454 double svgStrokeWidth, Qgis::RenderUnit svgStrokeWidthUnit, const QgsSymbolRenderContext &context, const QgsMapUnitScale &patternWidthMapUnitScale, const QgsMapUnitScale &svgStrokeWidthMapUnitScale,
1455 const QgsStringMap svgParameters );
1456};
1457
1464{
1465 public:
1468
1473 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1474
1479 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1480
1481 QString layerType() const override;
1482 void startRender( QgsSymbolRenderContext &context ) override;
1483 void stopRender( QgsSymbolRenderContext &context ) override;
1484 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1485 QVariantMap properties() const override;
1486 QgsLinePatternFillSymbolLayer *clone() const override SIP_FACTORY;
1487 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1488 QImage toTiledPatternImage( ) const override;
1489 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1490
1491 QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
1492
1500 void setLineAngle( double a ) { mLineAngle = a; }
1501
1509 double lineAngle() const { return mLineAngle; }
1510
1517 void setDistance( double d ) { mDistance = d; }
1518
1524 double distance() const { return mDistance; }
1525
1532 void setLineWidth( double w );
1533
1540 double lineWidth() const { return mLineWidth; }
1541
1542 void setColor( const QColor &c ) override;
1543 QColor color() const override;
1544
1556 void setOffset( double offset ) { mOffset = offset; }
1557
1569 double offset() const { return mOffset; }
1570
1577 void setDistanceUnit( Qgis::RenderUnit unit ) { mDistanceUnit = unit; }
1578
1585 Qgis::RenderUnit distanceUnit() const { return mDistanceUnit; }
1586
1594 void setDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
1595
1603 const QgsMapUnitScale &distanceMapUnitScale() const { return mDistanceMapUnitScale; }
1604
1610 void setLineWidthUnit( Qgis::RenderUnit unit ) { mLineWidthUnit = unit; }
1611
1617 Qgis::RenderUnit lineWidthUnit() const { return mLineWidthUnit; }
1618
1626 void setLineWidthMapUnitScale( const QgsMapUnitScale &scale ) { mLineWidthMapUnitScale = scale; }
1627
1635 const QgsMapUnitScale &lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
1636
1642 void setOffsetUnit( Qgis::RenderUnit unit ) { mOffsetUnit = unit; }
1643
1649 Qgis::RenderUnit offsetUnit() const { return mOffsetUnit; }
1650
1658 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
1659
1667 const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
1668
1675 Qgis::LineClipMode clipMode() const { return mClipMode; }
1676
1683 void setClipMode( Qgis::LineClipMode mode ) { mClipMode = mode; }
1684
1685 void setOutputUnit( Qgis::RenderUnit unit ) override;
1686 Qgis::RenderUnit outputUnit() const override;
1687 bool usesMapUnits() const override;
1688 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1689 QgsMapUnitScale mapUnitScale() const override;
1690 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1691 QgsSymbol *subSymbol() override;
1692 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1693 bool hasDataDefinedProperties() const override;
1694 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1695 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1696
1697 protected:
1698
1699 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
1700
1701 private:
1703 double mDistance = 5.0;
1705 QgsMapUnitScale mDistanceMapUnitScale;
1707 double mLineWidth = 0;
1709 QgsMapUnitScale mLineWidthMapUnitScale;
1711 double mLineAngle = 45.0;
1713 double mOffset = 0.0;
1715 QgsMapUnitScale mOffsetMapUnitScale;
1716
1717 bool mRenderUsingLines = false;
1718
1719#ifdef SIP_RUN
1721#endif
1722
1724 bool applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double lineAngle, double distance );
1725
1727 std::unique_ptr< QgsLineSymbol > mFillLineSymbol;
1728 bool mFillLineSymbolRenderStarted = false;
1729
1731};
1732
1739{
1740 public:
1743
1749 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
1750 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
1751
1752 QString layerType() const override;
1753 void startRender( QgsSymbolRenderContext &context ) override;
1754 void stopRender( QgsSymbolRenderContext &context ) override;
1755 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1756 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
1757 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
1758 QVariantMap properties() const override;
1759 QgsPointPatternFillSymbolLayer *clone() const override SIP_FACTORY;
1760 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
1761 QImage toTiledPatternImage( ) const override;
1762 double estimateMaxBleed( const QgsRenderContext &context ) const override;
1763 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
1764 QgsSymbol *subSymbol() override;
1765 void setOutputUnit( Qgis::RenderUnit unit ) override;
1766 Qgis::RenderUnit outputUnit() const override;
1767 bool usesMapUnits() const override;
1768 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
1769 QgsMapUnitScale mapUnitScale() const override;
1770 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
1771 bool hasDataDefinedProperties() const override;
1772 void setColor( const QColor &c ) override;
1773 QColor color() const override;
1774
1784 double distanceX() const { return mDistanceX; }
1785
1795 void setDistanceX( double d ) { mDistanceX = d; }
1796
1803 void setDistanceXUnit( Qgis::RenderUnit unit ) { mDistanceXUnit = unit; }
1804
1810 Qgis::RenderUnit distanceXUnit() const { return mDistanceXUnit; }
1811
1818 void setDistanceXMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceXMapUnitScale = scale; }
1819
1826 const QgsMapUnitScale &distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
1827
1837 double distanceY() const { return mDistanceY; }
1838
1848 void setDistanceY( double d ) { mDistanceY = d; }
1849
1856 void setDistanceYUnit( Qgis::RenderUnit unit ) { mDistanceYUnit = unit; }
1857
1863 Qgis::RenderUnit distanceYUnit() const { return mDistanceYUnit; }
1864
1871 void setDistanceYMapUnitScale( const QgsMapUnitScale &scale ) { mDistanceYMapUnitScale = scale; }
1872
1879 const QgsMapUnitScale &distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
1880
1890 double displacementX() const { return mDisplacementX; }
1891
1901 void setDisplacementX( double d ) { mDisplacementX = d; }
1902
1909 void setDisplacementXUnit( Qgis::RenderUnit unit ) { mDisplacementXUnit = unit; }
1910
1916 Qgis::RenderUnit displacementXUnit() const { return mDisplacementXUnit; }
1917
1924 void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementXMapUnitScale = scale; }
1925
1932 const QgsMapUnitScale &displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
1933
1943 double displacementY() const { return mDisplacementY; }
1944
1954 void setDisplacementY( double d ) { mDisplacementY = d; }
1955
1962 void setDisplacementYUnit( Qgis::RenderUnit unit ) { mDisplacementYUnit = unit; }
1963
1969 Qgis::RenderUnit displacementYUnit() const { return mDisplacementYUnit; }
1970
1977 void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale ) { mDisplacementYMapUnitScale = scale; }
1978
1985 const QgsMapUnitScale &displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
1986
1994 void setOffsetX( double offset ) { mOffsetX = offset; }
1995
2002 double offsetX() const { return mOffsetX; }
2003
2011 void setOffsetY( double offset ) { mOffsetY = offset; }
2012
2019 double offsetY() const { return mOffsetY; }
2020
2028 void setOffsetXUnit( Qgis::RenderUnit unit ) { mOffsetXUnit = unit; }
2029
2036 Qgis::RenderUnit offsetXUnit() const { return mOffsetXUnit; }
2037
2045 void setOffsetXMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetXMapUnitScale = scale; }
2046
2053 const QgsMapUnitScale &offsetXMapUnitScale() const { return mOffsetXMapUnitScale; }
2054
2062 void setOffsetYUnit( Qgis::RenderUnit unit ) { mOffsetYUnit = unit; }
2063
2070 Qgis::RenderUnit offsetYUnit() const { return mOffsetYUnit; }
2071
2079 void setOffsetYMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetYMapUnitScale = scale; }
2080
2087 const QgsMapUnitScale &offsetYMapUnitScale() const { return mOffsetYMapUnitScale; }
2088
2095 Qgis::MarkerClipMode clipMode() const { return mClipMode; }
2096
2103 void setClipMode( Qgis::MarkerClipMode mode ) { mClipMode = mode; }
2104
2114 void setMaximumRandomDeviationX( double deviation ) { mRandomDeviationX = deviation; }
2115
2125 double maximumRandomDeviationX() const { return mRandomDeviationX; }
2126
2136 void setMaximumRandomDeviationY( double deviation ) { mRandomDeviationY = deviation; }
2137
2147 double maximumRandomDeviationY() const { return mRandomDeviationY; }
2148
2156 void setRandomDeviationXUnit( Qgis::RenderUnit unit ) { mRandomDeviationXUnit = unit; }
2157
2165 Qgis::RenderUnit randomDeviationXUnit() const { return mRandomDeviationXUnit; }
2166
2174 void setRandomDeviationYUnit( Qgis::RenderUnit unit ) { mRandomDeviationYUnit = unit; }
2175
2184 Qgis::RenderUnit randomDeviationYUnit() const { return mRandomDeviationYUnit; }
2185
2193 const QgsMapUnitScale &randomDeviationXMapUnitScale() const { return mRandomDeviationXMapUnitScale; }
2194
2202 const QgsMapUnitScale &randomDeviationYMapUnitScale() const { return mRandomDeviationYMapUnitScale; }
2203
2211 void setRandomDeviationXMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationXMapUnitScale = scale; }
2212
2220 void setRandomDeviationYMapUnitScale( const QgsMapUnitScale &scale ) { mRandomDeviationYMapUnitScale = scale; }
2221
2228 unsigned long seed() const { return mSeed; }
2229
2238 void setSeed( unsigned long seed ) { mSeed = seed; }
2239
2240 protected:
2241 std::unique_ptr< QgsMarkerSymbol > mMarkerSymbol;
2242 bool mMarkerSymbolRenderStarted = false;
2243 double mDistanceX = 15;
2246 double mDistanceY = 15;
2249 double mDisplacementX = 0;
2252 double mDisplacementY = 0;
2255 double mOffsetX = 0;
2258 double mOffsetY = 0;
2261
2262 double mRandomDeviationX = 0;
2265 double mRandomDeviationY = 0;
2268 unsigned long mSeed = 0;
2269
2270 void applyDataDefinedSettings( QgsSymbolRenderContext &context ) override;
2271
2272 private:
2273#ifdef SIP_RUN
2275#endif
2276
2277 bool applyPattern( const QgsSymbolRenderContext &context, QBrush &brush, double distanceX, double distanceY,
2278 double displacementX, double displacementY, double offsetX, double offsetY );
2279
2281
2282 bool mRenderUsingMarkers = false;
2283};
2284
2294{
2295 public:
2296
2303 QgsRandomMarkerFillSymbolLayer( int pointCount = 10, Qgis::PointCountMethod method = Qgis::PointCountMethod::Absolute, double densityArea = 250.0, unsigned long seed = 0 );
2304
2306
2312 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2313
2314 QString layerType() const override;
2315 void startRender( QgsSymbolRenderContext &context ) override;
2316 void stopRender( QgsSymbolRenderContext &context ) override;
2317 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2318 QVariantMap properties() const override;
2319 QgsRandomMarkerFillSymbolLayer *clone() const override SIP_FACTORY;
2320 bool canCauseArtifactsBetweenAdjacentTiles() const override;
2321
2322 void setColor( const QColor &color ) override;
2323 QColor color() const override;
2324
2325 QgsSymbol *subSymbol() override;
2326 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL;
2327
2328 void setOutputUnit( Qgis::RenderUnit unit ) override;
2329 Qgis::RenderUnit outputUnit() const override;
2330 bool usesMapUnits() const override;
2331
2332 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2333 QgsMapUnitScale mapUnitScale() const override;
2334
2335 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2336 bool hasDataDefinedProperties() const override;
2337
2343 int pointCount() const;
2344
2350 void setPointCount( int count );
2351
2357 unsigned long seed() const;
2358
2366 void setSeed( unsigned long seed );
2367
2373 bool clipPoints() const;
2374
2380 void setClipPoints( bool clipped );
2381
2387 Qgis::PointCountMethod countMethod() const;
2388
2394 void setCountMethod( Qgis::PointCountMethod method );
2395
2405 double densityArea() const;
2406
2412 void setDensityArea( double area );
2413
2419 void setDensityAreaUnit( Qgis::RenderUnit unit ) { mDensityAreaUnit = unit; }
2420
2425 Qgis::RenderUnit densityAreaUnit() const { return mDensityAreaUnit; }
2426
2434 void setDensityAreaUnitScale( const QgsMapUnitScale &scale ) { mDensityAreaUnitScale = scale; }
2435
2442 const QgsMapUnitScale &densityAreaUnitScale() const { return mDensityAreaUnitScale; }
2443
2444 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2445 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2446
2447 private:
2448#ifdef SIP_RUN
2450#endif
2451
2452 struct Part
2453 {
2454 QPolygonF exterior;
2455 QVector<QPolygonF> rings;
2456 };
2457
2458 QVector< Part > mCurrentParts;
2459
2460 void render( QgsRenderContext &context, const QVector< Part > &parts, const QgsFeature &feature, bool selected );
2461
2462 std::unique_ptr< QgsMarkerSymbol > mMarker;
2464 int mPointCount = 10;
2465 double mDensityArea = 250.0;
2467 QgsMapUnitScale mDensityAreaUnitScale;
2468 unsigned long mSeed = 0;
2469 bool mClipPoints = false;
2470
2471 bool mRenderingFeature = false;
2472 double mFeatureSymbolOpacity = 1;
2473};
2474
2475
2481{
2482 public:
2485
2486 // static stuff
2487
2493 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
2494 static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
2495
2496 // implemented from base classes
2497
2498 QString layerType() const override;
2499 void startRender( QgsSymbolRenderContext &context ) override;
2500 void stopRender( QgsSymbolRenderContext &context ) override;
2501 void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;
2502 QVariantMap properties() const override;
2503 QgsCentroidFillSymbolLayer *clone() const override SIP_FACTORY;
2504 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
2505 void setColor( const QColor &color ) override;
2506 QColor color() const override;
2507 QgsSymbol *subSymbol() override;
2508 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL;
2509 void setOutputUnit( Qgis::RenderUnit unit ) override;
2510 Qgis::RenderUnit outputUnit() const override;
2511 bool usesMapUnits() const override;
2512 void setMapUnitScale( const QgsMapUnitScale &scale ) override;
2513 QgsMapUnitScale mapUnitScale() const override;
2514 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
2515 bool hasDataDefinedProperties() const override;
2516 bool canCauseArtifactsBetweenAdjacentTiles() const override;
2517
2518 void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
2519 bool pointOnSurface() const { return mPointOnSurface; }
2520
2525 void setPointOnAllParts( bool pointOnAllParts ) { mPointOnAllParts = pointOnAllParts; }
2526
2531 bool pointOnAllParts() const { return mPointOnAllParts; }
2532
2539 bool clipPoints() const { return mClipPoints; }
2540
2547 void setClipPoints( bool clipPoints ) { mClipPoints = clipPoints; }
2548
2555 bool clipOnCurrentPartOnly() const { return mClipOnCurrentPartOnly; }
2556
2563 void setClipOnCurrentPartOnly( bool clipOnCurrentPartOnly ) { mClipOnCurrentPartOnly = clipOnCurrentPartOnly; }
2564
2565 void startFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2566 void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context ) override;
2567
2568 protected:
2569
2570 std::unique_ptr< QgsMarkerSymbol > mMarker;
2571 bool mPointOnSurface = false;
2572 bool mPointOnAllParts = true;
2573 bool mClipPoints = false;
2574 bool mClipOnCurrentPartOnly = false;
2575
2576 bool mRenderingFeature = false;
2577 double mFeatureSymbolOpacity = 1;
2578 bool mUseSelectedColor = false;
2579
2580 private:
2581#ifdef SIP_RUN
2583#endif
2584 struct Part
2585 {
2586 QPolygonF exterior;
2587 QVector<QPolygonF> rings;
2588 };
2589
2590 void render( QgsRenderContext &context, const QVector<Part> &parts, const QgsFeature &feature, bool selected );
2591 QVector<Part> mCurrentParts;
2592};
2593
2594#endif
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
MarkerClipMode
Marker clipping modes.
Definition qgis.h:2775
@ Shape
Clip to polygon shape.
LineClipMode
Line clipping modes.
Definition qgis.h:2789
@ ClipPainterOnly
Applying clipping on the painter only (i.e. line endpoints will coincide with polygon bounding box,...
GradientColorSource
Gradient color sources.
Definition qgis.h:2704
@ 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:2748
@ 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:2763
@ Absolute
The point count is used as an absolute count of markers.
QFlags< SymbolLayerFlag > SymbolLayerFlags
Symbol layer flags.
Definition qgis.h:644
RenderUnit
Rendering size units.
Definition qgis.h:4494
@ Millimeters
Millimeters.
GradientType
Gradient types.
Definition qgis.h:2718
@ Linear
Linear gradient.
SymbolCoordinateReference
Symbol coordinate reference modes.
Definition qgis.h:2733
@ Feature
Relative to feature/shape being rendered.
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
std::unique_ptr< QgsMarkerSymbol > mMarker
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
~QgsCentroidFillSymbolLayer() override
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
Abstract base class for color ramps.
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
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,...
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].
void setColor2(const QColor &color2)
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColo...
Base class for polygon renderers generating texture images.
QgsMapUnitScale mStrokeWidthMapUnitScale
void 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 class for filling symbols 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 class for filling symbols 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.
~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
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.
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.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:94
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:6003
#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