15 #ifndef QGSELLIPSESYMBOLLAYERV2_H 16 #define QGSELLIPSESYMBOLLAYERV2_H 18 #define DEFAULT_ELLIPSE_JOINSTYLE Qt::MiterJoin 20 #include "qgis_core.h" 23 #include <QPainterPath> 45 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
53 void setSize(
double size )
override;
55 void setSymbolWidth(
double w );
58 void setSymbolHeight(
double h );
62 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
145 double mSymbolWidth = 4;
148 double mSymbolHeight = 3;
152 Qt::PenStyle mStrokeStyle = Qt::SolidLine;
154 double mStrokeWidth = 0;
158 QPainterPath mPainterPath;
171 void preparePath(
const QString &symbolName,
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr,
const QgsFeature *f =
nullptr );
172 QSizeF calculateSize(
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr );
173 void calculateOffsetAndRotation(
QgsSymbolRenderContext &context,
double scaledWidth,
double scaledHeight,
bool &hasDataDefinedRotation, QPointF &offset,
double &
angle )
const;
178 #endif // QGSELLIPSESYMBOLLAYERV2_H const QgsMapUnitScale & strokeWidthMapUnitScale() const
Class for parsing and evaluation of expressions (formerly called "search strings").
QgsMapUnitScale mapUnitScale() const override
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
void setFillColor(const QColor &c) override
Set fill color.
QgsUnitTypes::RenderUnit symbolWidthUnit() const
Returns the units for the symbol's width.
void startRender(QgsSymbolRenderContext &context) override
double symbolWidth() const
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
virtual void writeSldMarker(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
Writes the symbol layer definition as a SLD XML element.
QColor strokeColor() const override
Gets stroke color.
QMap< QString, QString > QgsStringMap
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)
void setStrokeWidth(double w)
virtual void setColor(const QColor &color)
The fill color.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
virtual QRectF bounds(QPointF point, QgsSymbolRenderContext &context)=0
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
A symbol layer for rendering objects with major and minor axis (e.g.
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
void setSymbolName(const QString &name)
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
double symbolHeight() const
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
#define DEFAULT_ELLIPSE_JOINSTYLE
QString symbolName() const
double strokeWidth() const
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
const QgsMapUnitScale & symbolHeightMapUnitScale() const
Abstract base class for marker symbol layers.
void setStrokeStyle(Qt::PenStyle strokeStyle)
void setStrokeColor(const QColor &c) override
Set stroke color.
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setMapUnitScale(const QgsMapUnitScale &scale) override
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
virtual void setSize(double size)
Sets the symbol size.
Qt::PenStyle strokeStyle() const
const QgsMapUnitScale & symbolWidthMapUnitScale() const
QColor fillColor() const override
Gets fill color.
QgsUnitTypes::RenderUnit symbolHeightUnit() const
Returns the units for the symbol's height.
void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override
virtual QColor color() const
The fill color.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
void setSymbolWidthMapUnitScale(const QgsMapUnitScale &scale)
RenderUnit
Rendering size units.
virtual QString layerType() const =0
Returns a string that represents this layer type.