15 #ifndef QGSELLIPSESYMBOLLAYER_H 16 #define QGSELLIPSESYMBOLLAYER_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 // QGSELLIPSESYMBOLLAYER_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.
void setMapUnitScale(const QgsMapUnitScale &scale) override
double strokeWidth() const
const QgsMapUnitScale & symbolWidthMapUnitScale() const
virtual void setSize(double size)
Sets the symbol size.
QString symbolName() const
QColor fillColor() const override
Gets fill color.
void stopRender(QgsSymbolRenderContext &context) override
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.