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;
60 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
143 double mSymbolWidth = 4;
146 double mSymbolHeight = 3;
150 Qt::PenStyle mStrokeStyle = Qt::SolidLine;
152 double mStrokeWidth = 0;
156 QPainterPath mPainterPath;
169 void preparePath(
const QString &symbolName,
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr,
const QgsFeature *f =
nullptr );
170 QSizeF calculateSize(
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr );
171 void calculateOffsetAndRotation(
QgsSymbolRenderContext &context,
double scaledWidth,
double scaledHeight,
bool &hasDataDefinedRotation, QPointF &offset,
double &
angle )
const;
176 #endif // QGSELLIPSESYMBOLLAYERV2_H 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.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
void setFillColor(const QColor &c) override
Set fill color.
void startRender(QgsSymbolRenderContext &context) override
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...
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)
const QgsMapUnitScale & symbolHeightMapUnitScale() const
virtual void setColor(const QColor &color)
The fill color.
QgsUnitTypes::RenderUnit symbolHeightUnit() const
Returns the units for the symbol's height.
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 void writeSldMarker(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
Writes the symbol layer definition as a SLD XML element.
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
virtual QRectF bounds(QPointF point, QgsSymbolRenderContext &context)=0
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
Qt::PenStyle strokeStyle() const
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.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QColor color() const
The fill color.
void setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
double symbolWidth() const
#define DEFAULT_ELLIPSE_JOINSTYLE
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
Abstract base class for marker symbol layers.
void setStrokeStyle(Qt::PenStyle strokeStyle)
void setStrokeColor(const QColor &c) override
Set stroke color.
double symbolHeight() const
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setMapUnitScale(const QgsMapUnitScale &scale) override
double strokeWidth() const
void setSymbolHeight(double h)
const QgsMapUnitScale & symbolWidthMapUnitScale() const
QString symbolName() const
QColor fillColor() const override
Gets fill color.
void setSymbolWidth(double w)
void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
void setSymbolWidthMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit symbolWidthUnit() const
Returns the units for the symbol's width.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
RenderUnit
Rendering size units.
virtual QString layerType() const =0
Returns a string that represents this layer type.