Subgroup: Marker

Class: QgsMarkerLineSymbolLayer

class qgis.core.QgsMarkerLineSymbolLayer(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL)

Bases: qgis._core.QgsLineSymbolLayer

Methods

clone
color
copyDataDefinedProperties
copyPaintEffect
create Create a new MarkerLineSymbolLayerV2
createFromSld Create a new MarkerLineSymbolLayerV2 from SLD
estimateMaxBleed
interval Returns the interval between individual markers.
intervalMapUnitScale
intervalUnit Returns the units for the interval between markers.
layerType
mapUnitScale
markerAngle
offsetAlongLine Returns the offset along the line for the marker placement.
offsetAlongLineMapUnitScale Returns the map unit scale used for calculating the offset in map units along line for markers.
offsetAlongLineUnit Returns the unit used for calculating the offset along line for markers.
outputUnit
placement The placement of the markers.
properties
renderPolygonStroke
renderPolyline
renderPolylineCentral
renderPolylineInterval
renderPolylineVertex
restoreOldDataDefinedProperties
rotateMarker Shall the marker be rotated.
setColor
setDataDefinedProperty
setInterval Sets the interval between individual markers.
setIntervalMapUnitScale
setIntervalUnit Sets the units for the interval between markers.
setMapUnitScale
setOffsetAlongLine Sets the the offset along the line for the marker placement.
setOffsetAlongLineMapUnitScale Sets the map unit scale used for calculating the offset in map units along line for markers.
setOffsetAlongLineUnit Sets the unit used for calculating the offset along line for markers.
setOutputUnit
setPlacement The placement of the markers.
setRotateMarker Shall the marker be rotated.
setSubSymbol
setWidth
startRender
stopRender
subSymbol
toSld
usedAttributes
width

Signals

Attributes

CentralPoint
CurvePoint
FirstVertex
Interval
LastVertex
Vertex
CentralPoint = 4
CurvePoint = 5
FirstVertex = 3
Interval = 0
LastVertex = 2
class Placement

Bases: int

Vertex = 1
clone(self) → QgsMarkerLineSymbolLayer
color(self) → QColor
copyDataDefinedProperties()
copyPaintEffect()
create(properties: Dict[str, str] = {}) → QgsSymbolLayer

Create a new MarkerLineSymbolLayerV2

Parameters:properties – A property map to deserialize saved information from properties()
Returns:A new MarkerLineSymbolLayerV2
createFromSld(element: QDomElement) → QgsSymbolLayer

Create a new MarkerLineSymbolLayerV2 from SLD

Parameters:element – An SLD XML DOM element
Returns:A new MarkerLineSymbolLayerV2
estimateMaxBleed(self, context: QgsRenderContext) → float
interval(self) → float

Returns the interval between individual markers. Units are specified through intervalUnits().

See also

setInterval()

See also

intervalUnit()

intervalMapUnitScale(self) → QgsMapUnitScale
intervalUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the interval between markers.

See also

interval()

layerType(self) → str
mapUnitScale(self) → QgsMapUnitScale
markerAngle(self, points: QPolygonF, isRing: bool, vertex: int) → float
offsetAlongLine(self) → float

Returns the offset along the line for the marker placement. For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.

Returns:The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit.

See also

placement()

New in version 2.3.

offsetAlongLineMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale used for calculating the offset in map units along line for markers.

Returns:Offset along line map unit scale.
offsetAlongLineUnit(self) → QgsUnitTypes.RenderUnit

Returns the unit used for calculating the offset along line for markers.

Returns:Offset along line unit type.
outputUnit(self) → QgsUnitTypes.RenderUnit
placement(self) → QgsMarkerLineSymbolLayer.Placement

The placement of the markers.

properties(self) → Dict[str, str]
renderPolygonStroke(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)
renderPolylineCentral(self, points: QPolygonF, context: QgsSymbolRenderContext)
renderPolylineInterval(self, points: QPolygonF, context: QgsSymbolRenderContext)
renderPolylineVertex(self, points: QPolygonF, context: QgsSymbolRenderContext, placement: QgsMarkerLineSymbolLayer.Placement = QgsMarkerLineSymbolLayer.Vertex)
restoreOldDataDefinedProperties()
rotateMarker(self) → bool

Shall the marker be rotated.

Returns:True if the marker should be rotated.
setColor(self, color: Union[QColor, Qt.GlobalColor])
setDataDefinedProperty(self, key: QgsSymbolLayer.Property, property: QgsProperty)
setInterval(self, interval: float)

Sets the interval between individual markers.

Parameters:interval – interval size. Units are specified through setIntervalUnit()

See also

interval()

setIntervalMapUnitScale(self, scale: QgsMapUnitScale)
setIntervalUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the units for the interval between markers.

Parameters:unit – interval units

See also

intervalUnit()

See also

setInterval()

setMapUnitScale(self, scale: QgsMapUnitScale)
setOffsetAlongLine(self, offsetAlongLine: float)

Sets the the offset along the line for the marker placement. For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.

Parameters:offsetAlongLine – Distance to offset markers along the line. The offset unit is set via setOffsetAlongLineUnit.

See also

setPlacement()

New in version 2.3.

setOffsetAlongLineMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale used for calculating the offset in map units along line for markers.

Parameters:scale – Offset along line map unit scale.
setOffsetAlongLineUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit used for calculating the offset along line for markers.

Parameters:unit – Offset along line unit type.
setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
setPlacement(self, p: QgsMarkerLineSymbolLayer.Placement)

The placement of the markers.

setRotateMarker(self, rotate: bool)

Shall the marker be rotated.

setSubSymbol(self, symbol: QgsSymbol) → bool
setWidth(self, width: float)
startRender(self, context: QgsSymbolRenderContext)
stopRender(self, context: QgsSymbolRenderContext)
subSymbol(self) → QgsSymbol
toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])
usedAttributes(self, context: QgsRenderContext) → Set[str]
width(self) → float