QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
44 void QgsSymbolLayer::initPropertyDefinitions()
46 if ( !sPropertyDefinitions.isEmpty() )
49 QString origin = QStringLiteral(
"symbol" );
134 lSubSymbol->startFeatureRender( feature, context );
146 lSubSymbol->stopFeatureRender( feature, context );
168 Q_UNUSED( mmMapUnitScaleFactor )
169 Q_UNUSED( layerName )
204 return QVector<qreal>();
209 return Qt::SolidLine;
244 return Qgis::SymbolLayerFlags();
294 QgsSymbolLayer::initPropertyDefinitions();
295 return sPropertyDefinitions;
340 if ( !baseName.isEmpty() )
342 prefix.append( QStringLiteral(
"%1_dd_" ).arg( baseName ) );
345 if ( !map.contains( QStringLiteral(
"%1expression" ).arg( prefix ) ) )
351 bool active = ( map.value( QStringLiteral(
"%1active" ).arg( prefix ), QStringLiteral(
"1" ) ) != QLatin1String(
"0" ) );
352 QString expression = map.value( QStringLiteral(
"%1expression" ).arg( prefix ) ).toString();
353 bool useExpression = ( map.value( QStringLiteral(
"%1useexpr" ).arg( prefix ), QStringLiteral(
"1" ) ) != QLatin1String(
"0" ) );
354 QString
field = map.value( QStringLiteral(
"%1field" ).arg( prefix ), QString() ).toString();
365 static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
440 QVariantMap::const_iterator propIt = stringMap.constBegin();
441 for ( ; propIt != stringMap.constEnd(); ++propIt )
443 std::unique_ptr<QgsProperty> prop;
444 QString propertyName;
446 if ( propIt.key().endsWith( QLatin1String(
"_dd_expression" ) ) )
451 propertyName = propIt.key().left( propIt.key().length() - 14 );
453 prop = std::make_unique<QgsProperty>(
propertyFromMap( stringMap, propertyName ) );
455 else if ( propIt.key().endsWith( QLatin1String(
"_expression" ) ) )
460 propertyName = propIt.key().left( propIt.key().length() - 11 );
465 if ( !prop || !OLD_PROPS.contains( propertyName ) )
473 if ( propertyName == QLatin1String(
"width" ) )
475 else if ( propertyName == QLatin1String(
"color" ) )
546 std::unique_ptr< QgsEffectPainter > effectPainter;
547 if ( effect && effect->
enabled() )
548 effectPainter = std::make_unique< QgsEffectPainter >( context.
renderContext(), effect );
550 for ( QPointF point : std::as_const( points ) )
553 effectPainter.reset();
596 if ( !exprVal.isNull() )
604 if ( !exprVal.isNull() )
634 offsetX += anchorPointCorrectionX;
638 offsetX -= anchorPointCorrectionX;
644 offsetY += anchorPointCorrectionY;
648 offsetY -= anchorPointCorrectionY;
655 double c = std::cos(
angle ), s = std::sin(
angle );
661 if (
str.compare( QLatin1String(
"left" ), Qt::CaseInsensitive ) == 0 )
665 else if (
str.compare( QLatin1String(
"right" ), Qt::CaseInsensitive ) == 0 )
677 if (
str.compare( QLatin1String(
"top" ), Qt::CaseInsensitive ) == 0 )
681 else if (
str.compare( QLatin1String(
"bottom" ), Qt::CaseInsensitive ) == 0 )
750 std::unique_ptr< QgsEffectPainter > effectPainter;
751 if ( effect && effect->
enabled() )
752 effectPainter = std::make_unique< QgsEffectPainter >( context.
renderContext(), effect );
754 for (
const QList< QPolygonF > &line : points )
757 effectPainter.reset();
765 std::unique_ptr< QgsExpressionContextScopePopper > scopePopper;
794 for (
const QPolygonF &ring : std::as_const( *rings ) )
830 std::unique_ptr< QgsEffectPainter > effectPainter;
831 if ( effect && effect->
enabled() )
832 effectPainter = std::make_unique< QgsEffectPainter >( context.
renderContext(), effect );
834 for (
const QList< QPolygonF > &poly : polys )
836 QVector< QPolygonF > rings;
837 for (
int i = 1; i < poly.size(); ++i )
838 rings << poly.at( i );
842 effectPainter.reset();
855 if ( points.size() <= 5 &&
858 ( p->renderHints() & QPainter::Antialiasing ) )
860 p->setRenderHint( QPainter::Antialiasing,
false );
861 p->drawRect( points.boundingRect() );
862 p->setRenderHint( QPainter::Antialiasing,
true );
868 if ( !rings && p->pen().style() == Qt::NoPen )
871 p->drawPolygon( points );
877 path.addPolygon( points );
881 for (
auto it = rings->constBegin(); it != rings->constEnd(); ++it )
883 QPolygonF ring = *it;
884 path.addPolygon( ring );
894 QDomElement symbolizerElem = doc.createElement( QStringLiteral(
"se:PointSymbolizer" ) );
895 if ( !props.value( QStringLiteral(
"uom" ), QString() ).toString().isEmpty() )
896 symbolizerElem.setAttribute( QStringLiteral(
"uom" ), props.value( QStringLiteral(
"uom" ), QString() ).toString() );
897 element.appendChild( symbolizerElem );
912 #if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
920 if ( !clipPaths.isEmpty() )
922 QPainterPath mergedPaths;
923 mergedPaths.setFillRule( Qt::WindingFill );
924 for ( QPainterPath path : clipPaths )
926 mergedPaths.addPath( path );
929 if ( !mergedPaths.isEmpty() )
@ PropertyDashPatternOffset
Dash pattern offset,.
@ PropertyArrowHeadType
Arrow head type.
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for data defined symbology.
@ Right
Align to right side of symbol.
@ PropertyHorizontalAnchor
Horizontal anchor point.
bool prepare(const QgsExpressionContext &context=QgsExpressionContext()) const override
Prepares the collection against a specified expression context.
@ RenderSymbolPreview
The render is for a symbol preview only and map based properties may not be available,...
static QgsProperty fromField(const QString &fieldName, bool isActive=true)
Returns a new FieldBasedProperty created from the specified field name.
virtual QColor strokeColor() const
Returns the stroke color for the symbol layer.
@ PropertyBlurRadius
Shapeburst blur radius.
VerticalAnchorPoint
Symbol vertical anchor points.
@ PropertyArrowHeadThickness
Arrow head thickness.
RenderRingFilter
Options for filtering rings when the line symbol layer is being used to render a polygon's rings.
@ PropertyLineDistance
Distance between lines, or length of lines for hash line symbols.
virtual QList< QgsSymbolLayerReference > masks() const
Returns masks defined by this symbol layer.
@ PropertyShapeburstUseWholeShape
Shapeburst use whole shape.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
virtual double dxfAngle(QgsSymbolRenderContext &context) const
Gets angle.
double size() const
Returns the symbol size.
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the symbol layer's property collection, used for data defined overrides.
A store for object properties.
@ PropertyClipPoints
Whether markers should be clipped to polygon boundaries.
@ PropertyGradientReference2IsCentroid
Gradient reference point 2 is centroid.
RenderUnit
Rendering size units.
QgsMapUnitScale mSizeMapUnitScale
Marker size map unit scale.
Exports QGIS layers to the DXF format.
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
Renders the line symbol layer along the line joining points, using the given render context.
@ HorizontalAnchor
Horizontal anchor point.
QgsExpressionContext & expressionContext()
Gets the expression context.
@ AntialiasingSimplification
The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size'.
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
double mapUnitsPerPixel() const
Returns the current map units per pixel.
@ PropertyAverageAngleLength
Length to average symbol angles over.
void setRingFilter(QgsLineSymbolLayer::RenderRingFilter filter)
Sets the line symbol layer's ring filter, which controls which rings are rendered when the line symbo...
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
virtual bool isCompatibleWithSymbol(QgsSymbol *symbol) const
Returns if the layer can be used below the specified symbol.
virtual double width() const
Returns the estimated width for the line symbol layer.
QgsMapUnitScale mapUnitScale() const override
@ PropertyArrowStartWidth
Arrow tail start width.
QgsMarkerSymbolLayer(const QgsMarkerSymbolLayer &other)=delete
QgsMarkerSymbolLayer cannot be copied.
void addVariable(const QgsExpressionContextScope::StaticVariable &variable)
Adds a variable into the context scope.
virtual Qgis::SymbolLayerFlags flags() const
Returns flags which control the symbol layer's behavior.
bool isEmpty() const
Checks whether the container is empty.
virtual QVector< qreal > dxfCustomDashPattern(QgsUnitTypes::RenderUnit &unit) const
Gets dash pattern.
virtual void setFillColor(const QColor &color)
Sets the fill color for the symbol layer.
virtual void prepareExpressions(const QgsSymbolRenderContext &context)
Prepares all data defined property expressions for evaluation.
@ DataTypeString
Property requires a string value.
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
@ PropertyFontFamily
Font family.
@ PropertyFillStyle
Fill style (eg solid, dots)
@ PropertyGradientReference2Y
Gradient reference point 2 y.
@ PropertyFillColor
Fill color.
QgsMapUnitScale mWidthMapUnitScale
RenderRingFilter mRingFilter
std::unique_ptr< QgsPaintEffect > mPaintEffect
@ PropertyLineEndColorValue
End line color for interpolated line renderer (since QGIS 3.22)
void setRenderingPass(int renderingPass)
Specifies the rendering pass in which this symbol layer should be rendered.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
@ PropertyGradientReference1IsCentroid
Gradient reference point 1 is centroid.
Qgis::RenderContextFlags flags() const
Returns combination of flags used for rendering.
QgsSymbolLayer(const QgsSymbolLayer &other)=delete
QgsSymbolLayer cannot be copied.
void startRender(QgsSymbolRenderContext &context) override
Called before a set of rendering operations commences on the supplied render context.
@ PropertyDisplacementX
Horizontal displacement.
void _renderPolygon(QPainter *p, const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context)
Default method to render polygon.
@ FillStyle
Fill style (eg solid, lines)
Contains information about the context of a rendering operation.
@ DataTypeNumeric
Property requires a numeric value.
@ Double
Double value (including negative values)
@ RenderMillimeters
Millimeters.
@ PenJoinStyle
Pen join style.
@ PropertyInterval
Line marker interval.
QgsProperty propertyFromMap(const QVariantMap &map, const QString &baseName)
virtual ~QgsSymbolLayer()
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
@ PropertyCapStyle
Line cap style.
Abstract base class for all rendered symbols.
void setMapUnitScale(const QgsMapUnitScale &scale) override
static QgsProperty fromExpression(const QString &expression, bool isActive=true)
Returns a new ExpressionBasedProperty created from the specified expression.
QgsUnitTypes::RenderUnit mSizeUnit
Marker size unit.
@ PropertyStrokeColor
Stroke color.
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
VerticalAnchorPoint mVerticalAnchorPoint
Vertical anchor point.
static double mapUnitScaleFactor(double scale, QgsUnitTypes::RenderUnit symbolUnits, QgsUnitTypes::DistanceUnit mapUnits, double mapUnitsPerPixel=1.0)
Returns scale factor for conversion to map units.
QgsMapUnitScale mapUnitScale() const override
virtual void renderPolygon(const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context)=0
Renders the fill symbol layer for the polygon whose outer ring is defined by points,...
const QgsLegendPatchShape * patchShape() const
Returns the symbol patch shape, to use if rendering symbol preview icons.
QList< QList< QPolygonF > > defaultPatchAsQPolygonF(Qgis::SymbolType type, QSizeF size) const
Returns the default patch geometry for the given symbol type and size as a set of QPolygonF objects (...
static void createGeometryElement(QDomDocument &doc, QDomElement &element, const QString &geomFunc)
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
@ String
Any string value.
@ PropertyFontStyle
Font style.
QgsUnitTypes::RenderUnit mOffsetUnit
Offset units.
static QgsStyle * defaultStyle()
Returns default application-wide style.
@ PropertyArrowHeadLength
Arrow head length.
virtual QString filter(const QgsFields &fields=QgsFields())
If a renderer does not require all the features this method may be overridden and return an expressio...
@ PropertyGradientSpread
Gradient spread mode.
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
HorizontalAnchorPoint
Symbol horizontal anchor points.
@ Rotation
Rotation (value between 0-360 degrees)
QgsUnitTypes::RenderUnit mOffsetUnit
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
static QPointF toPoint(const QVariant &value, bool *ok=nullptr)
Converts a value to a point.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
virtual bool writeDxf(QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
write as DXF
void markerOffset(QgsSymbolRenderContext &context, double &offsetX, double &offsetY) const
Calculates the required marker offset, including both the symbol offset and any displacement required...
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
virtual void writeSldMarker(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const
Writes the symbol layer definition as a SLD XML element.
@ PropertyLineStartWidthValue
Start line width for interpolated line renderer (since QGIS 3.22)
@ PropertyOffset
Symbol offset.
static bool isDefaultStack(QgsPaintEffect *effect)
Tests whether a paint effect matches the default effects stack.
@ PropertyCharacter
Character, eg for font marker symbol layers.
@ PropertyMarkerClipping
Marker clipping mode (since QGIS 3.24)
@ PropertyGradientType
Gradient fill type.
QgsUnitTypes::DistanceUnit mapUnits() const
Retrieve map units.
virtual double dxfOffset(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets offset.
@ PropertyArrowWidth
Arrow tail width.
QgsFillSymbolLayer(const QgsFillSymbolLayer &other)=delete
QgsFillSymbolLayer cannot be copied.
@ Top
Align to top of symbol.
int renderingPass() const
Specifies the rendering pass in which this symbol layer should be rendered.
@ PropertyRandomSeed
Random number seed.
void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props) const override
Saves the symbol layer as SLD.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
QgsFields fields() const
Fields of the layer.
Qgis::SymbolType type() const
Returns the symbol's type.
bool hasActiveProperties() const override
Returns true if the collection has any active properties, or false if all properties within the colle...
@ VerticalAnchor
Vertical anchor point.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
@ HCenter
Align to horizontal center of symbol.
@ ColorWithAlpha
Color with alpha channel.
@ PropertyVerticalAnchor
Vertical anchor point.
@ PropertyGradientReference1Y
Gradient reference point 1 y.
@ PropertySize
Symbol size.
QgsUnitTypes::RenderUnit mWidthUnit
double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const override
Gets line width.
void copyPaintEffect(QgsSymbolLayer *destLayer) const
Copies paint effect of this layer to another symbol layer.
virtual void renderPolygonStroke(const QPolygonF &points, const QVector< QPolygonF > *rings, QgsSymbolRenderContext &context)
Renders the line symbol layer along the outline of polygon, using the given render context.
@ PropertyStrokeStyle
Stroke style (eg solid, dashed)
QSize outputSize() const
Returns the size of the resulting rendered image, in pixels.
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
@ PropertyRandomOffsetX
Random offset X (since QGIS 3.24)
VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
@ PropertyLineClipping
Line clipping mode (since QGIS 3.24)
@ CapStyle
Line cap style (eg round)
Definition for a property.
@ Bottom
Align to bottom of symbol.
float threshold() const
Gets the simplification threshold of the vector layer managed.
@ PropertyTrimEnd
Trim distance from end of line (since QGIS 3.20)
void setPaintEffect(QgsPaintEffect *effect)
Sets the current paint effect for the layer.
void restoreOldDataDefinedProperties(const QVariantMap &stringMap)
Restores older data defined properties from string map.
@ Left
Align to left side of symbol.
@ PropertyName
Name, eg shape name for simple markers.
Struct for storing maximum and minimum scales for measurements in map units.
QList< QPainterPath > symbolLayerClipPaths(const QgsSymbolLayer *symbolLayer) const
Returns clip paths to be applied to the symbolLayer before rendering.
@ PropertyPointCount
Point count.
QgsPaintEffect * paintEffect() const
Returns the current paint effect for the layer.
QSet< QString > referencedFields(const QgsExpressionContext &context=QgsExpressionContext(), bool ignoreContext=false) const override
Returns the set of any fields referenced by the active properties from the collection.
QgsPropertyCollection mDataDefinedProperties
@ PropertyStrokeWidth
Stroke width.
@ PropertyShapeburstIgnoreRings
Shapeburst ignore rings.
static const QString EXPR_GEOMETRY_RING_NUM
Inbuilt variable name for geometry ring number variable.
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
static QString encodePoint(QPointF point)
Encodes a QPointF to a string.
@ VCenter
Align to vertical center of symbol.
Single scope for storing variables and functions for use within a QgsExpressionContext....
@ InteriorRingsOnly
Render the interior rings only.
const QgsVectorSimplifyMethod & vectorSimplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
@ Double0To1
Double value between 0-1 (inclusive)
@ PropertyLayerEnabled
Whether symbol layer is enabled.
@ PropertyOffsetAlongLine
Offset along line.
@ PropertyOffsetY
Vertical offset.
double convertToPainterUnits(double size, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &scale=QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property=Qgis::RenderSubcomponentProperty::Generic) const
Converts a size from the specified units to painter units (pixels).
@ IntegerPositive
Positive integer values (including 0)
virtual Qt::BrushStyle dxfBrushStyle() const
Gets brush/fill style.
@ Size
1D size (eg marker radius, or square marker height/width)
QPointF mOffset
Marker offset.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the symbol layer's property collection, used for data defined overrides.
@ PropertyGradientReference2X
Gradient reference point 2 x.
HorizontalAnchorPoint mHorizontalAnchorPoint
Horizontal anchor point.
QList< QList< QPolygonF > > toQPolygonF(Qgis::SymbolType type, QSizeF size) const
Converts the patch shape to a set of QPolygonF objects representing how the patch should be drawn for...
QgsLineSymbolLayer(const QgsLineSymbolLayer &other)=delete
QgsLineSymbolLayer cannot be copied.
@ PropertyCoordinateMode
Gradient coordinate mode.
QVariant value(int key, const QgsExpressionContext &context, const QVariant &defaultValue=QVariant()) const override
Returns the calculated value of the property with the specified key from within the collection.
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
Qgis::SymbolType type() const
@ LineStyle
Line style (eg solid/dashed)
@ PropertyDistanceY
Vertical distance between points.
RenderRingFilter ringFilter() const
Returns the line symbol layer's ring filter, which controls which rings are rendered when the line sy...
@ PropertyDistanceX
Horizontal distance between points.
virtual void setStrokeColor(const QColor &color)
Sets the stroke color for the symbol layer.
@ PropertyFile
Filename, eg for svg files.
@ PropertyCustomDash
Custom dash pattern.
Base class for visual effects which can be applied to QPicture drawings.
@ PropertyAngle
Symbol angle.
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
@ RenderMetersInMapUnits
Meters value as Map units.
@ PropertyArrowType
Arrow type.
@ RenderUnknownUnit
Mixed or unknown units.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
@ AllRings
Render both exterior and interior rings.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
@ PropertyShapeburstMaxDistance
Shapeburst fill from edge distance.
HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
Property
Data definable properties.
@ PropertyRandomOffsetY
Random offset Y (since QGIS 3.24)
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
static QPointF _rotatedOffset(QPointF offset, double angle)
Adjusts a marker offset to account for rotation.
virtual QColor fillColor() const
Returns the fill color for the symbol layer.
QPointF offset() const
Returns the marker's offset, which is the horizontal and vertical displacement which the rendered mar...
The Qgis class provides global constants for use throughout the application.
SimplifyHints simplifyHints() const
Gets the simplification hints of the vector layer managed.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
@ PropertyGradientReference1X
Gradient reference point 1 x.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
@ PropertyOpacity
Opacity.
QgsRenderContext & renderContext()
Returns a reference to the context's render context.
double symbologyScale() const
Returns the reference scale for output.
@ PropertyTrimStart
Trim distance from start of line (since QGIS 3.20)
@ PropertyHeight
Symbol height.
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the line's width.
@ ExteriorRingOnly
Render the exterior ring only.
@ PropertyOffsetX
Horizontal offset.
QPainter * painter()
Returns the destination QPainter for the render operation.
bool enabled() const
Returns whether the effect is enabled.
Single variable definition for use within a QgsExpressionContextScope.
bool isActive(int key) const override
Returns true if the collection contains an active property with the specified key.
@ PropertyLineEndWidthValue
End line width for interpolated line renderer (since QGIS 3.22)
@ PropertyLineStartColorValue
Start line color for interpolated line renderer (since QGIS 3.22)
virtual double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets line width.
QgsMapUnitScale mOffsetMapUnitScale
Offset map unit scale.
@ PropertyDisplacementY
Vertical displacement.
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 copyDataDefinedProperties(QgsSymbolLayer *destLayer) const
Copies all data defined properties of this layer to another symbol layer.
@ PropertyPlacement
Line marker placement.
@ PropertyPreserveAspectRatio
Preserve aspect ratio between width and height.
@ StrokeWidth
Line stroke width.
@ PropertyLineAngle
Line angle, or angle of hash lines for hash line symbols.
void setMapUnitScale(const QgsMapUnitScale &scale) override
double angle() const
Returns the rotation angle for the marker, in degrees clockwise from north.
@ PropertySecondaryColor
Secondary color (eg for gradient fills)
virtual QColor dxfBrushColor(QgsSymbolRenderContext &context) const
Gets brush/fill color.
static bool isGeneralizableByDeviceBoundingBox(const QgsRectangle &envelope, float mapToPixelTol=1.0f)
Returns whether the device-envelope can be replaced by its BBOX when is applied the specified toleran...
virtual void setDataDefinedProperty(Property key, const QgsProperty &property)
Sets a data defined property for the layer.
virtual void prepareMasks(const QgsSymbolRenderContext &context)
Prepares all mask internal objects according to what is defined in context This should be called prio...
@ PropertyJoinStyle
Line join style.
@ PropertyWidth
Symbol width.
@ DoublePositive
Positive double value (including 0)