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 
123  protected:
124  QBrush mBrush;
125  QBrush mSelBrush;
126  Qt::BrushStyle mBrushStyle;
127  QColor mBorderColor;
128  Qt::PenStyle mBorderStyle;
129  double mBorderWidth;
132  Qt::PenJoinStyle mPenJoinStyle;
133  QPen mPen;
134  QPen mSelPen;
135 
136  QPointF mOffset;
139 
140  private:
141  //helper functions for data defined symbology
142  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QBrush& brush, QPen& pen, QPen& selPen );
143 };
144 
146 
148 {
149  public:
150 
152  {
154  ColorRamp
155  };
156 
158  {
161  Conical
162  };
163 
165  {
167  Viewport
168  };
169 
171  {
174  Repeat
175  };
176 
178  QColor color2 = Qt::white,
179  GradientColorType gradientColorType = SimpleTwoColor,
180  GradientType gradientType = Linear,
181  GradientCoordinateMode coordinateMode = Feature,
182  GradientSpread gradientSpread = Pad
183  );
184 
185  virtual ~QgsGradientFillSymbolLayerV2();
186 
187  // static stuff
188 
189  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
190 
191  // implemented from base classes
192 
193  QString layerType() const;
194 
195  void startRender( QgsSymbolV2RenderContext& context );
196 
197  void stopRender( QgsSymbolV2RenderContext& context );
198 
199  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
200 
201  QgsStringMap properties() const;
202 
203  QgsSymbolLayerV2* clone() const;
204 
205  double estimateMaxBleed() const;
206 
208  GradientType gradientType() const { return mGradientType; }
209  void setGradientType( GradientType gradientType ) { mGradientType = gradientType; }
210 
212  GradientColorType gradientColorType() const { return mGradientColorType; }
213  void setGradientColorType( GradientColorType gradientColorType ) { mGradientColorType = gradientColorType; }
214 
216  QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
217  void setColorRamp( QgsVectorColorRampV2* ramp );
218 
220  QColor color2() const { return mColor2; }
221  void setColor2( QColor color2 ) { mColor2 = color2; }
222 
224  GradientCoordinateMode coordinateMode() const { return mCoordinateMode; }
225  void setCoordinateMode( GradientCoordinateMode coordinateMode ) { mCoordinateMode = coordinateMode; }
226 
228  GradientSpread gradientSpread() const { return mGradientSpread; }
229  void setGradientSpread( GradientSpread gradientSpread ) { mGradientSpread = gradientSpread; }
230 
232  void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = referencePoint; }
233  QPointF referencePoint1() const { return mReferencePoint1; }
234 
236  void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1IsCentroid = isCentroid; }
237  bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentroid; }
238 
240  void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = referencePoint; }
241  QPointF referencePoint2() const { return mReferencePoint2; }
242 
244  void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2IsCentroid = isCentroid; }
245  bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentroid; }
246 
248  void setAngle( double angle ) { mAngle = angle; }
249  double angle() const { return mAngle; }
250 
252  void setOffset( QPointF offset ) { mOffset = offset; }
253  QPointF offset() const { return mOffset; }
254 
256  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
257  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
258 
259  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
260  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
261 
264 
265  void setMapUnitScale( const QgsMapUnitScale &scale );
267 
268  protected:
269  QBrush mBrush;
270  QBrush mSelBrush;
271 
273  QColor mColor2;
278 
283  double mAngle;
284 
285  QPointF mOffset;
288 
289  private:
290 
291  //helper functions for data defined symbology
292  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, const QPolygonF& points );
293 
295  void applyGradient( const QgsSymbolV2RenderContext& context, QBrush& brush, const QColor& color, const QColor& color2,
296  const GradientColorType &gradientColorType, QgsVectorColorRampV2 *gradientRamp, const GradientType &gradientType,
297  const GradientCoordinateMode &coordinateMode, const GradientSpread &gradientSpread,
298  const QPointF &referencePoint1, const QPointF &referencePoint2, const double angle );
299 
301  QPointF rotateReferencePoint( const QPointF & refPoint, double angle );
302 };
303 
305 {
306  public:
307 
309  {
311  ColorRamp
312  };
313 
314  QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
315  ShapeburstColorType colorType = SimpleTwoColor,
316  int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
317 
319 
320  // static stuff
321 
322  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
323 
324  // implemented from base classes
325 
326  QString layerType() const;
327 
328  void startRender( QgsSymbolV2RenderContext& context );
329 
330  void stopRender( QgsSymbolV2RenderContext& context );
331 
332  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
333 
334  QgsStringMap properties() const;
335 
336  QgsSymbolLayerV2* clone() const;
337 
338  double estimateMaxBleed() const;
339 
345  void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
351  int blurRadius() const { return mBlurRadius; }
352 
360  void setUseWholeShape( double useWholeShape ) { mUseWholeShape = useWholeShape; }
367  double useWholeShape() const { return mUseWholeShape; }
368 
376  void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance; }
384  double maxDistance() const { return mMaxDistance; }
385 
392  void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
399  QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
400 
401  void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
402  const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }
403 
413  void setColorType( ShapeburstColorType colorType ) { mColorType = colorType; }
423  ShapeburstColorType colorType() const { return mColorType; }
424 
431  void setColorRamp( QgsVectorColorRampV2* ramp );
438  QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
439 
446  void setColor2( QColor color2 ) { mColor2 = color2; }
453  QColor color2() const { return mColor2; }
454 
461  void setIgnoreRings( double ignoreRings ) { mIgnoreRings = ignoreRings; }
467  double ignoreRings() const { return mIgnoreRings; }
468 
475  void setOffset( QPointF offset ) { mOffset = offset; }
482  QPointF offset() const { return mOffset; }
483 
490  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
497  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
498 
499  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
500  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
501 
504 
505  void setMapUnitScale( const QgsMapUnitScale &scale );
507 
508  protected:
509  QBrush mBrush;
510  QBrush mSelBrush;
511 
513 
515  double mMaxDistance;
518 
520  QColor mColor2;
523 
525 
526  QPointF mOffset;
529 
530  private:
531 
532  //helper functions for data defined symbology
533  void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QColor& color, QColor& color2, int& blurRadius, bool& useWholeShape,
534  double& maxDistance , bool &ignoreRings );
535 
536  /* distance transform of a 1d function using squared distance */
537  void distanceTransform1d( double *f, int n, int *v, double *z, double *d );
538  /* distance transform of 2d function using squared distance */
539  void distanceTransform2d( double * im, int width, int height );
540  /* distance transform of a binary QImage */
541  double * distanceTransform( QImage * im );
542 
543  /* fills a QImage with values from an array of doubles containing squared distance transform values */
544  void dtArrayToQImage( double * array, QImage *im, QgsVectorColorRampV2* ramp, double layerAlpha = 1, bool useWholeShape = true, int maxPixelDistance = 0 );
545 };
546 
549 {
550  public:
552  virtual ~QgsImageFillSymbolLayer();
553  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
554 
555  virtual QgsSymbolV2* subSymbol() { return mOutline; }
556  virtual bool setSubSymbol( QgsSymbolV2* symbol );
557 
558  void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidthUnit = unit; }
559  QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidthUnit; }
560 
561  void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOutlineWidthMapUnitScale = scale; }
562  const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutlineWidthMapUnitScale; }
563 
566 
567  void setMapUnitScale( const QgsMapUnitScale& scale );
569 
570  virtual double estimateMaxBleed() const;
571 
572  virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
573  virtual QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
574  virtual Qt::PenStyle dxfPenStyle() const;
575 
576  protected:
577  QBrush mBrush;
578  double mNextAngle; // mAngle / data defined angle
579 
584 
587 
588  virtual void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ) { Q_UNUSED( context ); }
589 };
590 
594 {
595  public:
596  QgsSVGFillSymbolLayer( const QString& svgFilePath = "", double width = 20, double rotation = 0.0 );
597  QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, double rotation = 0.0 );
599 
600  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
601  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
602 
603  // implemented from base classes
604 
605  QString layerType() const;
606 
607  void startRender( QgsSymbolV2RenderContext& context );
608  void stopRender( QgsSymbolV2RenderContext& context );
609 
610  QgsStringMap properties() const;
611 
612  QgsSymbolLayerV2* clone() const;
613 
614  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
615 
616  //getters and setters
617  void setSvgFilePath( const QString& svgPath );
618  QString svgFilePath() const { return mSvgFilePath; }
619  void setPatternWidth( double width ) { mPatternWidth = width;}
620  double patternWidth() const { return mPatternWidth; }
621 
622  void setSvgFillColor( const QColor& c ) { mSvgFillColor = c; }
623  QColor svgFillColor() const { return mSvgFillColor; }
624  void setSvgOutlineColor( const QColor& c ) { mSvgOutlineColor = c; }
625  QColor svgOutlineColor() const { return mSvgOutlineColor; }
626  void setSvgOutlineWidth( double w ) { mSvgOutlineWidth = w; }
627  double svgOutlineWidth() const { return mSvgOutlineWidth; }
628 
629  void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit ) { mPatternWidthUnit = unit; }
630  QgsSymbolV2::OutputUnit patternWidthUnit() const { return mPatternWidthUnit; }
631 
632  void setPatternWidthMapUnitScale( const QgsMapUnitScale& scale ) { mPatternWidthMapUnitScale = scale; }
633  const QgsMapUnitScale& patternWidthMapUnitScale() const { return mPatternWidthMapUnitScale; }
634 
635  void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSvgOutlineWidthUnit = unit; }
636  QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const { return mSvgOutlineWidthUnit; }
637 
638  void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mSvgOutlineWidthMapUnitScale = scale; }
639  const QgsMapUnitScale& svgOutlineWidthMapUnitScale() const { return mSvgOutlineWidthMapUnitScale; }
640 
643 
644  void setMapUnitScale( const QgsMapUnitScale &scale );
646 
647  protected:
652 
654  QByteArray mSvgData;
656  QString mSvgFilePath;
658  QRectF mSvgViewBox;
661  QImage* mSvgPattern;
662 
663  //param(fill), param(outline), param(outline-width) are going
664  //to be replaced in memory
670 
671  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
672 
673  private:
675  void storeViewBox();
676  void setDefaultSvgParams(); //fills mSvgFillColor, mSvgOutlineColor, mSvgOutlineWidth with default values for mSvgFilePath
677 
679  void applyPattern( QBrush& brush, const QString& svgFilePath, double patternWidth, QgsSymbolV2::OutputUnit patternWidthUnit, const QColor& svgFillColor, const QColor& svgOutlineColor,
680  double svgOutlineWidth, QgsSymbolV2::OutputUnit svgOutlineWidthUnit, const QgsSymbolV2RenderContext& context, const QgsMapUnitScale& patternWidthMapUnitScale , const QgsMapUnitScale &svgOutlineWidthMapUnitScale );
681 };
682 
684 {
685  public:
688 
689  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
690  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
691 
692  QString layerType() const;
693 
694  void startRender( QgsSymbolV2RenderContext& context );
695 
696  void stopRender( QgsSymbolV2RenderContext& context );
697 
698  QgsStringMap properties() const;
699 
700  QgsSymbolLayerV2* clone() const;
701 
702  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
703 
704  double estimateMaxBleed() const;
705 
706  QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
707 
708  //getters and setters
709  void setLineAngle( double a ) { mLineAngle = a; }
710  double lineAngle() const { return mLineAngle; }
711  void setDistance( double d ) { mDistance = d; }
712  double distance() const { return mDistance; }
713  void setLineWidth( double w );
714  double lineWidth() const { return mLineWidth; }
715  void setColor( const QColor& c );
716  QColor color() const { return mColor; }
717  void setOffset( double offset ) { mOffset = offset; }
718  double offset() const { return mOffset; }
719 
720  void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
721  QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
722 
723  void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
724  const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }
725 
726  void setLineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mLineWidthUnit = unit; }
727  QgsSymbolV2::OutputUnit lineWidthUnit() const { return mLineWidthUnit; }
728 
729  void setLineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mLineWidthMapUnitScale = scale; }
730  const QgsMapUnitScale& lineWidthMapUnitScale() const { return mLineWidthMapUnitScale; }
731 
732  void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit; }
733  QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
734 
735  void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMapUnitScale = scale; }
736  const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUnitScale; }
737 
740 
741  void setMapUnitScale( const QgsMapUnitScale& scale );
743 
744  bool setSubSymbol( QgsSymbolV2* symbol );
746 
747  protected:
749  double mDistance;
753  double mLineWidth;
756  QColor mColor;
758  double mLineAngle;
760  double mOffset;
763 
764  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
765 
766  private:
768  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double lineAngle, double distance, double lineWidth, const QColor& color );
769 
771  QgsLineSymbolV2* mFillLineSymbol;
772 };
773 
775 {
776  public:
779 
780  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
781  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
782 
783  QString layerType() const;
784 
785  void startRender( QgsSymbolV2RenderContext& context );
786 
787  void stopRender( QgsSymbolV2RenderContext& context );
788 
789  QgsStringMap properties() const;
790 
791  QgsSymbolLayerV2* clone() const;
792 
793  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
794 
795  double estimateMaxBleed() const;
796 
797  //getters and setters
798  double distanceX() const { return mDistanceX; }
799  void setDistanceX( double d ) { mDistanceX = d; }
800 
801  double distanceY() const { return mDistanceY; }
802  void setDistanceY( double d ) { mDistanceY = d; }
803 
804  double displacementX() const { return mDisplacementX; }
805  void setDisplacementX( double d ) { mDisplacementX = d; }
806 
807  double displacementY() const { return mDisplacementY; }
808  void setDisplacementY( double d ) { mDisplacementY = d; }
809 
810  bool setSubSymbol( QgsSymbolV2* symbol );
811  virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; }
812 
813  void setDistanceXUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceXUnit = unit; }
814  QgsSymbolV2::OutputUnit distanceXUnit() const { return mDistanceXUnit; }
815 
816  void setDistanceXMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceXMapUnitScale = scale; }
817  const QgsMapUnitScale& distanceXMapUnitScale() const { return mDistanceXMapUnitScale; }
818 
819  void setDistanceYUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceYUnit = unit; }
820  QgsSymbolV2::OutputUnit distanceYUnit() const { return mDistanceYUnit; }
821 
822  void setDistanceYMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceYMapUnitScale = scale; }
823  const QgsMapUnitScale& distanceYMapUnitScale() const { return mDistanceYMapUnitScale; }
824 
825  void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementXUnit = unit; }
826  QgsSymbolV2::OutputUnit displacementXUnit() const { return mDisplacementXUnit; }
827 
828  void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementXMapUnitScale = scale; }
829  const QgsMapUnitScale& displacementXMapUnitScale() const { return mDisplacementXMapUnitScale; }
830 
831  void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit ) { mDisplacementYUnit = unit; }
832  QgsSymbolV2::OutputUnit displacementYUnit() const { return mDisplacementYUnit; }
833 
834  void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale ) { mDisplacementYMapUnitScale = scale; }
835  const QgsMapUnitScale& displacementYMapUnitScale() const { return mDisplacementYMapUnitScale; }
836 
839 
840  void setMapUnitScale( const QgsMapUnitScale &scale );
842 
843  virtual QSet<QString> usedAttributes() const;
844 
845  protected:
847  double mDistanceX;
850  double mDistanceY;
859 
860  void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
861 
862  private:
863  void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& brush, double distanceX, double distanceY,
864  double displacementX, double displacementY );
865 };
866 
868 {
869  public:
872 
873  // static stuff
874 
875  static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
876  static QgsSymbolLayerV2* createFromSld( QDomElement &element );
877 
878  // implemented from base classes
879 
880  QString layerType() const;
881 
882  void startRender( QgsSymbolV2RenderContext& context );
883 
884  void stopRender( QgsSymbolV2RenderContext& context );
885 
886  void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
887 
888  QgsStringMap properties() const;
889 
890  QgsSymbolLayerV2* clone() const;
891 
892  void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
893 
894  void setColor( const QColor& color );
895 
897  bool setSubSymbol( QgsSymbolV2* symbol );
898 
901 
902  void setMapUnitScale( const QgsMapUnitScale &scale );
904 
905  virtual QSet<QString> usedAttributes() const;
906 
907  void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = pointOnSurface; }
908  bool pointOnSurface() const { return mPointOnSurface; }
909 
910  protected:
913 };
914 
915 #endif
916 
917 
virtual QSet< QString > usedAttributes() const
Definition: qgssymbollayerv2.cpp:142
QgsMapUnitScale mSvgOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:669
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:216
ShapeburstColorType mColorType
Definition: qgsfillsymbollayerv2.h:519
Definition: qgsfillsymbollayerv2.h:153
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgssymbollayerv2.h:101
Definition: qgsfillsymbollayerv2.h:160
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:136
QgsSymbolV2::OutputUnit patternWidthUnit() const
Definition: qgsfillsymbollayerv2.h:630
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:392
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:376
const QgsMapUnitScale & patternWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:633
#define DEFAULT_SIMPLEFILL_BORDERCOLOR
Definition: qgsfillsymbollayerv2.h:23
QgsVectorColorRampV2 * colorRamp()
Returns the color ramp used for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:438
void setDistance(double d)
Definition: qgsfillsymbollayerv2.h:711
QgsSymbolV2::OutputUnit distanceYUnit() const
Definition: qgsfillsymbollayerv2.h:820
Definition: qgsfillsymbollayerv2.h:867
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayerv2.h:232
QgsSymbolV2::OutputUnit mSvgOutlineWidthUnit
Definition: qgsfillsymbollayerv2.h:668
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:577
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayerv2.h:244
void setSvgOutlineWidth(double w)
Definition: qgsfillsymbollayerv2.h:626
virtual QgsSymbolV2::OutputUnit outputUnit() const
Definition: qgssymbollayerv2.h:99
void setAngle(double angle)
Rotation angle for gradient fill.
Definition: qgsfillsymbollayerv2.h:248
OutputUnit
Definition: qgssymbolv2.h:47
const QgsMapUnitScale & displacementXMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:829
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:467
void setMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.cpp:1571
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:510
void setOutputUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.cpp:1561
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:754
double mDistanceX
Definition: qgsfillsymbollayerv2.h:847
void setCoordinateMode(GradientCoordinateMode coordinateMode)
Definition: qgsfillsymbollayerv2.h:225
const QgsMapUnitScale & lineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:730
QgsSymbolV2::OutputUnit distanceXUnit() const
Definition: qgsfillsymbollayerv2.h:814
ShapeburstColorType
Definition: qgsfillsymbollayerv2.h:308
QgsMapUnitScale mLineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:755
void setSvgFillColor(const QColor &c)
Definition: qgsfillsymbollayerv2.h:622
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:632
bool mReferencePoint1IsCentroid
Definition: qgsfillsymbollayerv2.h:280
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:733
void setDistanceYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:819
virtual QgsSymbolV2 * subSymbol()
Definition: qgsfillsymbollayerv2.h:811
QString svgFilePath() const
Definition: qgsfillsymbollayerv2.h:618
double distanceX() const
Definition: qgsfillsymbollayerv2.h:798
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:285
virtual void applyDataDefinedSettings(const QgsSymbolV2RenderContext &context)
Definition: qgsfillsymbollayerv2.h:588
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:105
void setOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:561
QPointF referencePoint2() const
Definition: qgsfillsymbollayerv2.h:241
Definition: qgsfillsymbollayerv2.h:683
double displacementX() const
Definition: qgsfillsymbollayerv2.h:804
double svgOutlineWidth() const
Definition: qgsfillsymbollayerv2.h:627
Definition: qgsfillsymbollayerv2.h:172
Base class for polygon renderers generating texture images.
Definition: qgsfillsymbollayerv2.h:548
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:287
QgsMapUnitScale mPatternWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:651
GradientCoordinateMode mCoordinateMode
Definition: qgsfillsymbollayerv2.h:276
void setPointOnSurface(bool pointOnSurface)
Definition: qgsfillsymbollayerv2.h:907
QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:636
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:401
void setColor2(QColor color2)
Sets the color for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:446
QgsSymbolV2::OutputUnit outputUnit() const
Definition: qgsfillsymbollayerv2.cpp:1566
double mDisplacementX
Definition: qgsfillsymbollayerv2.h:853
Definition: qgsfillsymbollayerv2.h:159
double mDistanceY
Definition: qgsfillsymbollayerv2.h:850
bool referencePoint2IsCentroid() const
Definition: qgsfillsymbollayerv2.h:245
QgsMapUnitScale mOutlineWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:583
Definition: qgssymbollayerv2.h:294
GradientType mGradientType
Definition: qgsfillsymbollayerv2.h:275
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient.
Definition: qgsfillsymbollayerv2.h:224
virtual void renderPolygon(const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)=0
QgsSymbolV2::OutputUnit mDisplacementXUnit
Definition: qgsfillsymbollayerv2.h:854
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:816
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
Definition: qgsfillsymbollayerv2.h:351
Definition: qgssymbollayerv2.h:45
QColor mColor2
Definition: qgsfillsymbollayerv2.h:273
double useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
Definition: qgsfillsymbollayerv2.h:367
double angle() const
Definition: qgsfillsymbollayerv2.h:249
double offset() const
Definition: qgsfillsymbollayerv2.h:718
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:509
double mDistance
Distance (in mm or map units) between lines.
Definition: qgsfillsymbollayerv2.h:749
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:562
void setSvgOutlineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:635
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:138
double mLineAngle
Vector line angle in degrees (0 = horizontal, counterclockwise)
Definition: qgsfillsymbollayerv2.h:758
GradientSpread mGradientSpread
Definition: qgsfillsymbollayerv2.h:277
const QgsMapUnitScale & borderWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:103
QgsMapUnitScale mDistanceYMapUnitScale
Definition: qgsfillsymbollayerv2.h:852
double mBorderWidth
Definition: qgsfillsymbollayerv2.h:129
QgsVectorColorRampV2 * mGradientRamp
Definition: qgsfillsymbollayerv2.h:274
QMap< QString, QString > QgsStringMap
Definition: qgis.h:416
double mNextAngle
Definition: qgsfillsymbollayerv2.h:578
void setFillColor(const QColor &color)
Set fill color.
Definition: qgsfillsymbollayerv2.h:85
void setPatternWidth(double width)
Definition: qgsfillsymbollayerv2.h:619
QgsSymbolV2::OutputUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:497
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:624
double mAngle
Definition: qgssymbollayerv2.h:309
virtual void startRender(QgsSymbolV2RenderContext &context)=0
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:259
bool mUseWholeShape
Definition: qgsfillsymbollayerv2.h:514
virtual QgsSymbolV2 * subSymbol()
Definition: qgsfillsymbollayerv2.h:555
void setDistanceUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:720
QgsMapUnitScale mDisplacementYMapUnitScale
Definition: qgsfillsymbollayerv2.h:858
QColor mSvgOutlineColor
Definition: qgsfillsymbollayerv2.h:666
void setGradientType(GradientType gradientType)
Definition: qgsfillsymbollayerv2.h:209
Definition: qgsfillsymbollayerv2.h:310
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:399
QgsSymbolV2::OutputUnit mDisplacementYUnit
Definition: qgsfillsymbollayerv2.h:857
void setLineAngle(double a)
Definition: qgsfillsymbollayerv2.h:709
Definition: qgsfillsymbollayerv2.h:173
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:282
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:475
QByteArray mSvgData
SVG data.
Definition: qgsfillsymbollayerv2.h:654
Qt::PenStyle borderStyle() const
Definition: qgsfillsymbollayerv2.h:87
QColor color() const
Definition: qgsfillsymbollayerv2.h:716
Definition: qgsfillsymbollayerv2.h:33
void setOutlineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:558
QgsLineSymbolV2 * mOutline
Custom outline.
Definition: qgsfillsymbollayerv2.h:586
#define DEFAULT_SIMPLEFILL_STYLE
Definition: qgsfillsymbollayerv2.h:22
QgsMapUnitScale mDistanceXMapUnitScale
Definition: qgsfillsymbollayerv2.h:849
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:125
double mOffset
Offset perpendicular to line direction.
Definition: qgsfillsymbollayerv2.h:760
void setPenJoinStyle(Qt::PenJoinStyle style)
Definition: qgsfillsymbollayerv2.h:94
QgsMapUnitScale mDistanceMapUnitScale
Definition: qgsfillsymbollayerv2.h:517
void setBrushStyle(Qt::BrushStyle style)
Definition: qgsfillsymbollayerv2.h:68
GradientSpread
Definition: qgsfillsymbollayerv2.h:170
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
Definition: qgsfillsymbollayerv2.h:236
QgsVectorColorRampV2 * mTwoColorGradientRamp
Definition: qgsfillsymbollayerv2.h:522
Definition: qgssymbolv2.h:254
void setLineWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:726
GradientCoordinateMode
Definition: qgsfillsymbollayerv2.h:164
void setBlurRadius(int blurRadius)
Sets the blur radius, which controls the amount of blurring applied to the fill.
Definition: qgsfillsymbollayerv2.h:345
double lineAngle() const
Definition: qgsfillsymbollayerv2.h:710
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:736
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:732
QgsMarkerSymbolV2 * mMarker
Definition: qgsfillsymbollayerv2.h:911
QPointF offset() const
Returns the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:482
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:499
const QgsMapUnitScale & distanceXMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:817
double lineWidth() const
Definition: qgsfillsymbollayerv2.h:714
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:822
Qt::PenStyle mBorderStyle
Definition: qgsfillsymbollayerv2.h:128
QColor svgFillColor() const
Definition: qgsfillsymbollayerv2.h:623
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:762
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:527
QgsSymbolV2::OutputUnit distanceUnit() const
Definition: qgsfillsymbollayerv2.h:721
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:423
virtual QgsStringMap properties() const =0
double mAngle
Definition: qgsfillsymbollayerv2.h:283
double patternWidth() const
Definition: qgsfillsymbollayerv2.h:620
QgsSymbolV2::OutputUnit borderWidthUnit() const
Definition: qgsfillsymbollayerv2.h:100
virtual QColor color() const
Definition: qgssymbollayerv2.h:50
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:269
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
Definition: qgsfillsymbollayerv2.h:212
Definition: qgsfillsymbollayerv2.h:304
void setDisplacementXUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:825
QgsMapUnitScale mOffsetMapUnitScale
Definition: qgsfillsymbollayerv2.h:528
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:761
QgsMapUnitScale mDisplacementXMapUnitScale
Definition: qgsfillsymbollayerv2.h:855
void setBorderWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:99
QColor mColor
Definition: qgsfillsymbollayerv2.h:756
double mDisplacementY
Definition: qgsfillsymbollayerv2.h:856
Definition: qgssymbolv2.h:43
void setLineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:729
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:828
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:137
bool mIgnoreRings
Definition: qgsfillsymbollayerv2.h:524
QPointF referencePoint1() const
Definition: qgsfillsymbollayerv2.h:233
QString mSvgFilePath
Path to the svg file (or empty if constructed directly from data)
Definition: qgsfillsymbollayerv2.h:656
const QgsMapUnitScale & displacementYMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:835
QgsSymbolV2::OutputUnit mOffsetUnit
Definition: qgsfillsymbollayerv2.h:286
QBrush mBrush
Definition: qgsfillsymbollayerv2.h:124
virtual QColor dxfColor(const QgsSymbolV2RenderContext &context) const
Definition: qgssymbollayerv2.cpp:104
QgsSymbolV2::OutputUnit mOutlineWidthUnit
Definition: qgsfillsymbollayerv2.h:582
double mOutlineWidth
Outline width.
Definition: qgsfillsymbollayerv2.h:581
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:413
void setDistanceXUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:813
double mLineWidth
Line width (in mm or map units)
Definition: qgsfillsymbollayerv2.h:753
QgsVectorColorRampV2 * mGradientRamp
Definition: qgsfillsymbollayerv2.h:521
QColor svgOutlineColor() const
Definition: qgsfillsymbollayerv2.h:625
GradientSpread gradientSpread() const
Gradient spread mode.
Definition: qgsfillsymbollayerv2.h:228
QColor mBorderColor
Definition: qgsfillsymbollayerv2.h:127
const QgsMapUnitScale & distanceMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:402
QPointF mReferencePoint2
Definition: qgsfillsymbollayerv2.h:281
QBrush mSelBrush
Definition: qgsfillsymbollayerv2.h:270
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:453
virtual bool setSubSymbol(QgsSymbolV2 *symbol)
Definition: qgsfillsymbollayerv2.cpp:1534
void setOffset(QPointF offset)
Offset for gradient fill.
Definition: qgsfillsymbollayerv2.h:252
virtual QString layerType() const =0
void setDisplacementY(double d)
Definition: qgsfillsymbollayerv2.h:808
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Sets the units used for the offset for the shapeburst fill.
Definition: qgsfillsymbollayerv2.h:490
QgsSymbolV2::OutputUnit mDistanceYUnit
Definition: qgsfillsymbollayerv2.h:851
bool pointOnSurface() const
Definition: qgsfillsymbollayerv2.h:908
Definition: qgsfillsymbollayerv2.h:166
virtual QgsSymbolV2 * subSymbol()
Definition: qgssymbollayerv2.h:83
Definition: qgssymbolv2.h:227
void setOffset(QPointF offset)
Definition: qgsfillsymbollayerv2.h:96
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:109
bool mPointOnSurface
Definition: qgsfillsymbollayerv2.h:912
Qt::PenJoinStyle mPenJoinStyle
Definition: qgsfillsymbollayerv2.h:132
QgsSymbolV2::OutputUnit lineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:727
A class for svg fill patterns.
Definition: qgsfillsymbollayerv2.h:593
double widthScaleFactor
Definition: qgssvgcache.cpp:79
const QgsMapUnitScale & distanceMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:724
void setGradientColorType(GradientColorType gradientColorType)
Definition: qgsfillsymbollayerv2.h:213
Qt::BrushStyle mBrushStyle
Definition: qgsfillsymbollayerv2.h:126
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
Definition: qgsfillsymbollayerv2.h:220
QgsMapUnitScale mBorderWidthMapUnitScale
Definition: qgsfillsymbollayerv2.h:131
int mBlurRadius
Definition: qgsfillsymbollayerv2.h:512
QColor mSvgFillColor
Definition: qgsfillsymbollayerv2.h:665
GradientColorType mGradientColorType
Definition: qgsfillsymbollayerv2.h:272
Definition: qgsmapunitscale.h:24
QgsSymbolV2::OutputUnit mDistanceXUnit
Definition: qgsfillsymbollayerv2.h:848
QgsMapUnitScale mDistanceMapUnitScale
Definition: qgsfillsymbollayerv2.h:751
void setDisplacementYUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:831
const QgsMapUnitScale & distanceYMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:823
QPointF offset()
Definition: qgsfillsymbollayerv2.h:97
QgsSymbolV2::OutputUnit displacementYUnit() const
Definition: qgsfillsymbollayerv2.h:832
bool referencePoint1IsCentroid() const
Definition: qgsfillsymbollayerv2.h:237
double distanceY() const
Definition: qgsfillsymbollayerv2.h:801
QgsSymbolV2::OutputUnit mBorderWidthUnit
Definition: qgsfillsymbollayerv2.h:130
Qt::PenJoinStyle penJoinStyle() const
Definition: qgsfillsymbollayerv2.h:93
GradientColorType
Definition: qgsfillsymbollayerv2.h:151
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:260
Definition: qgsfillsymbollayerv2.h:147
QgsSymbolV2::OutputUnit mDistanceUnit
Definition: qgsfillsymbollayerv2.h:750
virtual QgsMapUnitScale mapUnitScale() const
Definition: qgssymbollayerv2.h:102
void setDistanceY(double d)
Definition: qgsfillsymbollayerv2.h:802
double mMaxDistance
Definition: qgsfillsymbollayerv2.h:515
QgsMarkerSymbolV2 * mMarkerSymbol
Definition: qgsfillsymbollayerv2.h:846
QgsMapUnitScale mapUnitScale() const
Definition: qgsfillsymbollayerv2.cpp:1576
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:834
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:208
QColor borderColor() const
Definition: qgsfillsymbollayerv2.h:70
void setDistanceX(double d)
Definition: qgsfillsymbollayerv2.h:799
QgsSymbolV2::OutputUnit outlineWidthUnit() const
Definition: qgsfillsymbollayerv2.h:559
QPen mSelPen
Definition: qgsfillsymbollayerv2.h:134
void setUseWholeShape(double useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
Definition: qgsfillsymbollayerv2.h:360
double distance() const
Definition: qgsfillsymbollayerv2.h:712
QgsSymbolV2::OutputUnit mDistanceUnit
Definition: qgsfillsymbollayerv2.h:516
QColor mColor
Definition: qgssymbollayerv2.h:138
Definition: qgssymbolv2.h:165
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:1581
QPointF offset() const
Definition: qgsfillsymbollayerv2.h:253
QPointF mReferencePoint1
Definition: qgsfillsymbollayerv2.h:279
QPointF mOffset
Definition: qgsfillsymbollayerv2.h:526
void setOffset(double offset)
Definition: qgsfillsymbollayerv2.h:717
void setPatternWidthUnit(QgsSymbolV2::OutputUnit unit)
Definition: qgsfillsymbollayerv2.h:629
QgsSymbolV2::OutputUnit displacementXUnit() const
Definition: qgsfillsymbollayerv2.h:826
void setGradientSpread(GradientSpread gradientSpread)
Definition: qgsfillsymbollayerv2.h:229
QgsSymbolV2::OutputUnit mPatternWidthUnit
Definition: qgsfillsymbollayerv2.h:650
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:106
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:735
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
Definition: qgsfillsymbollayerv2.h:240
Definition: qgsvectorcolorrampv2.h:25
const QgsMapUnitScale & offsetMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:500
void setBorderWidth(double borderWidth)
Definition: qgsfillsymbollayerv2.h:91
const QgsMapUnitScale & svgOutlineWidthMapUnitScale() const
Definition: qgsfillsymbollayerv2.h:639
#define DEFAULT_SIMPLEFILL_JOINSTYLE
Definition: qgsfillsymbollayerv2.h:26
void setDisplacementX(double d)
Definition: qgsfillsymbollayerv2.h:805
virtual bool setSubSymbol(QgsSymbolV2 *symbol)
Definition: qgssymbollayerv2.h:85
virtual void stopRender(QgsSymbolV2RenderContext &context)=0
GradientType
Definition: qgsfillsymbollayerv2.h:157
double angle() const
Definition: qgssymbollayerv2.h:302
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
Definition: qgssymbollayerv2.h:77
double displacementY() const
Definition: qgsfillsymbollayerv2.h:807
Qt::BrushStyle brushStyle() const
Definition: qgsfillsymbollayerv2.h:67
double mSvgOutlineWidth
Definition: qgsfillsymbollayerv2.h:667
QPen mPen
Definition: qgsfillsymbollayerv2.h:133
QColor mColor2
Definition: qgsfillsymbollayerv2.h:520
Definition: qgsdxfexport.h:32
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:723
#define DEFAULT_SIMPLEFILL_BORDERWIDTH
Definition: qgsfillsymbollayerv2.h:25
Definition: qgsfillsymbollayerv2.h:774
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
Units for gradient fill offset.
Definition: qgsfillsymbollayerv2.h:256
QgsSymbolV2::OutputUnit offsetUnit() const
Definition: qgsfillsymbollayerv2.h:257
QRectF mSvgViewBox
SVG view box (to keep the aspect ratio.
Definition: qgsfillsymbollayerv2.h:658
void setIgnoreRings(double ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading...
Definition: qgsfillsymbollayerv2.h:461
QImage * mSvgPattern
SVG pattern image.
Definition: qgsfillsymbollayerv2.h:661
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
Definition: qgsfillsymbollayerv2.h:384
void setSvgOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsfillsymbollayerv2.h:638
double mPatternWidth
Width of the pattern (in output units)
Definition: qgsfillsymbollayerv2.h:649
#define DEFAULT_SIMPLEFILL_COLOR
Definition: qgsfillsymbollayerv2.h:21
void setColor2(QColor color2)
Definition: qgsfillsymbollayerv2.h:221
void setBorderStyle(Qt::PenStyle borderStyle)
Definition: qgsfillsymbollayerv2.h:88