15 #ifndef QGSELLIPSESYMBOLLAYER_H
16 #define QGSELLIPSESYMBOLLAYER_H
18 #define DEFAULT_ELLIPSE_JOINSTYLE Qt::MiterJoin
20 #include "qgis_core.h"
23 #include <QPainterPath>
47 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
48 void writeSldMarker( QDomDocument &doc, QDomElement &element,
const QVariantMap &props )
const override;
55 void setSize(
double size )
override;
57 void setSymbolWidth(
double w );
60 void setSymbolHeight(
double h );
64 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
150 double mSymbolWidth = 4;
153 double mSymbolHeight = 3;
157 Qt::PenStyle mStrokeStyle = Qt::SolidLine;
159 double mStrokeWidth = 0;
163 QPainterPath mPainterPath;
180 void preparePath(
const QString &symbolName,
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr,
const QgsFeature *f =
nullptr );
181 QSizeF calculateSize(
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr );
182 void calculateOffsetAndRotation(
QgsSymbolRenderContext &context,
double scaledWidth,
double scaledHeight,
bool &hasDataDefinedRotation, QPointF &offset,
double &
angle )
const;
Exports QGIS layers to the DXF format.
A symbol layer for rendering objects with major and minor axis (e.g.
void setStrokeWidth(double w)
const QgsMapUnitScale & symbolHeightMapUnitScale() const
void setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
void setSymbolWidthMapUnitScale(const QgsMapUnitScale &scale)
void setSymbolName(const QString &name)
const QgsMapUnitScale & strokeWidthMapUnitScale() const
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
double strokeWidth() const
void setStrokeColor(const QColor &c) override
Set stroke color.
void setStrokeStyle(Qt::PenStyle strokeStyle)
QgsUnitTypes::RenderUnit symbolHeightUnit() const
Returns the units for the symbol's height.
QColor fillColor() const override
Gets fill color.
void setFillColor(const QColor &c) override
Set fill color.
QgsUnitTypes::RenderUnit symbolWidthUnit() const
Returns the units for the symbol's width.
Qt::PenStyle strokeStyle() const
double symbolWidth() const
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
QColor strokeColor() const override
Gets stroke color.
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
QString symbolName() const
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
double symbolHeight() const
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
const QgsMapUnitScale & symbolWidthMapUnitScale() const
Class for parsing and evaluation of expressions (formerly called "search strings").
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Struct for storing maximum and minimum scales for measurements in map units.
Abstract base class for marker symbol layers.
virtual void setSize(double size)
Sets the symbol size.
virtual QRectF bounds(QPointF point, QgsSymbolRenderContext &context)=0
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
QgsMapUnitScale mapUnitScale() const override
void stopRender(QgsSymbolRenderContext &context) override
Called after a set of rendering operations has finished on the supplied render context.
void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const override
Saves the symbol layer as SLD.
virtual void writeSldMarker(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const
Writes the symbol layer definition as a SLD XML element.
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
void startRender(QgsSymbolRenderContext &context) override
Called before a set of rendering operations commences on the supplied render context.
void setMapUnitScale(const QgsMapUnitScale &scale) override
virtual QColor color() const
The fill color.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
virtual void setColor(const QColor &color)
The fill color.
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
RenderUnit
Rendering size units.
@ RenderMillimeters
Millimeters.
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)
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
#define DEFAULT_ELLIPSE_JOINSTYLE