QGIS API Documentation  3.0.2-Girona (307d082)
qgssymbollayer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssymbollayer.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 #ifndef QGSSYMBOLLAYER_H
16 #define QGSSYMBOLLAYER_H
17 
18 #define DEG2RAD(x) ((x)*M_PI/180)
19 #define DEFAULT_SCALE_METHOD QgsSymbol::ScaleDiameter
20 
21 #include "qgis_core.h"
22 #include "qgis.h"
23 #include <QColor>
24 #include <QMap>
25 #include <QPointF>
26 #include <QSet>
27 #include <QDomDocument>
28 #include <QDomElement>
29 
30 #include "qgssymbol.h"
31 #include "qgssymbollayerutils.h" // QgsStringMap
32 #include "qgsfields.h"
33 #include "qgspropertycollection.h"
34 
35 class QPainter;
36 class QSize;
37 class QPolygonF;
38 
39 class QgsDxfExport;
40 class QgsExpression;
41 class QgsRenderContext;
42 class QgsPaintEffect;
43 
48 class CORE_EXPORT QgsSymbolLayer
49 {
50 #ifdef SIP_RUN
51 #include <qgslinesymbollayer.h>
52 #endif
53 
54 
55 #ifdef SIP_RUN
57  switch ( sipCpp->type() )
58  {
59  case QgsSymbol::Marker:
60  if ( sipCpp->layerType() == "EllipseMarker" )
61  sipType = sipType_QgsEllipseSymbolLayer;
62  else if ( sipCpp->layerType() == "FontMarker" )
63  sipType = sipType_QgsFontMarkerSymbolLayer;
64  else if ( sipCpp->layerType() == "SimpleMarker" )
65  sipType = sipType_QgsSimpleMarkerSymbolLayer;
66  else if ( sipCpp->layerType() == "FilledMarker" )
67  sipType = sipType_QgsFilledMarkerSymbolLayer;
68  else if ( sipCpp->layerType() == "SvgMarker" )
69  sipType = sipType_QgsSvgMarkerSymbolLayer;
70  else if ( sipCpp->layerType() == "VectorField" )
71  sipType = sipType_QgsVectorFieldSymbolLayer;
72  else
73  sipType = sipType_QgsMarkerSymbolLayer;
74  break;
75 
76  case QgsSymbol::Line:
77  if ( sipCpp->layerType() == "MarkerLine" )
78  sipType = sipType_QgsMarkerLineSymbolLayer;
79  else if ( sipCpp->layerType() == "SimpleLine" )
80  sipType = sipType_QgsSimpleLineSymbolLayer;
81  else if ( sipCpp->layerType() == "ArrowLine" )
82  sipType = sipType_QgsArrowSymbolLayer;
83  else
84  sipType = sipType_QgsLineSymbolLayer;
85  break;
86 
87  case QgsSymbol::Fill:
88  if ( sipCpp->layerType() == "SimpleFill" )
89  sipType = sipType_QgsSimpleFillSymbolLayer;
90  else if ( sipCpp->layerType() == "LinePatternFill" )
91  sipType = sipType_QgsLinePatternFillSymbolLayer;
92  else if ( sipCpp->layerType() == "PointPatternFill" )
93  sipType = sipType_QgsPointPatternFillSymbolLayer;
94  else if ( sipCpp->layerType() == "SVGFill" )
95  sipType = sipType_QgsSVGFillSymbolLayer;
96  else if ( sipCpp->layerType() == "RasterFill" )
97  sipType = sipType_QgsRasterFillSymbolLayer;
98  else if ( sipCpp->layerType() == "CentroidFill" )
99  sipType = sipType_QgsCentroidFillSymbolLayer;
100  else if ( sipCpp->layerType() == "GradientFill" )
101  sipType = sipType_QgsGradientFillSymbolLayer;
102  else if ( sipCpp->layerType() == "ShapeburstFill" )
103  sipType = sipType_QgsShapeburstFillSymbolLayer;
104  else
105  sipType = sipType_QgsFillSymbolLayer;
106  break;
107 
108  case QgsSymbol::Hybrid:
109  sipType = sipType_QgsGeometryGeneratorSymbolLayer;
110  break;
111  }
112  SIP_END
113 #endif
114  public:
115 
120  enum Property
121  {
122  PropertySize = 0,
172  };
173 
178  static const QgsPropertiesDefinition &propertyDefinitions();
179 
180  virtual ~QgsSymbolLayer();
181 
187  bool enabled() const { return mEnabled; }
188 
196  void setEnabled( bool enabled ) { mEnabled = enabled; }
197 
201  virtual QColor color() const { return mColor; }
202 
206  virtual void setColor( const QColor &color ) { mColor = color; }
207 
211  virtual void setStrokeColor( const QColor &color ) { Q_UNUSED( color ); }
212 
216  virtual QColor strokeColor() const { return QColor(); }
217 
221  virtual void setFillColor( const QColor &color ) { Q_UNUSED( color ); }
222 
226  virtual QColor fillColor() const { return QColor(); }
227 
232  virtual QString layerType() const = 0;
233 
234  virtual void startRender( QgsSymbolRenderContext &context ) = 0;
235  virtual void stopRender( QgsSymbolRenderContext &context ) = 0;
236 
240  virtual QgsSymbolLayer *clone() const = 0 SIP_FACTORY;
241 
242  virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
243  { Q_UNUSED( props ); element.appendChild( doc.createComment( QStringLiteral( "SymbolLayerV2 %1 not implemented yet" ).arg( layerType() ) ) ); }
244 
245  virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const { Q_UNUSED( mmScaleFactor ); Q_UNUSED( mapUnitScaleFactor ); return QString(); }
246 
252  virtual QgsStringMap properties() const = 0;
253 
254  virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) = 0;
255 
259  virtual QgsSymbol *subSymbol() { return nullptr; }
260 
262  virtual bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) { delete symbol; return false; }
263 
264  QgsSymbol::SymbolType type() const { return mType; }
265 
267  virtual bool isCompatibleWithSymbol( QgsSymbol *symbol ) const;
268 
269  void setLocked( bool locked ) { mLocked = locked; }
270  bool isLocked() const { return mLocked; }
271 
278  virtual double estimateMaxBleed( const QgsRenderContext &context ) const { Q_UNUSED( context ); return 0; }
279 
288  virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ) { Q_UNUSED( unit ); }
289 
299 
300  virtual void setMapUnitScale( const QgsMapUnitScale &scale ) { Q_UNUSED( scale ); }
301  virtual QgsMapUnitScale mapUnitScale() const { return QgsMapUnitScale(); }
302 
303  // used only with rending with symbol levels is turned on (0 = first pass, 1 = second, ...)
304  void setRenderingPass( int renderingPass ) { mRenderingPass = renderingPass; }
305  int renderingPass() const { return mRenderingPass; }
306 
311  virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
312 
320  virtual void setDataDefinedProperty( Property key, const QgsProperty &property );
321 
323  virtual bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const;
324 
326  virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
327 
329  virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
330 
332  virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
333 
335  virtual double dxfAngle( QgsSymbolRenderContext &context ) const;
336 
338  virtual QVector<qreal> dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const;
339 
341  virtual Qt::PenStyle dxfPenStyle() const;
342 
344  virtual QColor dxfBrushColor( QgsSymbolRenderContext &context ) const;
345 
347  virtual Qt::BrushStyle dxfBrushStyle() const;
348 
355  QgsPaintEffect *paintEffect() const;
356 
363  void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
364 
371  virtual void prepareExpressions( const QgsSymbolRenderContext &context );
372 
378  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
379 
385  const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; } SIP_SKIP
386 
393  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
394 
395  protected:
396 
397  QgsSymbolLayer( QgsSymbol::SymbolType type, bool locked = false );
398 
400 
402  bool mEnabled;
403 
404  bool mLocked;
405  QColor mColor;
407 
409 
410  QgsPaintEffect *mPaintEffect = nullptr;
412 
413  // Configuration of selected symbology implementation
415  static const bool SELECTION_IS_OPAQUE = true;
417  static const bool SELECT_FILL_BORDER = false;
419  static const bool SELECT_FILL_STYLE = false;
420 
425  void restoreOldDataDefinedProperties( const QgsStringMap &stringMap );
426 
431  void copyDataDefinedProperties( QgsSymbolLayer *destLayer ) const;
432 
438  void copyPaintEffect( QgsSymbolLayer *destLayer ) const;
439 
440  private:
441  static void initPropertyDefinitions();
442 
444  static QgsPropertiesDefinition sPropertyDefinitions;
445 
446 };
447 
449 
455 class CORE_EXPORT QgsMarkerSymbolLayer : public QgsSymbolLayer
456 {
457  public:
458 
461  {
465  };
466 
469  {
470  Top,
473  };
474 
475  void startRender( QgsSymbolRenderContext &context ) override;
476 
483  virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context ) = 0;
484 
485  void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) override;
486 
493  void setAngle( double angle ) { mAngle = angle; }
494 
499  double angle() const { return mAngle; }
500 
510  void setLineAngle( double lineAngle ) { mLineAngle = lineAngle; }
511 
519  void setSize( double size ) { mSize = size; }
520 
527  double size() const { return mSize; }
528 
536  void setSizeUnit( QgsUnitTypes::RenderUnit unit ) { mSizeUnit = unit; }
537 
544  QgsUnitTypes::RenderUnit sizeUnit() const { return mSizeUnit; }
545 
553  void setSizeMapUnitScale( const QgsMapUnitScale &scale ) { mSizeMapUnitScale = scale; }
554 
561  const QgsMapUnitScale &sizeMapUnitScale() const { return mSizeMapUnitScale; }
562 
568  void setScaleMethod( QgsSymbol::ScaleMethod scaleMethod ) { mScaleMethod = scaleMethod; }
569 
574  QgsSymbol::ScaleMethod scaleMethod() const { return mScaleMethod; }
575 
584  void setOffset( QPointF offset ) { mOffset = offset; }
585 
593  QPointF offset() const { return mOffset; }
594 
602  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
603 
610  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
611 
619  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
620 
627  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
628 
636  void setHorizontalAnchorPoint( HorizontalAnchorPoint h ) { mHorizontalAnchorPoint = h; }
637 
644  HorizontalAnchorPoint horizontalAnchorPoint() const { return mHorizontalAnchorPoint; }
645 
653  void setVerticalAnchorPoint( VerticalAnchorPoint v ) { mVerticalAnchorPoint = v; }
654 
661  VerticalAnchorPoint verticalAnchorPoint() const { return mVerticalAnchorPoint; }
662 
663  void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
664 
671  virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
672  { Q_UNUSED( props ); element.appendChild( doc.createComment( QStringLiteral( "QgsMarkerSymbolLayer %1 not implemented yet" ).arg( layerType() ) ) ); }
673 
674  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
675  QgsUnitTypes::RenderUnit outputUnit() const override;
676  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
677  QgsMapUnitScale mapUnitScale() const override;
678 
685  virtual QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) = 0;
686 
687  protected:
688 
693  QgsMarkerSymbolLayer( bool locked = false );
694 
702  void markerOffset( QgsSymbolRenderContext &context, double &offsetX, double &offsetY ) const;
703 
714  void markerOffset( QgsSymbolRenderContext &context, double width, double height, double &offsetX, double &offsetY ) const SIP_PYNAME( markerOffsetWithWidthAndHeight );
715 
717  void markerOffset( QgsSymbolRenderContext &context, double width, double height,
719  double &offsetX, double &offsetY,
720  const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const SIP_PYNAME( markerOffset2 );
721 
728  static QPointF _rotatedOffset( QPointF offset, double angle );
729 
731  double mAngle = 0;
733  double mLineAngle = 0;
735  double mSize = 2.0;
741  QPointF mOffset;
749  HorizontalAnchorPoint mHorizontalAnchorPoint = HCenter;
751  VerticalAnchorPoint mVerticalAnchorPoint = VCenter;
752 
753  private:
754  static QgsMarkerSymbolLayer::HorizontalAnchorPoint decodeHorizontalAnchorPoint( const QString &str );
755  static QgsMarkerSymbolLayer::VerticalAnchorPoint decodeVerticalAnchorPoint( const QString &str );
756 };
757 
762 class CORE_EXPORT QgsLineSymbolLayer : public QgsSymbolLayer
763 {
764  public:
765  virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) = 0;
766 
767  virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
768 
769  virtual void setWidth( double width ) { mWidth = width; }
770  virtual double width() const { return mWidth; }
771 
772  double offset() const { return mOffset; }
773  void setOffset( double offset ) { mOffset = offset; }
774 
780  void setWidthUnit( QgsUnitTypes::RenderUnit unit ) { mWidthUnit = unit; }
781 
786  QgsUnitTypes::RenderUnit widthUnit() const { return mWidthUnit; }
787 
788  void setWidthMapUnitScale( const QgsMapUnitScale &scale ) { mWidthMapUnitScale = scale; }
789  const QgsMapUnitScale &widthMapUnitScale() const { return mWidthMapUnitScale; }
790 
796  void setOffsetUnit( QgsUnitTypes::RenderUnit unit ) { mOffsetUnit = unit; }
797 
802  QgsUnitTypes::RenderUnit offsetUnit() const { return mOffsetUnit; }
803 
804  void setOffsetMapUnitScale( const QgsMapUnitScale &scale ) { mOffsetMapUnitScale = scale; }
805  const QgsMapUnitScale &offsetMapUnitScale() const { return mOffsetMapUnitScale; }
806 
807  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
808  QgsUnitTypes::RenderUnit outputUnit() const override;
809 
810  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
811  QgsMapUnitScale mapUnitScale() const override;
812 
813  void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) override;
814 
815  double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
816 
817  protected:
818  QgsLineSymbolLayer( bool locked = false );
819 
820  double mWidth = 0;
823  double mOffset = 0;
826 };
827 
832 class CORE_EXPORT QgsFillSymbolLayer : public QgsSymbolLayer
833 {
834  public:
835  virtual void renderPolygon( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context ) = 0;
836 
837  void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) override;
838 
839  void setAngle( double angle ) { mAngle = angle; }
840  double angle() const { return mAngle; }
841 
842  protected:
843  QgsFillSymbolLayer( bool locked = false );
845  void _renderPolygon( QPainter *p, const QPolygonF &points, const QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
846 
847  double mAngle = 0.0;
848 };
849 
850 class QgsSymbolLayerWidget; // why does SIP fail, when this isn't here
851 
852 #endif
853 
854 
void setOffset(QPointF offset)
Sets the marker&#39;s offset, which is the horizontal and vertical displacement which the rendered marker...
Gradient reference point 1 is centroid.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol&#39;s offset.
void setLineAngle(double lineAngle)
Sets the line angle modification for the symbol&#39;s angle.
void setRenderingPass(int renderingPass)
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
void setLocked(bool locked)
Gradient reference point 1 x.
Calculate scale by the diameter.
Definition: qgssymbol.h:97
virtual QgsSymbol * subSymbol()
Returns the symbol&#39;s sub symbol, if present.
virtual void setWidth(double width)
const QgsMapUnitScale & offsetMapUnitScale() const
const QgsMapUnitScale & sizeMapUnitScale() const
Returns the map unit scale for the symbol&#39;s size.
Align to right side of symbol.
double angle() const
void setAngle(double angle)
virtual QColor strokeColor() const
Get stroke color.
Base class for visual effects which can be applied to QPicture drawings.
Container of fields for a vector layer.
Definition: qgsfields.h:42
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol&#39;s offset.
VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the symbol&#39;s offset.
QPointF mOffset
Marker offset.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line&#39;s offset.
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
get line width
bool isLocked() const
Line symbol.
Definition: qgssymbol.h:86
void setScaleMethod(QgsSymbol::ScaleMethod scaleMethod)
Sets the method to use for scaling the marker&#39;s size.
Align to horizontal center of symbol.
QMap< QString, QString > QgsStringMap
Definition: qgis.h:479
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
virtual double width() const
Name, eg shape name for simple markers.
void setWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the line&#39;s width.
Gradient reference point 2 y.
virtual void setColor(const QColor &color)
The fill color.
SymbolType
Type of the symbol.
Definition: qgssymbol.h:83
HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
virtual void writeSldMarker(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
Writes the symbol layer definition as a SLD XML element.
int renderingPass() const
Align to bottom of symbol.
virtual bool setSubSymbol(QgsSymbol *symbol)
set layer&#39;s subsymbol. takes ownership of the passed symbol
double angle() const
Returns the rotation angle for the marker, in degrees clockwise from north.
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the line&#39;s width.
#define SIP_SKIP
Definition: qgis_sip.h:119
double size() const
Returns the symbol size.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the symbol layer&#39;s property collection, used for data defined overrides...
void setSize(double size)
Sets the symbol size.
void setHorizontalAnchorPoint(HorizontalAnchorPoint h)
Sets the horizontal anchor point for positioning the symbol.
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol&#39;s size.
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsMapUnitScale mOffsetMapUnitScale
virtual QColor color() const
The fill color.
Filename, eg for svg files.
#define SIP_END
Definition: qgis_sip.h:175
Align to left side of symbol.
virtual void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size)=0
Shapeburst fill from edge distance.
QgsSymbol::SymbolType type() const
#define SIP_FACTORY
Definition: qgis_sip.h:69
QgsMapUnitScale mSizeMapUnitScale
Marker size map unit scale.
Character, eg for font marker symbol layers.
double offset() const
ScaleMethod
Scale method.
Definition: qgssymbol.h:94
Align to top of symbol.
void setEnabled(bool enabled)
Sets whether symbol layer is enabled and should be drawn.
A store for object properties.
Definition: qgsproperty.h:229
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the symbol layer&#39;s property collection, used for data defined overrides...
QgsMapUnitScale mWidthMapUnitScale
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
HorizontalAnchorPoint
Symbol horizontal anchor points.
virtual void setStrokeColor(const QColor &color)
Set stroke color.
Gradient reference point 1 y.
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
VerticalAnchorPoint
Symbol vertical anchor points.
QgsSymbol::ScaleMethod scaleMethod() const
Returns the method to use for scaling the marker&#39;s size.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
void setSizeUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol&#39;s size.
Marker symbol.
Definition: qgssymbol.h:85
virtual QgsMapUnitScale mapUnitScale() const
Stroke style (eg solid, dashed)
Preserve aspect ratio between width and height.
Fill symbol.
Definition: qgssymbol.h:87
Contains information about the context of a rendering operation.
Abstract base class for marker symbol layers.
virtual void setMapUnitScale(const QgsMapUnitScale &scale)
virtual void setFillColor(const QColor &color)
Set fill color.
bool enabled() const
Returns true if symbol layer is enabled and will be drawn.
Struct for storing maximum and minimum scales for measurements in map units.
QgsUnitTypes::RenderUnit sizeUnit() const
Returns the units for the symbol&#39;s size.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the line&#39;s offset.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165
Align to vertical center of symbol.
Secondary color (eg for gradient fills)
bool mEnabled
True if layer is enabled and should be drawn.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
void setAngle(double angle)
Sets the rotation angle for the marker.
const QgsMapUnitScale & widthMapUnitScale() const
QgsMapUnitScale mOffsetMapUnitScale
Offset map unit scale.
Shapeburst blur radius.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
QPointF offset() const
Returns the marker&#39;s offset, which is the horizontal and vertical displacement which the rendered mar...
Fill style (eg solid, dots)
virtual QColor fillColor() const
Get fill color.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the symbol&#39;s offset.
QgsFields mFields
Whether symbol layer is enabled.
Hybrid symbol.
Definition: qgssymbol.h:88
Gradient reference point 2 is centroid.
QgsSymbol::SymbolType mType
Gradient reference point 2 x.
QgsPropertyCollection mDataDefinedProperties
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the symbol layer&#39;s property collection, used for data defined overrides.
Property
Data definable properties.
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:100
void setVerticalAnchorPoint(VerticalAnchorPoint v)
Sets the vertical anchor point for positioning the symbol.
#define SIP_PYNAME(name)
Definition: qgis_sip.h:74
void setOffset(double offset)
virtual void startRender(QgsSymbolRenderContext &context)=0
Horizontal distance between points.
virtual QString layerType() const =0
Returns a string that represents this layer type.
Vertical distance between points.