QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
15 #ifndef QGSELLIPSESYMBOLLAYER_H
16 #define QGSELLIPSESYMBOLLAYER_H
18 #define DEFAULT_ELLIPSE_JOINSTYLE Qt::MiterJoin
20 #include "qgis_core.h"
23 #include <QPainterPath>
46 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
54 void setSize(
double size )
override;
56 void setSymbolWidth(
double w );
59 void setSymbolHeight(
double h );
63 void setStrokeStyle( Qt::PenStyle strokeStyle ) { mStrokeStyle = strokeStyle; }
148 double mSymbolWidth = 4;
151 double mSymbolHeight = 3;
155 Qt::PenStyle mStrokeStyle = Qt::SolidLine;
157 double mStrokeWidth = 0;
161 QPainterPath mPainterPath;
178 void preparePath(
const QString &symbolName,
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr,
const QgsFeature *f =
nullptr );
179 QSizeF calculateSize(
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr );
180 void calculateOffsetAndRotation(
QgsSymbolRenderContext &context,
double scaledWidth,
double scaledHeight,
bool &hasDataDefinedRotation, QPointF &offset,
double &
angle )
const;
185 #endif // QGSELLIPSESYMBOLLAYER_H
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
const QgsMapUnitScale & symbolWidthMapUnitScale() const
Qt::PenStyle strokeStyle() const
double strokeWidth() const
RenderUnit
Rendering size units.
QgsMapUnitScale mapUnitScale() const override
QColor strokeColor() const override
Gets stroke color.
void setSymbolName(const QString &name)
virtual void setColor(const QColor &color)
The fill color.
virtual QColor color() const
The fill color.
void setFillColor(const QColor &c) override
Set fill color.
void startRender(QgsSymbolRenderContext &context) override
Called before a set of rendering operations commences on the supplied render context.
@ RenderMillimeters
Millimeters.
Abstract base class for marker symbol layers.
QString symbolName() const
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setStrokeColor(const QColor &c) override
Set stroke color.
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
A symbol layer for rendering objects with major and minor axis (e.g.
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
const QgsMapUnitScale & strokeWidthMapUnitScale() const
QgsUnitTypes::RenderUnit symbolHeightUnit() const
Returns the units for the symbol's height.
void setSymbolWidthMapUnitScale(const QgsMapUnitScale &scale)
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setStrokeWidth(double w)
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
Struct for storing maximum and minimum scales for measurements in map units.
QColor fillColor() const override
Gets fill color.
QMap< QString, QString > QgsStringMap
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
const QgsMapUnitScale & symbolHeightMapUnitScale() const
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
double symbolWidth() const
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...
virtual void setSize(double size)
Sets the symbol size.
virtual QString layerType() const =0
Returns a string that represents this layer type.
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsUnitTypes::RenderUnit symbolWidthUnit() const
Returns the units for the symbol's width.
void setStrokeStyle(Qt::PenStyle strokeStyle)
Class for parsing and evaluation of expressions (formerly called "search strings").
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
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 stopRender(QgsSymbolRenderContext &context) override
Called after a set of rendering operations has finished on the supplied render context.
void setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
#define DEFAULT_ELLIPSE_JOINSTYLE
double symbolHeight() const