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;
662  QImage* mSvgPattern;
663 
664  //param(fill), param(outline), param(outline-width) are going
665  //to be replaced in memory
671 
672  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
673 
674  private:
676  void storeViewBox();
677  void setDefaultSvgParams(); //fills mSvgFillColor, mSvgOutlineColor, mSvgOutlineWidth with default values for mSvgFilePath
678 
680  void applyPattern( QBrush& brush, const QString& svgFilePath, double patternWidth, QgsSymbolV2::OutputUnit patternWidthUnit, const QColor& svgFillColor, const QColor& svgOutlineColor,
681  double svgOutlineWidth, QgsSymbolV2::OutputUnit svgOutlineWidthUnit, const QgsSymbolV2RenderContext& context, const QgsMapUnitScale& patternWidthMapUnitScale, const QgsMapUnitScale &svgOutlineWidthMapUnitScale );
682 };
683 
685 {
686  public:
689 
690  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
691  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
692 
693  QString layerType() const;
694 
695  void startRender( QgsSymbolV2RenderContext& context );
696 
697  void stopRender( QgsSymbolV2RenderContext& context );
698 
699  QgsStringMap properties() const;
700 
701  QgsSymbolLayerV2* clone() const;
702 
703  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
704 
705  double estimateMaxBleed() const;
706 
707  QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
708 
709  //getters and setters
710  void setLineAngle( double a ) { mLineAngle = a; }
711  double lineAngle() const { return mLineAngle; }
712  void setDistance( double d ) { mDistance = d; }
713  double distance() const { return mDistance; }
714  void setLineWidth( double w );
715  double lineWidth() const { return mLineWidth; }
716  void setColor( const QColor& c );
717  QColor color() const { return mColor; }
718  void setOffset( double offset ) { mOffset = offset; }
719  double offset() const { return mOffset; }
720 
721  void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
722  QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
723 
724  void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
725  const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }
726 
727  void setLineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mLineWidthUnit = unit; }
728  QgsSymbolV2::OutputUnit lineWidthUnit() const { return mLineWidthUnit; }
729 
730  void setLineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mLineWidthMapUnitScale = scale; }
731  const QgsMapUnitScale& lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
732 
733  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
734  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
735 
736  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
737  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
738 
741 
742  void setMapUnitScale( const QgsMapUnitScale& scale );
744 
745  bool setSubSymbol( QgsSymbolV2* symbol );
747 
748  protected:
750  double mDistance;
754  double mLineWidth;
757  QColor mColor;
759  double mLineAngle;
761  double mOffset;
764 
765  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
766 
767  private:
769  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double lineAngle, double distance, double lineWidth, const QColor& color );
770 
772  QgsLineSymbolV2* mFillLineSymbol;
773 };
774 
776 {
777  public:
780 
781  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
782  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
783 
784  QString layerType() const;
785 
786  void startRender( QgsSymbolV2RenderContext& context );
787 
788  void stopRender( QgsSymbolV2RenderContext& context );
789 
790  QgsStringMap properties() const;
791 
792  QgsSymbolLayerV2* clone() const;
793 
794  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
795 
796  double estimateMaxBleed() const;
797 
798  //getters and setters
799  double distanceX() const { return mDistanceX; }
800  void setDistanceX( double d ) { mDistanceX = d; }
801 
802  double distanceY() const { return mDistanceY; }
803  void setDistanceY( double d ) { mDistanceY = d; }
804 
805  double displacementX() const { return mDisplacementX; }
806  void setDisplacementX( double d ) { mDisplacementX = d; }
807 
808  double displacementY() const { return mDisplacementY; }
809  void setDisplacementY( double d ) { mDisplacementY = d; }
810 
811  bool setSubSymbol( QgsSymbolV2* symbol );
812  virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; }
813 
814  void setDistanceXUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceXUnit = unit; }
815  QgsSymbolV2::OutputUnit distanceXUnit() const { return mDistanceXUnit; }
816 
817  void setDistanceXMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceXMapUnitScale = scale; }
818  const QgsMapUnitScale& distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
819 
820  void setDistanceYUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceYUnit = unit; }
821  QgsSymbolV2::OutputUnit distanceYUnit() const { return mDistanceYUnit; }
822 
823  void setDistanceYMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceYMapUnitScale = scale; }
824  const QgsMapUnitScale& distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
825 
826  void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementXUnit = unit; }
827  QgsSymbolV2::OutputUnit displacementXUnit() const { return mDisplacementXUnit; }
828 
829  void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementXMapUnitScale = scale; }
830  const QgsMapUnitScale& displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
831 
832  void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementYUnit = unit; }
833  QgsSymbolV2::OutputUnit displacementYUnit() const { return mDisplacementYUnit; }
834 
835  void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementYMapUnitScale = scale; }
836  const QgsMapUnitScale& displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
837 
840 
841  void setMapUnitScale( const QgsMapUnitScale &scale );
843 
844  virtual QSet<QString> usedAttributes() const;
845 
846  protected:
848  double mDistanceX;
851  double mDistanceY;
860 
861  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
862 
863  private:
864  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double distanceX, double distanceY,
865  double displacementX, double displacementY );
866 };
867 
869 {
870  public:
873 
874  // static stuff
875 
876  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
877  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
878 
879  // implemented from base classes
880 
881  QString layerType() const;
882 
883  void startRender( QgsSymbolV2RenderContext& context );
884 
885  void stopRender( QgsSymbolV2RenderContext& context );
886 
887  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
888 
889  QgsStringMap properties() const;
890 
891  QgsSymbolLayerV2* clone() const;
892 
893  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
894 
895  void setColor( const QColor& color );
896 
898  bool setSubSymbol( QgsSymbolV2* symbol );
899 
902 
903  void setMapUnitScale( const QgsMapUnitScale &scale );
905 
906  virtual QSet<QString> usedAttributes() const;
907 
908  void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
909  bool pointOnSurface() const { return mPointOnSurface; }
910 
911  protected:
914 };
915 
916 #endif
917 
918 
virtual QSet< QString > usedAttributes() const
Definition: qgssymbollayerv2.cpp:153
QgsMapUnitScale mSvgOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:670
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:712
QgsSymbolV2::OutputUnit distanceYUnit() const
Definition: qgsfillsymbollayerv2.h:821
Definition: qgsfillsymbollayerv2.h:868
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:669
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:830
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:755
double mDistanceX
Definition: qgsfillsymbollayerv2.h:848
void setCoordinateMode(GradientCoordinateMode coordinateMode)
Definition: qgsfillsymbollayerv2.h:227
const QgsMapUnitScale & lineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:731
QgsSymbolV2::OutputUnit distanceXUnit() const
Definition: qgsfillsymbollayerv2.h:815
ShapeburstColorType
Definition: qgsfillsymbollayerv2.h:310
QgsMapUnitScale mLineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:756
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:734
void setDistanceYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:820
virtual QgsSymbolV2 * subSymbol()
Definition: qgsfillsymbollayerv2.h:812
QString svgFilePath() const
Definition: qgsfillsymbollayerv2.h:620
double distanceX() const
Definition: qgsfillsymbollayerv2.h:799
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:684
double displacementX() const
Definition: qgsfillsymbollayerv2.h:805
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:908
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:854
Definition: qgsfillsymbollayerv2.h:161
double mDistanceY
Definition: qgsfillsymbollayerv2.h:851
bool referencePoint2IsCentroid() const
Definition: qgsfillsymbollayerv2.h:247
QgsMapUnitScale mOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:585
Definition: qgssymbollayerv2.h:295
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:855
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:817
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:719
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:511
double mDistance
Distance (in mm or map units) between lines.
Definition: qgsfillsymbollayerv2.h:750
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:759
GradientSpread mGradientSpread
Definition: qgsfillsymbollayerv2.h:279
const QgsMapUnitScale & borderWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:103
QgsMapUnitScale mDistanceYMapUnitScale
Definition: qgsfillsymbollayerv2.h:853
double mBorderWidth
Definition: qgsfillsymbollayerv2.h:131
QgsVectorColorRampV2 * mGradientRamp
Definition: qgsfillsymbollayerv2.h:276
QMap< QString, QString > QgsStringMap
Definition: qgis.h:412
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:310
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:721
QgsMapUnitScale mDisplacementYMapUnitScale
Definition: qgsfillsymbollayerv2.h:859
QColor mSvgOutlineColor
Definition: qgsfillsymbollayerv2.h:667
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:858
void setLineAngle(double a)
Definition: qgsfillsymbollayerv2.h:710
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:717
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:850
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:127
double mOffset
Offset perpendicular to line direction.
Definition: qgsfillsymbollayerv2.h:761
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:249
void setLineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:727
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:711
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:737
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:733
QgsMarkerSymbolV2 * mMarker
Definition: qgsfillsymbollayerv2.h:912
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:818
double lineWidth() const
Definition: qgsfillsymbollayerv2.h:715
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:823
Qt::PenStyle mBorderStyle
Definition: qgsfillsymbollayerv2.h:130
QColor svgFillColor() const
Definition: qgsfillsymbollayerv2.h:625
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:763
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:529
QgsSymbolV2::OutputUnit distanceUnit() const
Definition: qgsfillsymbollayerv2.h:722
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:826
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:530
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:762
QgsMapUnitScale mDisplacementXMapUnitScale
Definition: qgsfillsymbollayerv2.h:856
void setBorderWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:99
QColor mColor
Definition: qgsfillsymbollayerv2.h:757
double mDisplacementY
Definition: qgsfillsymbollayerv2.h:857
virtual QColor dxfBrushColor(const QgsSymbolV2RenderContext &context) const
Definition: qgssymbollayerv2.cpp:121
Definition: qgssymbolv2.h:43
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:730
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:829
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:836
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:814
double mLineWidth
Line width (in mm or map units)
Definition: qgsfillsymbollayerv2.h:754
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:809
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:852
bool pointOnSurface() const
Definition: qgsfillsymbollayerv2.h:909
Definition: qgsfillsymbollayerv2.h:168
virtual QgsSymbolV2 * subSymbol()
Definition: qgssymbollayerv2.h:83
Definition: qgssymbolv2.h:223
void setOffset(QPointF offset)
Definition: qgsfillsymbollayerv2.h:96
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:109
bool mPointOnSurface
Definition: qgsfillsymbollayerv2.h:913
Qt::PenJoinStyle mPenJoinStyle
Definition: qgsfillsymbollayerv2.h:134
QgsSymbolV2::OutputUnit lineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:728
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:725
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:666
GradientColorType mGradientColorType
Definition: qgsfillsymbollayerv2.h:274
Definition: qgsmapunitscale.h:24
QgsSymbolV2::OutputUnit mDistanceXUnit
Definition: qgsfillsymbollayerv2.h:849
QgsMapUnitScale mDistanceMapUnitScale
Definition: qgsfillsymbollayerv2.h:752
void setDisplacementYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:832
const QgsMapUnitScale & distanceYMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:824
QPointF offset()
Definition: qgsfillsymbollayerv2.h:97
QgsSymbolV2::OutputUnit displacementYUnit() const
Definition: qgsfillsymbollayerv2.h:833
bool referencePoint1IsCentroid() const
Definition: qgsfillsymbollayerv2.h:239
double distanceY() const
Definition: qgsfillsymbollayerv2.h:802
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:751
virtual QgsMapUnitScale mapUnitScale() const
Definition: qgssymbollayerv2.h:102
void setDistanceY(double d)
Definition: qgsfillsymbollayerv2.h:803
double mMaxDistance
Definition: qgsfillsymbollayerv2.h:517
QgsMarkerSymbolV2 * mMarkerSymbol
Definition: qgsfillsymbollayerv2.h:847
QgsMapUnitScale mapUnitScale() const
Definition: qgsfillsymbollayerv2.cpp:1594
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:835
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:800
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:713
QgsSymbolV2::OutputUnit mDistanceUnit
Definition: qgsfillsymbollayerv2.h:518
QColor mColor
Definition: qgssymbollayerv2.h:140
Definition: qgssymbolv2.h:163
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:718
void setPatternWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:631
QgsSymbolV2::OutputUnit displacementXUnit() const
Definition: qgsfillsymbollayerv2.h:827
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:736
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:806
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:303
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
Definition: qgssymbollayerv2.h:77
double displacementY() const
Definition: qgsfillsymbollayerv2.h:808
Qt::BrushStyle brushStyle() const
Definition: qgsfillsymbollayerv2.h:67
double mSvgOutlineWidth
Definition: qgsfillsymbollayerv2.h:668
QPen mPen
Definition: qgsfillsymbollayerv2.h:135
QColor mColor2
Definition: qgsfillsymbollayerv2.h:522
Definition: qgsdxfexport.h:32
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:724
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
Definition: qgsfillsymbollayerv2.h:25
Definition: qgsfillsymbollayerv2.h:775
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:662
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