QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsfillsymbollayerv2.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfillsymbollayerv2.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 QGSFILLSYMBOLLAYERV2_H
17 #define QGSFILLSYMBOLLAYERV2_H
18 
19 #include "qgssymbollayerv2.h"
20 
21 #define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255)
22 #define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern
23 #define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor(0,0,0)
24 #define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine
25 #define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH
26 #define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
27 
28 #define INF 1E20
29 
30 #include <QPen>
31 #include <QBrush>
32 
34 {
35  public:
37  Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
38  QColor borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
39  Qt::PenStyle borderStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
40  double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
41  Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
42  );
43 
44  // static stuff
45 
46  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
47  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
48 
49  // implemented from base classes
50 
51  QString layerType() const;
52 
53  void startRender( QgsSymbolV2RenderContext& context );
54 
55  void stopRender( QgsSymbolV2RenderContext& context );
56 
57  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
58 
59  QgsStringMap properties() const;
60 
61  QgsSymbolLayerV2* clone() const;
62 
63  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
64 
65  QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
66 
67  Qt::BrushStyle brushStyle() const { return mBrushStyle; }
68  void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
69 
70  QColor borderColor() const { return mBorderColor; }
71  void setBorderColor( QColor borderColor ) { mBorderColor = borderColor; }
72 
75  QColor outlineColor() const { return borderColor(); }
78  void setOutlineColor( const QColor& color ) { setBorderColor( color ); }
79 
82  QColor fillColor() const { return color(); }
85  void setFillColor( const QColor& color ) { setColor( color ); }
86 
87  Qt::PenStyle borderStyle() const { return mBorderStyle; }
88  void setBorderStyle( Qt::PenStyle borderStyle ) { mBorderStyle = borderStyle; }
89 
90  double borderWidth() const { return mBorderWidth; }
91  void setBorderWidth( double borderWidth ) { mBorderWidth = borderWidth; }
92 
93  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
94  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
95 
96  void setOffset( QPointF offset ) { mOffset = offset; }
97  QPointF offset() { return mOffset; }
98 
99  void setBorderWidthUnit( QgsSymbolV2::OutputUnit unit ) { mBorderWidthUnit = unit; }
100  QgsSymbolV2::OutputUnit borderWidthUnit() const { return mBorderWidthUnit; }
101 
102  void setBorderWidthMapUnitScale( const QgsMapUnitScale& scale ) { mBorderWidthMapUnitScale = scale; }
103  const QgsMapUnitScale& borderWidthMapUnitScale() const { return mBorderWidthMapUnitScale; }
104 
105  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
106  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
107 
108  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
109  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
110 
113 
114  void setMapUnitScale( const QgsMapUnitScale &scale );
116 
117  double estimateMaxBleed() const;
118 
119  double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
120  QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
121  Qt::PenStyle dxfPenStyle() const;
122  QColor dxfBrushColor( const QgsSymbolV2RenderContext& context ) const;
123  Qt::BrushStyle dxfBrushStyle() const;
124 
125  protected:
126  QBrush mBrush;
127  QBrush mSelBrush;
128  Qt::BrushStyle mBrushStyle;
129  QColor mBorderColor;
130  Qt::PenStyle mBorderStyle;
131  double mBorderWidth;
134  Qt::PenJoinStyle mPenJoinStyle;
135  QPen mPen;
136  QPen mSelPen;
137 
138  QPointF mOffset;
141 
142  private:
143  //helper functions for data defined symbology
144  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QBrush& brush, QPen& pen, QPen& selPen );
145 };
146 
148 
150 {
151  public:
152 
154  {
156  ColorRamp
157  };
158 
160  {
163  Conical
164  };
165 
167  {
169  Viewport
170  };
171 
173  {
176  Repeat
177  };
178 
180  QColor color2 = Qt::white,
181  GradientColorType gradientColorType = SimpleTwoColor,
182  GradientType gradientType = Linear,
183  GradientCoordinateMode coordinateMode = Feature,
184  GradientSpread gradientSpread = Pad
185  );
186 
187  virtual ~QgsGradientFillSymbolLayerV2();
188 
189  // static stuff
190 
191  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
192 
193  // implemented from base classes
194 
195  QString layerType() const;
196 
197  void startRender( QgsSymbolV2RenderContext& context );
198 
199  void stopRender( QgsSymbolV2RenderContext& context );
200 
201  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
202 
203  QgsStringMap properties() const;
204 
205  QgsSymbolLayerV2* clone() const;
206 
207  double estimateMaxBleed() const;
208 
210  GradientType gradientType() const { return mGradientType; }
211  void setGradientType( GradientType gradientType ) { mGradientType = gradientType; }
212 
214  GradientColorType gradientColorType() const { return mGradientColorType; }
215  void setGradientColorType( GradientColorType gradientColorType ) { mGradientColorType = gradientColorType; }
216 
218  QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
219  void setColorRamp( QgsVectorColorRampV2* ramp );
220 
222  QColor color2() const { return mColor2; }
223  void setColor2( QColor color2 ) { mColor2 = color2; }
224 
226  GradientCoordinateMode coordinateMode() const { return mCoordinateMode; }
227  void setCoordinateMode( GradientCoordinateMode coordinateMode ) { mCoordinateMode = coordinateMode; }
228 
230  GradientSpread gradientSpread() const { return mGradientSpread; }
231  void setGradientSpread( GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
232 
234  void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
235  QPointF referencePoint1() const { return mReferencePoint1; }
236 
238  void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
239  bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
240 
242  void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
243  QPointF referencePoint2() const { return mReferencePoint2; }
244 
246  void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
247  bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
248 
250  void setAngle( double angle ) { mAngle = angle; }
251  double angle() const { return mAngle; }
252 
254  void setOffset( QPointF offset ) { mOffset = offset; }
255  QPointF offset() const { return mOffset; }
256 
258  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
259  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
260 
261  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
262  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
263 
266 
267  void setMapUnitScale( const QgsMapUnitScale &scale );
269 
270  protected:
271  QBrush mBrush;
272  QBrush mSelBrush;
273 
275  QColor mColor2;
280 
285  double mAngle;
286 
287  QPointF mOffset;
290 
291  private:
292 
293  //helper functions for data defined symbology
294  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, const QPolygonF& points );
295 
297  void applyGradient( const QgsSymbolV2RenderContext& context, QBrush& brush, const QColor& color, const QColor& color2,
298  const GradientColorType &gradientColorType, QgsVectorColorRampV2 *gradientRamp, const GradientType &gradientType,
299  const GradientCoordinateMode &coordinateMode, const GradientSpread &gradientSpread,
300  const QPointF &referencePoint1, const QPointF &referencePoint2, const double angle );
301 
303  QPointF rotateReferencePoint( const QPointF & refPoint, double angle );
304 };
305 
307 {
308  public:
309 
311  {
313  ColorRamp
314  };
315 
316  QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
317  ShapeburstColorType colorType = SimpleTwoColor,
318  int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
319 
321 
322  // static stuff
323 
324  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
325 
326  // implemented from base classes
327 
328  QString layerType() const;
329 
330  void startRender( QgsSymbolV2RenderContext& context );
331 
332  void stopRender( QgsSymbolV2RenderContext& context );
333 
334  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
335 
336  QgsStringMap properties() const;
337 
338  QgsSymbolLayerV2* clone() const;
339 
340  double estimateMaxBleed() const;
341 
347  void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
353  int blurRadius() const { return mBlurRadius; }
354 
362  void setUseWholeShape( double useWholeShape ) { mUseWholeShape = useWholeShape; }
369  double useWholeShape() const { return mUseWholeShape; }
370 
378  void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
386  double maxDistance() const { return mMaxDistance; }
387 
394  void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
401  QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
402 
403  void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
404  const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }
405 
415  void setColorType( ShapeburstColorType colorType ) { mColorType = colorType; }
425  ShapeburstColorType colorType() const { return mColorType; }
426 
433  void setColorRamp( QgsVectorColorRampV2* ramp );
440  QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
441 
448  void setColor2( QColor color2 ) { mColor2 = color2; }
455  QColor color2() const { return mColor2; }
456 
463  void setIgnoreRings( double ignoreRings ) { mIgnoreRings = ignoreRings; }
469  double ignoreRings() const { return mIgnoreRings; }
470 
477  void setOffset( QPointF offset ) { mOffset = offset; }
484  QPointF offset() const { return mOffset; }
485 
492  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
499  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
500 
501  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
502  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
503 
506 
507  void setMapUnitScale( const QgsMapUnitScale &scale );
509 
510  protected:
511  QBrush mBrush;
512  QBrush mSelBrush;
513 
515 
517  double mMaxDistance;
520 
522  QColor mColor2;
525 
527 
528  QPointF mOffset;
531 
532  private:
533 
534  //helper functions for data defined symbology
535  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QColor& color, QColor& color2, int& blurRadius, bool& useWholeShape,
536  double& maxDistance, bool &ignoreRings );
537 
538  /* distance transform of a 1d function using squared distance */
539  void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
540  /* distance transform of 2d function using squared distance */
541  void distanceTransform2d( double * im, int width, int height );
542  /* distance transform of a binary QImage */
543  double * distanceTransform( QImage * im );
544 
545  /* fills a QImage with values from an array of doubles containing squared distance transform values */
546  void dtArrayToQImage( double * array, QImage *im, QgsVectorColorRampV2* ramp, double layerAlpha = 1, bool useWholeShape = true, int maxPixelDistance = 0 );
547 };
548 
551 {
552  public:
554  virtual ~QgsImageFillSymbolLayer();
555  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
556 
557  virtual QgsSymbolV2* subSymbol() { return mOutline; }
558  virtual bool setSubSymbol( QgsSymbolV2* symbol );
559 
560  void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidthUnit = unit; }
561  QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidthUnit; }
562 
563  void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOutlineWidthMapUnitScale = scale; }
564  const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutlineWidthMapUnitScale; }
565 
568 
569  void setMapUnitScale( const QgsMapUnitScale& scale );
571 
572  virtual double estimateMaxBleed() const;
573 
574  virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
575  virtual QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
576  virtual Qt::PenStyle dxfPenStyle() const;
577 
578  protected:
579  QBrush mBrush;
580  double mNextAngle; // mAngle / data defined angle
581 
586 
589 
590  virtual void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ) { Q_UNUSED( context ); }
591 };
592 
596 {
597  public:
598  QgsSVGFillSymbolLayer( const QString& svgFilePath = "", double width = 20, double rotation = 0.0 );
599  QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, double rotation = 0.0 );
601 
602  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
603  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
604 
605  // implemented from base classes
606 
607  QString layerType() const;
608 
609  void startRender( QgsSymbolV2RenderContext& context );
610  void stopRender( QgsSymbolV2RenderContext& context );
611 
612  QgsStringMap properties() const;
613 
614  QgsSymbolLayerV2* clone() const;
615 
616  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
617 
618  //getters and setters
619  void setSvgFilePath( const QString& svgPath );
620  QString svgFilePath() const { return mSvgFilePath; }
621  void setPatternWidth( double width ) { mPatternWidth = width;}
622  double patternWidth() const { return mPatternWidth; }
623 
624  void setSvgFillColor( const QColor& c ) { mSvgFillColor = c; }
625  QColor svgFillColor() const { return mSvgFillColor; }
626  void setSvgOutlineColor( const QColor& c ) { mSvgOutlineColor = c; }
627  QColor svgOutlineColor() const { return mSvgOutlineColor; }
628  void setSvgOutlineWidth( double w ) { mSvgOutlineWidth = w; }
629  double svgOutlineWidth() const { return mSvgOutlineWidth; }
630 
631  void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit ) { mPatternWidthUnit = unit; }
632  QgsSymbolV2::OutputUnit patternWidthUnit() const { return mPatternWidthUnit; }
633 
634  void setPatternWidthMapUnitScale( const QgsMapUnitScale& scale ) { mPatternWidthMapUnitScale = scale; }
635  const QgsMapUnitScale& patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
636 
637  void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSvgOutlineWidthUnit = unit; }
638  QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const { return mSvgOutlineWidthUnit; }
639 
640  void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mSvgOutlineWidthMapUnitScale = scale; }
641  const QgsMapUnitScale& svgOutlineWidthMapUnitScale() const { return mSvgOutlineWidthMapUnitScale; }
642 
645 
646  void setMapUnitScale( const QgsMapUnitScale &scale );
648 
649  protected:
654 
656  QByteArray mSvgData;
658  QString mSvgFilePath;
660  QRectF mSvgViewBox;
663  QImage* mSvgPattern;
664 
665  //param(fill), param(outline), param(outline-width) are going
666  //to be replaced in memory
672 
673  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
674 
675  private:
677  void storeViewBox();
678  void setDefaultSvgParams(); //fills mSvgFillColor, mSvgOutlineColor, mSvgOutlineWidth with default values for mSvgFilePath
679 
681  void applyPattern( QBrush& brush, const QString& svgFilePath, double patternWidth, QgsSymbolV2::OutputUnit patternWidthUnit, const QColor& svgFillColor, const QColor& svgOutlineColor,
682  double svgOutlineWidth, QgsSymbolV2::OutputUnit svgOutlineWidthUnit, const QgsSymbolV2RenderContext& context, const QgsMapUnitScale& patternWidthMapUnitScale, const QgsMapUnitScale &svgOutlineWidthMapUnitScale );
683 };
684 
686 {
687  public:
690 
691  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
692  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
693 
694  QString layerType() const;
695 
696  void startRender( QgsSymbolV2RenderContext& context );
697 
698  void stopRender( QgsSymbolV2RenderContext& context );
699 
700  QgsStringMap properties() const;
701 
702  QgsSymbolLayerV2* clone() const;
703 
704  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
705 
706  double estimateMaxBleed() const;
707 
708  QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
709 
710  //getters and setters
711  void setLineAngle( double a ) { mLineAngle = a; }
712  double lineAngle() const { return mLineAngle; }
713  void setDistance( double d ) { mDistance = d; }
714  double distance() const { return mDistance; }
715  void setLineWidth( double w );
716  double lineWidth() const { return mLineWidth; }
717  void setColor( const QColor& c );
718  QColor color() const { return mColor; }
719  void setOffset( double offset ) { mOffset = offset; }
720  double offset() const { return mOffset; }
721 
722  void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
723  QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
724 
725  void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
726  const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }
727 
728  void setLineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mLineWidthUnit = unit; }
729  QgsSymbolV2::OutputUnit lineWidthUnit() const { return mLineWidthUnit; }
730 
731  void setLineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mLineWidthMapUnitScale = scale; }
732  const QgsMapUnitScale& lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
733 
734  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
735  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
736 
737  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
738  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
739 
742 
743  void setMapUnitScale( const QgsMapUnitScale& scale );
745 
746  bool setSubSymbol( QgsSymbolV2* symbol );
748 
749  protected:
751  double mDistance;
755  double mLineWidth;
758  QColor mColor;
760  double mLineAngle;
762  double mOffset;
765 
766  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
767 
768  private:
770  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double lineAngle, double distance, double lineWidth, const QColor& color );
771 
773  QgsLineSymbolV2* mFillLineSymbol;
774 };
775 
777 {
778  public:
781 
782  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
783  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
784 
785  QString layerType() const;
786 
787  void startRender( QgsSymbolV2RenderContext& context );
788 
789  void stopRender( QgsSymbolV2RenderContext& context );
790 
791  QgsStringMap properties() const;
792 
793  QgsSymbolLayerV2* clone() const;
794 
795  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
796 
797  double estimateMaxBleed() const;
798 
799  //getters and setters
800  double distanceX() const { return mDistanceX; }
801  void setDistanceX( double d ) { mDistanceX = d; }
802 
803  double distanceY() const { return mDistanceY; }
804  void setDistanceY( double d ) { mDistanceY = d; }
805 
806  double displacementX() const { return mDisplacementX; }
807  void setDisplacementX( double d ) { mDisplacementX = d; }
808 
809  double displacementY() const { return mDisplacementY; }
810  void setDisplacementY( double d ) { mDisplacementY = d; }
811 
812  bool setSubSymbol( QgsSymbolV2* symbol );
813  virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; }
814 
815  void setDistanceXUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceXUnit = unit; }
816  QgsSymbolV2::OutputUnit distanceXUnit() const { return mDistanceXUnit; }
817 
818  void setDistanceXMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceXMapUnitScale = scale; }
819  const QgsMapUnitScale& distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
820 
821  void setDistanceYUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceYUnit = unit; }
822  QgsSymbolV2::OutputUnit distanceYUnit() const { return mDistanceYUnit; }
823 
824  void setDistanceYMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceYMapUnitScale = scale; }
825  const QgsMapUnitScale& distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
826 
827  void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementXUnit = unit; }
828  QgsSymbolV2::OutputUnit displacementXUnit() const { return mDisplacementXUnit; }
829 
830  void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementXMapUnitScale = scale; }
831  const QgsMapUnitScale& displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
832 
833  void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementYUnit = unit; }
834  QgsSymbolV2::OutputUnit displacementYUnit() const { return mDisplacementYUnit; }
835 
836  void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementYMapUnitScale = scale; }
837  const QgsMapUnitScale& displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
838 
841 
842  void setMapUnitScale( const QgsMapUnitScale &scale );
844 
845  virtual QSet<QString> usedAttributes() const;
846 
847  protected:
849  double mDistanceX;
852  double mDistanceY;
861 
862  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
863 
864  private:
865  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double distanceX, double distanceY,
866  double displacementX, double displacementY );
867 };
868 
870 {
871  public:
874 
875  // static stuff
876 
877  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
878  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
879 
880  // implemented from base classes
881 
882  QString layerType() const;
883 
884  void startRender( QgsSymbolV2RenderContext& context );
885 
886  void stopRender( QgsSymbolV2RenderContext& context );
887 
888  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
889 
890  QgsStringMap properties() const;
891 
892  QgsSymbolLayerV2* clone() const;
893 
894  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
895 
896  void setColor( const QColor& color );
897 
899  bool setSubSymbol( QgsSymbolV2* symbol );
900 
903 
904  void setMapUnitScale( const QgsMapUnitScale &scale );
906 
907  virtual QSet<QString> usedAttributes() const;
908 
909  void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
910  bool pointOnSurface() const { return mPointOnSurface; }
911 
912  protected:
915 };
916 
917 #endif
918 
919 
virtual QSet< QString > usedAttributes() const
Definition: qgssymbollayerv2.cpp:153
QgsMapUnitScale mSvgOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:671
void setBorderWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:102
QgsVectorColorRampV2 * colorRamp()
Color ramp used for the gradient fill, only used if the gradient color type is set to ColorRamp...
Definition: qgsfillsymbollayerv2.h:218
ShapeburstColorType mColorType
Definition: qgsfillsymbollayerv2.h:521
Definition: qgsfillsymbollayerv2.h:155
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgssymbollayerv2.h:101
Definition: qgsfillsymbollayerv2.h:162
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:138
QgsSymbolV2::OutputUnit patternWidthUnit() const
Definition: qgsfillsymbollayerv2.h:632
void setDistanceUnit(QgsSymbolV2::OutputUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary...
Definition: qgsfillsymbollayerv2.h:394
double borderWidth() const
Definition: qgsfillsymbollayerv2.h:90
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
Definition: qgsfillsymbollayerv2.h:378
const QgsMapUnitScale & patternWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:635
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
Definition: qgsfillsymbollayerv2.h:23
QgsVectorColorRampV2 * colorRamp()
Returns the color ramp used for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:440
void setDistance(double d)
Definition: qgsfillsymbollayerv2.h:713
QgsSymbolV2::OutputUnit distanceYUnit() const
Definition: qgsfillsymbollayerv2.h:822
Definition: qgsfillsymbollayerv2.h:869
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayerv2.h:234
QgsSymbolV2::OutputUnit mSvgOutlineWidthUnit
Definition: qgsfillsymbollayerv2.h:670
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:579
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayerv2.h:246
void setSvgOutlineWidth(double w)
Definition: qgsfillsymbollayerv2.h:628
virtual QgsSymbolV2::OutputUnit outputUnit() const
Definition: qgssymbollayerv2.h:99
void setAngle(double angle)
Rotation angle for gradient fill.
Definition: qgsfillsymbollayerv2.h:250
OutputUnit
Definition: qgssymbolv2.h:47
const QgsMapUnitScale & displacementXMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:831
virtual void setOutputUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgssymbollayerv2.h:98
virtual Qt::PenStyle dxfPenStyle() const
Definition: qgssymbollayerv2.cpp:116
double ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
Definition: qgsfillsymbollayerv2.h:469
void setMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.cpp:1589
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:512
void setOutputUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.cpp:1579
virtual QgsSymbolLayerV2 * clone() const =0
virtual double dxfWidth(const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
Definition: qgssymbollayerv2.cpp:97
QgsSymbolV2::OutputUnit mLineWidthUnit
Definition: qgsfillsymbollayerv2.h:756
double mDistanceX
Definition: qgsfillsymbollayerv2.h:849
void setCoordinateMode(GradientCoordinateMode coordinateMode)
Definition: qgsfillsymbollayerv2.h:227
const QgsMapUnitScale & lineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:732
QgsSymbolV2::OutputUnit distanceXUnit() const
Definition: qgsfillsymbollayerv2.h:816
ShapeburstColorType
Definition: qgsfillsymbollayerv2.h:310
QgsMapUnitScale mLineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:757
void setSvgFillColor(const QColor &c)
Definition: qgsfillsymbollayerv2.h:624
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:634
bool mReferencePoint1IsCentroid
Definition: qgsfillsymbollayerv2.h:282
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:735
void setDistanceYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:821
virtual QgsSymbolV2 * subSymbol()
Definition: qgsfillsymbollayerv2.h:813
QString svgFilePath() const
Definition: qgsfillsymbollayerv2.h:620
double distanceX() const
Definition: qgsfillsymbollayerv2.h:800
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:287
virtual void applyDataDefinedSettings(const QgsSymbolV2RenderContext &context)
Definition: qgsfillsymbollayerv2.h:590
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:105
void setOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:563
QPointF referencePoint2() const
Definition: qgsfillsymbollayerv2.h:243
Definition: qgsfillsymbollayerv2.h:685
double displacementX() const
Definition: qgsfillsymbollayerv2.h:806
double svgOutlineWidth() const
Definition: qgsfillsymbollayerv2.h:629
Definition: qgsfillsymbollayerv2.h:174
Base class for polygon renderers generating texture images.
Definition: qgsfillsymbollayerv2.h:550
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:289
QgsMapUnitScale mPatternWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:653
GradientCoordinateMode mCoordinateMode
Definition: qgsfillsymbollayerv2.h:278
void setPointOnSurface(bool pointOnSurface)
Definition: qgsfillsymbollayerv2.h:909
QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:638
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:403
void setColor2(QColor color2)
Sets the color for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:448
QgsSymbolV2::OutputUnit outputUnit() const
Definition: qgsfillsymbollayerv2.cpp:1584
double mDisplacementX
Definition: qgsfillsymbollayerv2.h:855
Definition: qgsfillsymbollayerv2.h:161
double mDistanceY
Definition: qgsfillsymbollayerv2.h:852
bool referencePoint2IsCentroid() const
Definition: qgsfillsymbollayerv2.h:247
QgsMapUnitScale mOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:585
Definition: qgssymbollayerv2.h:296
GradientType mGradientType
Definition: qgsfillsymbollayerv2.h:277
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient.
Definition: qgsfillsymbollayerv2.h:226
virtual void renderPolygon(const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)=0
QgsSymbolV2::OutputUnit mDisplacementXUnit
Definition: qgsfillsymbollayerv2.h:856
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:818
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
Definition: qgsfillsymbollayerv2.h:353
Definition: qgssymbollayerv2.h:45
QColor mColor2
Definition: qgsfillsymbollayerv2.h:275
double useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
Definition: qgsfillsymbollayerv2.h:369
double angle() const
Definition: qgsfillsymbollayerv2.h:251
double offset() const
Definition: qgsfillsymbollayerv2.h:720
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:511
double mDistance
Distance (in mm or map units) between lines.
Definition: qgsfillsymbollayerv2.h:751
void setBorderColor(QColor borderColor)
Definition: qgsfillsymbollayerv2.h:71
QColor fillColor() const
Get fill color.
Definition: qgsfillsymbollayerv2.h:82
const QgsMapUnitScale & outlineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:564
void setSvgOutlineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:637
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:140
double mLineAngle
Vector line angle in degrees (0 = horizontal, counterclockwise)
Definition: qgsfillsymbollayerv2.h:760
GradientSpread mGradientSpread
Definition: qgsfillsymbollayerv2.h:279
const QgsMapUnitScale & borderWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:103
QgsMapUnitScale mDistanceYMapUnitScale
Definition: qgsfillsymbollayerv2.h:854
double mBorderWidth
Definition: qgsfillsymbollayerv2.h:131
QgsVectorColorRampV2 * mGradientRamp
Definition: qgsfillsymbollayerv2.h:276
QMap< QString, QString > QgsStringMap
Definition: qgis.h:416
double mNextAngle
Definition: qgsfillsymbollayerv2.h:580
void setFillColor(const QColor &color)
Set fill color.
Definition: qgsfillsymbollayerv2.h:85
void setPatternWidth(double width)
Definition: qgsfillsymbollayerv2.h:621
QgsSymbolV2::OutputUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:499
virtual double estimateMaxBleed() const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape...
Definition: qgssymbollayerv2.h:96
void setSvgOutlineColor(const QColor &c)
Definition: qgsfillsymbollayerv2.h:626
double mAngle
Definition: qgssymbollayerv2.h:311
virtual void startRender(QgsSymbolV2RenderContext &context)=0
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:261
bool mUseWholeShape
Definition: qgsfillsymbollayerv2.h:516
virtual QgsSymbolV2 * subSymbol()
Definition: qgsfillsymbollayerv2.h:557
void setDistanceUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:722
QgsMapUnitScale mDisplacementYMapUnitScale
Definition: qgsfillsymbollayerv2.h:860
QColor mSvgOutlineColor
Definition: qgsfillsymbollayerv2.h:668
void setGradientType(GradientType gradientType)
Definition: qgsfillsymbollayerv2.h:211
Definition: qgsfillsymbollayerv2.h:312
QgsSymbolV2::OutputUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary...
Definition: qgsfillsymbollayerv2.h:401
QgsSymbolV2::OutputUnit mDisplacementYUnit
Definition: qgsfillsymbollayerv2.h:859
void setLineAngle(double a)
Definition: qgsfillsymbollayerv2.h:711
Definition: qgsfillsymbollayerv2.h:175
virtual void toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props) const
Definition: qgssymbollayerv2.h:74
#define DEFAULT_SIMPLEFILL_BORDERSTYLE
Definition: qgsfillsymbollayerv2.h:24
bool mReferencePoint2IsCentroid
Definition: qgsfillsymbollayerv2.h:284
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:477
QByteArray mSvgData
SVG data.
Definition: qgsfillsymbollayerv2.h:656
Qt::PenStyle borderStyle() const
Definition: qgsfillsymbollayerv2.h:87
QColor color() const
Definition: qgsfillsymbollayerv2.h:718
Definition: qgsfillsymbollayerv2.h:33
void setOutlineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:560
QgsLineSymbolV2 * mOutline
Custom outline.
Definition: qgsfillsymbollayerv2.h:588
#define DEFAULT_SIMPLEFILL_STYLE
Definition: qgsfillsymbollayerv2.h:22
QgsMapUnitScale mDistanceXMapUnitScale
Definition: qgsfillsymbollayerv2.h:851
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:127
double mOffset
Offset perpendicular to line direction.
Definition: qgsfillsymbollayerv2.h:762
void setPenJoinStyle(Qt::PenJoinStyle style)
Definition: qgsfillsymbollayerv2.h:94
QgsMapUnitScale mDistanceMapUnitScale
Definition: qgsfillsymbollayerv2.h:519
void setBrushStyle(Qt::BrushStyle style)
Definition: qgsfillsymbollayerv2.h:68
GradientSpread
Definition: qgsfillsymbollayerv2.h:172
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayerv2.h:238
QgsVectorColorRampV2 * mTwoColorGradientRamp
Definition: qgsfillsymbollayerv2.h:524
Definition: qgssymbolv2.h:256
void setLineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:728
GradientCoordinateMode
Definition: qgsfillsymbollayerv2.h:166
void setBlurRadius(int blurRadius)
Sets the blur radius, which controls the amount of blurring applied to the fill.
Definition: qgsfillsymbollayerv2.h:347
double lineAngle() const
Definition: qgsfillsymbollayerv2.h:712
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:738
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:734
QgsMarkerSymbolV2 * mMarker
Definition: qgsfillsymbollayerv2.h:913
QPointF offset() const
Returns the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:484
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:501
const QgsMapUnitScale & distanceXMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:819
double lineWidth() const
Definition: qgsfillsymbollayerv2.h:716
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:824
Qt::PenStyle mBorderStyle
Definition: qgsfillsymbollayerv2.h:130
QColor svgFillColor() const
Definition: qgsfillsymbollayerv2.h:625
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:764
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:529
QgsSymbolV2::OutputUnit distanceUnit() const
Definition: qgsfillsymbollayerv2.h:723
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:425
virtual QgsStringMap properties() const =0
double mAngle
Definition: qgsfillsymbollayerv2.h:285
double patternWidth() const
Definition: qgsfillsymbollayerv2.h:622
QgsSymbolV2::OutputUnit borderWidthUnit() const
Definition: qgsfillsymbollayerv2.h:100
virtual QColor color() const
Definition: qgssymbollayerv2.h:50
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:271
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
Definition: qgsfillsymbollayerv2.h:214
Definition: qgsfillsymbollayerv2.h:306
void setDisplacementXUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:827
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:530
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:763
QgsMapUnitScale mDisplacementXMapUnitScale
Definition: qgsfillsymbollayerv2.h:857
void setBorderWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:99
QColor mColor
Definition: qgsfillsymbollayerv2.h:758
double mDisplacementY
Definition: qgsfillsymbollayerv2.h:858
virtual QColor dxfBrushColor(const QgsSymbolV2RenderContext &context) const
Definition: qgssymbollayerv2.cpp:121
Definition: qgssymbolv2.h:43
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:731
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:830
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:139
bool mIgnoreRings
Definition: qgsfillsymbollayerv2.h:526
QPointF referencePoint1() const
Definition: qgsfillsymbollayerv2.h:235
QString mSvgFilePath
Path to the svg file (or empty if constructed directly from data)
Definition: qgsfillsymbollayerv2.h:658
const QgsMapUnitScale & displacementYMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:837
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:288
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:126
virtual QColor dxfColor(const QgsSymbolV2RenderContext &context) const
Definition: qgssymbollayerv2.cpp:104
QgsSymbolV2::OutputUnit mOutlineWidthUnit
Definition: qgsfillsymbollayerv2.h:584
double mOutlineWidth
Outline width.
Definition: qgsfillsymbollayerv2.h:583
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:415
void setDistanceXUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:815
double mLineWidth
Line width (in mm or map units)
Definition: qgsfillsymbollayerv2.h:755
QgsVectorColorRampV2 * mGradientRamp
Definition: qgsfillsymbollayerv2.h:523
QColor svgOutlineColor() const
Definition: qgsfillsymbollayerv2.h:627
GradientSpread gradientSpread() const
Gradient spread mode.
Definition: qgsfillsymbollayerv2.h:230
QColor mBorderColor
Definition: qgsfillsymbollayerv2.h:129
const QgsMapUnitScale & distanceMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:404
QPointF mReferencePoint2
Definition: qgsfillsymbollayerv2.h:283
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:272
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:455
virtual bool setSubSymbol(QgsSymbolV2 *symbol)
Definition: qgsfillsymbollayerv2.cpp:1552
void setOffset(QPointF offset)
Offset for gradient fill.
Definition: qgsfillsymbollayerv2.h:254
virtual QString layerType() const =0
void setDisplacementY(double d)
Definition: qgsfillsymbollayerv2.h:810
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Sets the units used for the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:492
QgsSymbolV2::OutputUnit mDistanceYUnit
Definition: qgsfillsymbollayerv2.h:853
bool pointOnSurface() const
Definition: qgsfillsymbollayerv2.h:910
Definition: qgsfillsymbollayerv2.h:168
virtual QgsSymbolV2 * subSymbol()
Definition: qgssymbollayerv2.h:83
Definition: qgssymbolv2.h:229
void setOffset(QPointF offset)
Definition: qgsfillsymbollayerv2.h:96
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:109
bool mPointOnSurface
Definition: qgsfillsymbollayerv2.h:914
Qt::PenJoinStyle mPenJoinStyle
Definition: qgsfillsymbollayerv2.h:134
QgsSymbolV2::OutputUnit lineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:729
A class for svg fill patterns.
Definition: qgsfillsymbollayerv2.h:595
double widthScaleFactor
Definition: qgssvgcache.cpp:79
virtual Qt::BrushStyle dxfBrushStyle() const
Definition: qgssymbollayerv2.cpp:127
const QgsMapUnitScale & distanceMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:726
void setGradientColorType(GradientColorType gradientColorType)
Definition: qgsfillsymbollayerv2.h:215
Qt::BrushStyle mBrushStyle
Definition: qgsfillsymbollayerv2.h:128
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
Definition: qgsfillsymbollayerv2.h:222
QgsMapUnitScale mBorderWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:133
int mBlurRadius
Definition: qgsfillsymbollayerv2.h:514
QColor mSvgFillColor
Definition: qgsfillsymbollayerv2.h:667
GradientColorType mGradientColorType
Definition: qgsfillsymbollayerv2.h:274
Definition: qgsmapunitscale.h:24
QgsSymbolV2::OutputUnit mDistanceXUnit
Definition: qgsfillsymbollayerv2.h:850
QgsMapUnitScale mDistanceMapUnitScale
Definition: qgsfillsymbollayerv2.h:753
void setDisplacementYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:833
const QgsMapUnitScale & distanceYMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:825
QPointF offset()
Definition: qgsfillsymbollayerv2.h:97
QgsSymbolV2::OutputUnit displacementYUnit() const
Definition: qgsfillsymbollayerv2.h:834
bool referencePoint1IsCentroid() const
Definition: qgsfillsymbollayerv2.h:239
double distanceY() const
Definition: qgsfillsymbollayerv2.h:803
QgsSymbolV2::OutputUnit mBorderWidthUnit
Definition: qgsfillsymbollayerv2.h:132
Qt::PenJoinStyle penJoinStyle() const
Definition: qgsfillsymbollayerv2.h:93
GradientColorType
Definition: qgsfillsymbollayerv2.h:153
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:262
Definition: qgsfillsymbollayerv2.h:149
QgsSymbolV2::OutputUnit mDistanceUnit
Definition: qgsfillsymbollayerv2.h:752
virtual QgsMapUnitScale mapUnitScale() const
Definition: qgssymbollayerv2.h:102
void setDistanceY(double d)
Definition: qgsfillsymbollayerv2.h:804
double mMaxDistance
Definition: qgsfillsymbollayerv2.h:517
QgsMarkerSymbolV2 * mMarkerSymbol
Definition: qgsfillsymbollayerv2.h:848
QgsMapUnitScale mapUnitScale() const
Definition: qgsfillsymbollayerv2.cpp:1594
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:836
void setOutlineColor(const QColor &color)
Set outline color.
Definition: qgsfillsymbollayerv2.h:78
virtual void setColor(const QColor &color)
Definition: qgssymbollayerv2.h:51
GradientType gradientType() const
Type of gradient, eg linear or radial.
Definition: qgsfillsymbollayerv2.h:210
QColor borderColor() const
Definition: qgsfillsymbollayerv2.h:70
void setDistanceX(double d)
Definition: qgsfillsymbollayerv2.h:801
QgsSymbolV2::OutputUnit outlineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:561
QPen mSelPen
Definition: qgsfillsymbollayerv2.h:136
void setUseWholeShape(double useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
Definition: qgsfillsymbollayerv2.h:362
double distance() const
Definition: qgsfillsymbollayerv2.h:714
QgsSymbolV2::OutputUnit mDistanceUnit
Definition: qgsfillsymbollayerv2.h:518
QColor mColor
Definition: qgssymbollayerv2.h:140
Definition: qgssymbolv2.h:167
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:108
QColor outlineColor() const
Get outline color.
Definition: qgsfillsymbollayerv2.h:75
virtual double estimateMaxBleed() const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape...
Definition: qgsfillsymbollayerv2.cpp:1599
QPointF offset() const
Definition: qgsfillsymbollayerv2.h:255
QPointF mReferencePoint1
Definition: qgsfillsymbollayerv2.h:281
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:528
void setOffset(double offset)
Definition: qgsfillsymbollayerv2.h:719
void setPatternWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:631
QgsSymbolV2::OutputUnit displacementXUnit() const
Definition: qgsfillsymbollayerv2.h:828
void setGradientSpread(GradientSpread gradientSpread)
Definition: qgsfillsymbollayerv2.h:231
QgsSymbolV2::OutputUnit mPatternWidthUnit
Definition: qgsfillsymbollayerv2.h:652
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:106
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:737
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayerv2.h:242
Definition: qgsvectorcolorrampv2.h:25
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:502
void setBorderWidth(double borderWidth)
Definition: qgsfillsymbollayerv2.h:91
const QgsMapUnitScale & svgOutlineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:641
#define DEFAULT_SIMPLEFILL_JOINSTYLE
Definition: qgsfillsymbollayerv2.h:26
void setDisplacementX(double d)
Definition: qgsfillsymbollayerv2.h:807
virtual bool setSubSymbol(QgsSymbolV2 *symbol)
Definition: qgssymbollayerv2.h:85
virtual void stopRender(QgsSymbolV2RenderContext &context)=0
GradientType
Definition: qgsfillsymbollayerv2.h:159
double angle() const
Definition: qgssymbollayerv2.h:304
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
Definition: qgssymbollayerv2.h:77
double displacementY() const
Definition: qgsfillsymbollayerv2.h:809
Qt::BrushStyle brushStyle() const
Definition: qgsfillsymbollayerv2.h:67
double mSvgOutlineWidth
Definition: qgsfillsymbollayerv2.h:669
QPen mPen
Definition: qgsfillsymbollayerv2.h:135
QColor mColor2
Definition: qgsfillsymbollayerv2.h:522
Definition: qgsdxfexport.h:32
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:725
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
Definition: qgsfillsymbollayerv2.h:25
Definition: qgsfillsymbollayerv2.h:776
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Units for gradient fill offset.
Definition: qgsfillsymbollayerv2.h:258
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:259
QRectF mSvgViewBox
SVG view box (to keep the aspect ratio.
Definition: qgsfillsymbollayerv2.h:660
void setIgnoreRings(double ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading...
Definition: qgsfillsymbollayerv2.h:463
QImage * mSvgPattern
SVG pattern image.
Definition: qgsfillsymbollayerv2.h:663
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
Definition: qgsfillsymbollayerv2.h:386
void setSvgOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:640
double mPatternWidth
Width of the pattern (in output units)
Definition: qgsfillsymbollayerv2.h:651
#define DEFAULT_SIMPLEFILL_COLOR
Definition: qgsfillsymbollayerv2.h:21
void setColor2(QColor color2)
Definition: qgsfillsymbollayerv2.h:223
void setBorderStyle(Qt::PenStyle borderStyle)
Definition: qgsfillsymbollayerv2.h:88