QgsEllipseSymbolLayer class

A symbol layer for rendering objects with major and minor axis (e.g.

Contents

ellipse, rectangle )

Base classes

class QgsMarkerSymbolLayer
Abstract base class for marker symbol layers.

Public functions

auto bounds(QPointF point, QgsSymbolRenderContext& context) -> QRectF override
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined overrides and offsets which are set for the marker layer.
auto clone() const -> QgsEllipseSymbolLayer* override
Shall be reimplemented by subclasses to create a deep copy of the instance.
auto fillColor() const -> QColor override
Gets fill color.
auto layerType() const -> QString override
Returns a string that represents this layer type.
auto outputUnit() const -> QgsUnitTypes::RenderUnit override
Returns the units to use for sizes and widths within the symbol layer.
auto penJoinStyle() const -> Qt::PenJoinStyle
Gets stroke join style.
auto properties() const -> QgsStringMap override
Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer.
void renderPoint(QPointF point, QgsSymbolRenderContext& context) override
Renders a marker at the specified point.
void setFillColor(const QColor& color) override
Set fill color.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
void setStrokeColor(const QColor& color) override
Set stroke color.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
auto strokeColor() const -> QColor override
Gets stroke color.
auto strokeWidthUnit() const -> QgsUnitTypes::RenderUnit
Returns the units for the symbol's stroke width.
auto symbolHeightUnit() const -> QgsUnitTypes::RenderUnit
Returns the units for the symbol's height.
auto symbolWidthUnit() const -> QgsUnitTypes::RenderUnit
Returns the units for the symbol's width.
auto writeDxf(QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, QgsSymbolRenderContext& context, QPointF shift = QPointF(0.0, 0.0)) const -> bool override
write as DXF
void writeSldMarker(QDomDocument& doc, QDomElement& element, const QgsStringMap& props) const override
Writes the symbol layer definition as a SLD XML element.

Function documentation

QRectF QgsEllipseSymbolLayer::bounds(QPointF point, QgsSymbolRenderContext& context) override

Returns the approximate bounding box of the marker symbol layer, taking into account any data defined overrides and offsets which are set for the marker layer.

Returns approximate symbol bounds, in painter units

QColor QgsEllipseSymbolLayer::fillColor() const override

Gets fill color.

Supported by marker and fill layers.

QString QgsEllipseSymbolLayer::layerType() const override

Returns a string that represents this layer type.

Used for serialization. Should match with the string used to register this symbol layer in the registry.

QgsUnitTypes::RenderUnit QgsEllipseSymbolLayer::outputUnit() const override

Returns the units to use for sizes and widths within the symbol layer.

Returns output unit, or QgsUnitTypes::RenderUnknownUnit if the symbol layer contains mixed units

Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.

Qt::PenJoinStyle QgsEllipseSymbolLayer::penJoinStyle() const

Gets stroke join style.

QgsStringMap QgsEllipseSymbolLayer::properties() const override

Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer.

This is used to serialize a symbol layer perstistently.

void QgsEllipseSymbolLayer::renderPoint(QPointF point, QgsSymbolRenderContext& context) override

Renders a marker at the specified point.

Parameters
point position at which to render point, in painter units
context symbol render context

Derived classes must implement this to handle drawing the point.

void QgsEllipseSymbolLayer::setFillColor(const QColor& color) override

Set fill color.

Supported by marker and fill layers.

void QgsEllipseSymbolLayer::setOutputUnit(QgsUnitTypes::RenderUnit unit) override

Sets the units to use for sizes and widths within the symbol layer.

Parameters
unit output units

Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.

void QgsEllipseSymbolLayer::setPenJoinStyle(Qt::PenJoinStyle style)

Set stroke join style.

void QgsEllipseSymbolLayer::setStrokeColor(const QColor& color) override

Set stroke color.

Supported by marker and fill layers.

void QgsEllipseSymbolLayer::setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)

Sets the units for the symbol's stroke width.

Parameters
unit symbol units

void QgsEllipseSymbolLayer::setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)

Sets the units for the symbol's height.

Parameters
unit symbol units

void QgsEllipseSymbolLayer::setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)

Sets the units for the symbol's width.

Parameters
unit symbol units

QColor QgsEllipseSymbolLayer::strokeColor() const override

Gets stroke color.

Supported by marker and fill layers.

QgsUnitTypes::RenderUnit QgsEllipseSymbolLayer::strokeWidthUnit() const

Returns the units for the symbol's stroke width.

QgsUnitTypes::RenderUnit QgsEllipseSymbolLayer::symbolHeightUnit() const

Returns the units for the symbol's height.

QgsUnitTypes::RenderUnit QgsEllipseSymbolLayer::symbolWidthUnit() const

Returns the units for the symbol's width.

void QgsEllipseSymbolLayer::writeSldMarker(QDomDocument& doc, QDomElement& element, const QgsStringMap& props) const override

Writes the symbol layer definition as a SLD XML element.

Parameters
doc XML document
element parent XML element
props symbol layer definition (see properties())