QGIS API Documentation  3.0.2-Girona (307d082)
qgsmarkersymbollayer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmarkersymbollayer.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 QGSMARKERSYMBOLLAYERV2_H
17 #define QGSMARKERSYMBOLLAYERV2_H
18 
19 #include "qgis_core.h"
20 #include "qgis_sip.h"
21 #include "qgis.h"
22 #include "qgssymbollayer.h"
23 
24 #define DEFAULT_SIMPLEMARKER_NAME "circle"
25 #define DEFAULT_SIMPLEMARKER_COLOR QColor(255,0,0)
26 #define DEFAULT_SIMPLEMARKER_BORDERCOLOR QColor( 35, 35, 35 )
27 #define DEFAULT_SIMPLEMARKER_JOINSTYLE Qt::BevelJoin
28 #define DEFAULT_SIMPLEMARKER_SIZE DEFAULT_POINT_SIZE
29 #define DEFAULT_SIMPLEMARKER_ANGLE 0
30 
31 #include <QPen>
32 #include <QBrush>
33 #include <QPicture>
34 #include <QPolygonF>
35 #include <QFont>
36 
45 {
46  public:
47 
49  enum Shape
50  {
57  Star,
63  Line,
74  };
75 
77  static QList< QgsSimpleMarkerSymbolLayerBase::Shape > availableShapes();
78 
84  static bool shapeIsFilled( QgsSimpleMarkerSymbolLayerBase::Shape shape );
85 
94  double size = DEFAULT_SIMPLEMARKER_SIZE,
97 
102  QgsSimpleMarkerSymbolLayerBase::Shape shape() const { return mShape; }
103 
109  void setShape( QgsSimpleMarkerSymbolLayerBase::Shape shape ) { mShape = shape; }
110 
119  static QgsSimpleMarkerSymbolLayerBase::Shape decodeShape( const QString &name, bool *ok = nullptr );
120 
127  static QString encodeShape( QgsSimpleMarkerSymbolLayerBase::Shape shape );
128 
129  void startRender( QgsSymbolRenderContext &context ) override;
130  void stopRender( QgsSymbolRenderContext &context ) override;
131  void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override;
132  QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;
133 
134  protected:
135 
140  bool prepareMarkerShape( Shape shape );
141 
146  bool prepareMarkerPath( Shape symbol );
147 
155  bool shapeToPolygon( Shape shape, QPolygonF &polygon ) const;
156 
164  double calculateSize( QgsSymbolRenderContext &context, bool &hasDataDefinedSize ) const;
165 
175  void calculateOffsetAndRotation( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedRotation, QPointF &offset, double &angle ) const;
176 
178  QPolygonF mPolygon;
179 
181  QPainterPath mPath;
182 
185 
186  private:
187 
196  virtual void draw( QgsSymbolRenderContext &context, QgsSimpleMarkerSymbolLayerBase::Shape shape, const QPolygonF &polygon, const QPainterPath &path ) = 0 SIP_FORCE;
197 };
198 
205 {
206  public:
207 
219  double size = DEFAULT_SIMPLEMARKER_SIZE,
222  const QColor &color = DEFAULT_SIMPLEMARKER_COLOR,
223  const QColor &strokeColor = DEFAULT_SIMPLEMARKER_BORDERCOLOR,
224  Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEMARKER_JOINSTYLE );
225 
226  // static methods
227 
233  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
234 
240  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
241 
242  // reimplemented from base classes
243 
244  QString layerType() const override;
245  void startRender( QgsSymbolRenderContext &context ) override;
246  void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override;
247  QgsStringMap properties() const override;
248  QgsSimpleMarkerSymbolLayer *clone() const override SIP_FACTORY;
249  void writeSldMarker( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
250  QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const override;
251  bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const override;
252  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
253  QgsUnitTypes::RenderUnit outputUnit() const override;
254  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
255  QgsMapUnitScale mapUnitScale() const override;
256  QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;
257  QColor fillColor() const override { return mColor; }
258  void setFillColor( const QColor &color ) override { mColor = color; }
259  void setColor( const QColor &color ) override;
260  QColor color() const override;
261 
262  // new methods
263 
270  QColor strokeColor() const override { return mStrokeColor; }
271 
279  void setStrokeColor( const QColor &color ) override { mStrokeColor = color; }
280 
288  Qt::PenStyle strokeStyle() const { return mStrokeStyle; }
289 
298  void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
299 
307  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
308 
317  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
318 
325  double strokeWidth() const { return mStrokeWidth; }
326 
334  void setStrokeWidth( double w ) { mStrokeWidth = w; }
335 
343  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit u ) { mStrokeWidthUnit = u; }
344 
351  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
352 
360  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
361 
368  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
369 
370  protected:
371 
378  void drawMarker( QPainter *p, QgsSymbolRenderContext &context );
379 
384  bool prepareCache( QgsSymbolRenderContext &context );
385 
387  QColor mStrokeColor;
389  Qt::PenStyle mStrokeStyle = Qt::SolidLine;
391  double mStrokeWidth = 0;
397  Qt::PenJoinStyle mPenJoinStyle;
399  QPen mPen;
401  QBrush mBrush;
402 
404  QImage mCache;
406  QPen mSelPen;
408  QBrush mSelBrush;
410  QImage mSelCache;
411 
416  bool mUsingCache = false;
418  static const int MAXIMUM_CACHE_WIDTH = 3000;
419 
420  private:
421 
422  void draw( QgsSymbolRenderContext &context, QgsSimpleMarkerSymbolLayerBase::Shape shape, const QPolygonF &polygon, const QPainterPath &path ) override SIP_FORCE;
423 };
424 
433 {
434  public:
435 
444  double size = DEFAULT_SIMPLEMARKER_SIZE,
447 
453  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
454 
455  QString layerType() const override;
456  void startRender( QgsSymbolRenderContext &context ) override;
457  void stopRender( QgsSymbolRenderContext &context ) override;
458  QgsStringMap properties() const override;
459  QgsFilledMarkerSymbolLayer *clone() const override SIP_FACTORY;
460  QgsSymbol *subSymbol() override;
461  bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
462  double estimateMaxBleed( const QgsRenderContext &context ) const override;
463  QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
464  void setColor( const QColor &c ) override;
465  QColor color() const override;
466 
467  private:
468 #ifdef SIP_RUN
470 #endif
471 
472  void draw( QgsSymbolRenderContext &context, QgsSimpleMarkerSymbolLayerBase::Shape shape, const QPolygonF &polygon, const QPainterPath &path ) override SIP_FORCE;
473 
475  std::unique_ptr< QgsFillSymbol > mFill;
476 };
477 
479 
480 #define DEFAULT_SVGMARKER_SIZE 2*DEFAULT_POINT_SIZE
481 #define DEFAULT_SVGMARKER_ANGLE 0
482 
488 {
489  public:
491  QgsSvgMarkerSymbolLayer( const QString &path,
492  double size = DEFAULT_SVGMARKER_SIZE,
495 
496  // static stuff
497 
498  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
499  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
500 
506  static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving );
507 
508  // implemented from base classes
509 
510  QString layerType() const override;
511 
512  void startRender( QgsSymbolRenderContext &context ) override;
513 
514  void stopRender( QgsSymbolRenderContext &context ) override;
515 
516  void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override;
517 
518  QgsStringMap properties() const override;
519 
520  QgsSvgMarkerSymbolLayer *clone() const override SIP_FACTORY;
521 
522  void writeSldMarker( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
523 
528  QString path() const { return mPath; }
529 
535  void setPath( const QString &path );
536 
541  double defaultAspectRatio() const { return mDefaultAspectRatio; }
542 
548  double updateDefaultAspectRatio();
549 
554  bool preservedAspectRatio() const { return mFixedAspectRatio <= 0.0; }
555 
562  bool setPreservedAspectRatio( bool par );
563 
569  double fixedAspectRatio() const { return mFixedAspectRatio; }
570 
577  void setFixedAspectRatio( double ratio ) { mFixedAspectRatio = ratio; }
578 
579  QColor fillColor() const override { return color(); }
580  void setFillColor( const QColor &color ) override { setColor( color ); }
581 
582  QColor strokeColor() const override { return mStrokeColor; }
583  void setStrokeColor( const QColor &c ) override { mStrokeColor = c; }
584 
585  double strokeWidth() const { return mStrokeWidth; }
586  void setStrokeWidth( double w ) { mStrokeWidth = w; }
587 
593  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
594 
599  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
600 
601  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
602  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
603 
604  void setOutputUnit( QgsUnitTypes::RenderUnit unit ) override;
605  QgsUnitTypes::RenderUnit outputUnit() const override;
606 
607  void setMapUnitScale( const QgsMapUnitScale &scale ) override;
608  QgsMapUnitScale mapUnitScale() const override;
609 
610  bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const override;
611 
612  QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;
613 
614  protected:
615 
623  double calculateAspectRatio( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedAspectRatio ) const;
624 
625  QString mPath;
626 
628  double mDefaultAspectRatio = 0.0;
630  double mFixedAspectRatio = 0.0;
631  //param(fill), param(stroke), param(stroke-width) are going
632  //to be replaced in memory
633  QColor mStrokeColor;
634  double mStrokeWidth;
637 
638  private:
639  double calculateSize( QgsSymbolRenderContext &context, bool &hasDataDefinedSize ) const;
640  void calculateOffsetAndRotation( QgsSymbolRenderContext &context, double scaledSize, QPointF &offset, double &angle ) const;
641 
642 };
643 
644 
646 
647 #define POINT2MM(x) ( (x) * 25.4 / 72 ) // point is 1/72 of inch
648 #define MM2POINT(x) ( (x) * 72 / 25.4 )
649 
650 #define DEFAULT_FONTMARKER_FONT "Dingbats"
651 #define DEFAULT_FONTMARKER_CHR QChar('A')
652 #define DEFAULT_FONTMARKER_SIZE POINT2MM(12)
653 #define DEFAULT_FONTMARKER_COLOR QColor( 35, 35, 35 )
654 #define DEFAULT_FONTMARKER_BORDERCOLOR QColor(Qt::white)
655 #define DEFAULT_FONTMARKER_JOINSTYLE Qt::MiterJoin
656 #define DEFAULT_FONTMARKER_ANGLE 0
657 
663 {
664  public:
665  QgsFontMarkerSymbolLayer( const QString &fontFamily = DEFAULT_FONTMARKER_FONT,
666  QChar chr = DEFAULT_FONTMARKER_CHR,
667  double pointSize = DEFAULT_FONTMARKER_SIZE,
668  const QColor &color = DEFAULT_FONTMARKER_COLOR,
669  double angle = DEFAULT_FONTMARKER_ANGLE );
670 
671  ~QgsFontMarkerSymbolLayer() override;
672 
673  // static stuff
674 
675  static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY;
676  static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY;
677 
678  // implemented from base classes
679 
680  QString layerType() const override;
681 
682  void startRender( QgsSymbolRenderContext &context ) override;
683 
684  void stopRender( QgsSymbolRenderContext &context ) override;
685 
686  void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override;
687 
688  QgsStringMap properties() const override;
689 
690  QgsFontMarkerSymbolLayer *clone() const override SIP_FACTORY;
691 
692  void writeSldMarker( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const override;
693 
694  // new methods
695 
696  QString fontFamily() const { return mFontFamily; }
697  void setFontFamily( const QString &family ) { mFontFamily = family; }
698 
699  QChar character() const { return mChr; }
700  void setCharacter( QChar ch ) { mChr = ch; }
701 
702  QColor strokeColor() const override { return mStrokeColor; }
703  void setStrokeColor( const QColor &color ) override { mStrokeColor = color; }
704 
708  double strokeWidth() const { return mStrokeWidth; }
709 
713  void setStrokeWidth( double width ) { mStrokeWidth = width; }
714 
718  QgsUnitTypes::RenderUnit strokeWidthUnit() const { return mStrokeWidthUnit; }
719 
723  void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ) { mStrokeWidthUnit = unit; }
724 
728  const QgsMapUnitScale &strokeWidthMapUnitScale() const { return mStrokeWidthMapUnitScale; }
729 
733  void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ) { mStrokeWidthMapUnitScale = scale; }
734 
738  Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
739 
743  void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
744 
745  QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;
746 
747  protected:
748 
749  QString mFontFamily;
750  QFontMetrics *mFontMetrics = nullptr;
751  QChar mChr;
752 
753  double mChrWidth = 0;
754  QPointF mChrOffset;
755  QFont mFont;
756  double mOrigSize;
757 
758  private:
759 
760  QColor mStrokeColor;
761  double mStrokeWidth;
762  QgsUnitTypes::RenderUnit mStrokeWidthUnit;
763  QgsMapUnitScale mStrokeWidthMapUnitScale;
764  Qt::PenJoinStyle mPenJoinStyle;
765 
766  QPen mPen;
767  QBrush mBrush;
768 
769  QString characterToRender( QgsSymbolRenderContext &context, QPointF &charOffset, double &charWidth );
770  void calculateOffsetAndRotation( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedRotation, QPointF &offset, double &angle ) const;
771  double calculateSize( QgsSymbolRenderContext &context );
772 };
773 
774 // clazy:excludeall=qstring-allocations
775 
776 #endif
777 
778 
#define DEFAULT_SIMPLEMARKER_SIZE
QgsMapUnitScale mapUnitScale() const override
QRectF bounds(QPointF point, QgsSymbolRenderContext &context) override
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
double fixedAspectRatio() const
Returns the marker aspect ratio between width and height to be used in rendering, if the value set is...
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the marker&#39;s stroke join style (e.g., miter, bevel, etc).
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Set stroke width map unit scale.
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
QColor mStrokeColor
Stroke color.
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
virtual QgsSymbol * subSymbol()
Returns the symbol&#39;s sub symbol, if present.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit u)
Sets the unit for the width of the marker&#39;s stroke.
void setStrokeStyle(Qt::PenStyle strokeStyle)
Sets the marker&#39;s stroke style (e.g., solid, dashed, etc)
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an stroke...
Abstract base class for simple marker symbol layers.
Right facing arrow head (unfilled, lines only)
void startRender(QgsSymbolRenderContext &context) override
QgsMapUnitScale mStrokeWidthMapUnitScale
Stroke width map unit scale.
void setStrokeColor(const QColor &color) override
Sets the marker&#39;s stroke color.
void setStrokeColor(const QColor &c) override
Set stroke color.
void setStrokeWidth(double w)
Sets the width of the marker&#39;s stroke.
#define DEFAULT_FONTMARKER_COLOR
QBrush mSelBrush
QBrush to use as fill of selected symbols.
void setStrokeWidth(double width)
Set stroke width.
QColor strokeColor() const override
Returns the marker&#39;s stroke color.
#define DEFAULT_SIMPLEMARKER_JOINSTYLE
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
Qt::PenJoinStyle penJoinStyle() const
Get stroke join style.
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
void renderPoint(QPointF point, QgsSymbolRenderContext &context) override
Renders a marker at the specified point.
QString path() const
Returns the marker SVG path.
#define DEFAULT_FONTMARKER_SIZE
QColor strokeColor() const override
Get stroke color.
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
double strokeWidth() const
Returns the width of the marker&#39;s stroke.
QPainterPath mPath
Painter path representing shape. If mPolygon is empty then the shape is stored in mPath...
Diagonal half square (bottom left half)
virtual void setColor(const QColor &color)
The fill color.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Get stroke width unit.
virtual void writeSldMarker(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
Writes the symbol layer definition as a SLD XML element.
virtual QRectF bounds(QPointF point, QgsSymbolRenderContext &context)=0
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
One third circle (top left third)
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the stroke width.
virtual bool setSubSymbol(QgsSymbol *symbol)
set layer&#39;s subsymbol. takes ownership of the passed symbol
void setStrokeColor(const QColor &color) override
Set stroke color.
QPen mPen
QPen corresponding to marker&#39;s stroke style.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the width of the marker&#39;s stroke.
#define DEFAULT_SCALE_METHOD
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Get stroke width map unit scale.
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the map scale for the width of the marker&#39;s stroke.
QBrush mBrush
QBrush corresponding to marker&#39;s fill style.
QgsMapUnitScale mStrokeWidthMapUnitScale
#define SIP_FORCE
Definition: qgis_sip.h:124
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
#define SIP_TRANSFER
Definition: qgis_sip.h:36
virtual QColor color() const
The fill color.
void setFillColor(const QColor &color) override
Set fill color.
QColor fillColor() const override
Get fill color.
#define DEFAULT_FONTMARKER_ANGLE
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Set stroke width unit.
#define SIP_FACTORY
Definition: qgis_sip.h:69
Qt::PenJoinStyle penJoinStyle() const
Returns the marker&#39;s stroke join style (e.g., miter, bevel, etc).
ScaleMethod
Scale method.
Definition: qgssymbol.h:94
QgsSimpleMarkerSymbolLayerBase::Shape shape() const
Returns the shape for the rendered marker symbol.
QPen mSelPen
QPen to use as stroke of selected symbols.
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
Qt::PenStyle strokeStyle() const
Returns the marker&#39;s stroke style (e.g., solid, dashed, etc)
void startRender(QgsSymbolRenderContext &context) override
void stopRender(QgsSymbolRenderContext &context) override
void setFixedAspectRatio(double ratio)
Set the marker aspect ratio between width and height to be used in rendering, if the value set is low...
double defaultAspectRatio() const
Returns the default marker aspect ratio between width and height, 0 if not yet calculated.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the unit for the width of the marker&#39;s stroke.
#define DEFAULT_SIMPLEMARKER_BORDERCOLOR
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Contains information about the context of a rendering operation.
Abstract base class for marker symbol layers.
void setShape(QgsSimpleMarkerSymbolLayerBase::Shape shape)
Sets the rendered marker shape.
QgsUnitTypes::RenderUnit mStrokeWidthUnit
bool preservedAspectRatio() const
Returns the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0...
QImage mCache
Cached image of marker, if using cached version.
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setMapUnitScale(const QgsMapUnitScale &scale) override
#define DEFAULT_SIMPLEMARKER_ANGLE
#define DEFAULT_SIMPLEMARKER_COLOR
Qt::PenJoinStyle mPenJoinStyle
Stroke pen join style.
double strokeWidth() const
Get stroke width.
QColor fillColor() const override
Get fill color.
QImage mSelCache
Cached image of selected marker, if using cached version.
#define DEFAULT_FONTMARKER_CHR
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the stroke width.
void setFontFamily(const QString &family)
void setFillColor(const QColor &color) override
Set fill color.
QColor strokeColor() const override
Get stroke color.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
Resolves relative paths into absolute paths and vice versa.
#define DEFAULT_SVGMARKER_SIZE
Filled marker symbol layer, consisting of a shape which is rendered using a QgsFillSymbol.
#define DEFAULT_SVGMARKER_ANGLE
Rotated cross (lines only), "x" shape.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
QPolygonF mPolygon
Polygon of points in shape. If polygon is empty then shape is using mPath.
#define DEFAULT_FONTMARKER_FONT
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:100
virtual QString layerType() const =0
Returns a string that represents this layer type.