Class: QgsMarkerLineSymbolLayer¶
-
class
qgis.core.
QgsMarkerLineSymbolLayer
(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL)¶ Bases:
qgis._core.QgsLineSymbolLayer
Enums
Methods
Create a new MarkerLineSymbolLayerV2
Create a new MarkerLineSymbolLayerV2 from SLD
Returns the interval between individual markers.
Returns the units for the interval between markers.
Returns the offset along the line for the marker placement.
Returns the map unit scale used for calculating the offset in map units along line for markers.
Returns the unit used for calculating the offset along line for markers.
The placement of the markers.
Shall the marker be rotated.
Sets the interval between individual markers.
Sets the units for the interval between markers.
Sets the the offset along the line for the marker placement.
Sets the map unit scale used for calculating the offset in map units along line for markers.
Sets the unit used for calculating the offset along line for markers.
The placement of the markers.
Shall the marker be rotated.
width(self, context: QgsRenderContext) -> float
Signals
Attributes
-
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¶
-
hasDataDefinedProperties
(self) → bool¶
-
interval
(self) → float¶ Returns the interval between individual markers. Units are specified through intervalUnits().
See also
See also
-
intervalMapUnitScale
(self) → QgsMapUnitScale¶
-
intervalUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the interval between markers.
See also
See also
-
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
See also
See also
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.
See also
See also
-
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
See also
-
setIntervalMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setIntervalUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the interval between markers.
- Parameters
unit – interval units
See also
See also
-
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
See also
See also
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.
See also
See also
-
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¶ width(self, context: QgsRenderContext) -> float
-