QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
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>
51 static QList< QgsEllipseSymbolLayer::Shape > availableShapes();
68 QString layerType() const override;
72 QVariantMap properties() const override;
74 void toSld( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
75 void writeSldMarker( QDomDocument &doc, QDomElement &element, const QVariantMap &props ) const override;
77 bool writeDxf(
QgsDxfExport &e,
double mmMapUnitScaleFactor, const QString &layerName,
QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const override;
85 Q_DECL_DEPRECATED
void setSymbolName( const QString &name )
SIP_DEPRECATED { mShape = decodeShape( name ); }
130 void setSize(
double size )
override;
132 void setSymbolWidth(
double w );
135 void setSymbolHeight(
double h );
244 Shape mShape = Circle;
245 double mSymbolWidth = 4;
248 double mSymbolHeight = 3;
252 Qt::PenStyle mStrokeStyle = Qt::SolidLine;
254 Qt::PenCapStyle mPenCapStyle = Qt::SquareCap;
255 double mStrokeWidth = 0;
259 QPainterPath mPainterPath;
277 QSizeF calculateSize(
QgsSymbolRenderContext &context,
double *scaledWidth =
nullptr,
double *scaledHeight =
nullptr );
278 void calculateOffsetAndRotation(
QgsSymbolRenderContext &context,
double scaledWidth,
double scaledHeight,
bool &hasDataDefinedRotation, QPointF &offset,
double &
angle )
const;
283 #endif // QGSELLIPSESYMBOLLAYER_H
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
@ Cross
Stroke-only cross.
const QgsMapUnitScale & symbolWidthMapUnitScale() const
Qt::PenStyle strokeStyle() const
double strokeWidth() const
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
RenderUnit
Rendering size units.
Exports QGIS layers to the DXF format.
QgsMapUnitScale mapUnitScale() const override
Q_DECL_DEPRECATED QString symbolName() const
Returns the shape name for the rendered ellipse marker symbol.
QColor strokeColor() const override
Returns the stroke color for the symbol layer.
void setFillColor(const QColor &c) override
Sets the fill color for the symbol layer.
@ RenderMillimeters
Millimeters.
Abstract base class for marker symbol layers.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setStrokeColor(const QColor &c) override
Sets the stroke color for the symbol layer.
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. ellipse, rectangle,...
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
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.
@ LeftHalfTriangle
Left half of a triangle.
void setPenCapStyle(Qt::PenCapStyle style)
Sets the marker's stroke cap style (e.g., flat, round, etc).
void setShape(QgsEllipseSymbolLayer::Shape shape)
Sets the rendered ellipse marker shape.
void setStrokeWidth(double w)
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
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.
Shape
Marker symbol shapes.
Struct for storing maximum and minimum scales for measurements in map units.
QgsEllipseSymbolLayer::Shape shape() const
Returns the shape for the rendered ellipse marker symbol.
@ HalfArc
Stroke-only half arc (since QGIS 3.20)
QColor fillColor() const override
Returns the fill color for the symbol layer.
@ Arrow
Stroke-only arrow (since QGIS 3.20)
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
@ RightHalfTriangle
Right half of a triangle.
const QgsMapUnitScale & symbolHeightMapUnitScale() const
double symbolWidth() const
Qt::PenCapStyle penCapStyle() const
Returns the marker's stroke cap style (e.g., flat, round, etc).
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 QColor color() const
Returns the "representative" color of the symbol layer.
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
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 setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
#define DEFAULT_ELLIPSE_JOINSTYLE
double symbolHeight() const