Class: QgsMarkerLineSymbolLayer¶
-
class
qgis.core.
QgsMarkerLineSymbolLayer
(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL)¶ Bases:
QgsLineSymbolLayer
- Parameters
rotateMarker (bool = DEFAULT_MARKERLINE_ROTATE) –
interval –
-
CentralPoint
= 4¶
-
CurvePoint
= 5¶
-
FirstVertex
= 3¶
-
Interval
= 0¶
-
LastVertex
= 2¶
-
class
Placement
¶ Bases:
int
-
Vertex
= 1¶
-
clone
(self) → QgsMarkerLineSymbolLayer¶ - Return type
-
color
(self) → QColor¶ - Return type
QColor
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
create
(properties: Dict[str, str] = {}) → QgsSymbolLayer¶ Create a new MarkerLineSymbolLayerV2
- Parameters
properties (Dict[str) – A property map to deserialize saved information from properties()
- Return type
- Returns
A new MarkerLineSymbolLayerV2
-
createFromSld
(element: QDomElement) → QgsSymbolLayer¶ Create a new MarkerLineSymbolLayerV2 from SLD
- Parameters
element (QDomElement) – An SLD XML DOM element
- Return type
- Returns
A new MarkerLineSymbolLayerV2
-
estimateMaxBleed
(self, context: QgsRenderContext) → float¶ - Parameters
context (QgsRenderContext) –
- Return type
float
-
hasDataDefinedProperties
(self) → bool¶ - Return type
bool
-
interval
(self) → float¶ Returns the interval between individual markers. Units are specified through intervalUnits().
See also
See also
- Return type
float
-
intervalMapUnitScale
(self) → QgsMapUnitScale¶ - Return type
-
intervalUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the interval between markers.
See also
See also
- Return type
-
layerType
(self) → str¶ - Return type
str
-
mapUnitScale
(self) → QgsMapUnitScale¶ - Return type
-
markerAngle
(self, points: QPolygonF, isRing: bool, vertex: int) → float¶ - Parameters
points (QPolygonF) –
isRing (bool) –
vertex (int) –
- Return type
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.
- Return type
float
- 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.
- Return type
- Returns
Offset along line map unit scale.
-
offsetAlongLineUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the unit used for calculating the offset along line for markers.
- Return type
- Returns
Offset along line unit type.
See also
See also
-
outputUnit
(self) → QgsUnitTypes.RenderUnit¶ - Return type
-
placement
(self) → QgsMarkerLineSymbolLayer.Placement¶ The placement of the markers.
- Return type
-
properties
(self) → Dict[str, str]¶ - Return type
Dict[str, str]
-
renderPolygonStroke
(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
-
renderPolyline
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
-
renderPolylineCentral
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
-
renderPolylineInterval
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
-
renderPolylineVertex
(self, points: QPolygonF, context: QgsSymbolRenderContext, placement: QgsMarkerLineSymbolLayer.Placement = QgsMarkerLineSymbolLayer.Vertex)¶ - Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
placement (QgsMarkerLineSymbolLayer.Placement = QgsMarkerLineSymbolLayer.Vertex) –
-
restoreOldDataDefinedProperties
()¶
-
rotateMarker
(self) → bool¶ Shall the marker be rotated.
- Return type
bool
- Returns
True if the marker should be rotated.
-
setColor
(self, color: Union[QColor, Qt.GlobalColor])¶ - Parameters
color (Union[QColor) –
-
setDataDefinedProperty
(self, key: QgsSymbolLayer.Property, property: QgsProperty)¶ - Parameters
key (QgsSymbolLayer.Property) –
property (QgsProperty) –
-
setInterval
(self, interval: float)¶ Sets the interval between individual markers.
- Parameters
interval (float) – interval size. Units are specified through setIntervalUnit()
See also
See also
-
setIntervalMapUnitScale
(self, scale: QgsMapUnitScale)¶ - Parameters
scale (QgsMapUnitScale) –
-
setIntervalUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the interval between markers.
- Parameters
unit (QgsUnitTypes.RenderUnit) – interval units
See also
See also
-
setMapUnitScale
(self, scale: QgsMapUnitScale)¶ - Parameters
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 (float) – 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 (QgsMapUnitScale) – 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 (QgsUnitTypes.RenderUnit) – Offset along line unit type.
See also
See also
-
setOutputUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ - Parameters
unit (QgsUnitTypes.RenderUnit) –
-
setPlacement
(self, p: QgsMarkerLineSymbolLayer.Placement)¶ The placement of the markers.
- Parameters
-
setRotateMarker
(self, rotate: bool)¶ Shall the marker be rotated.
- Parameters
rotate (bool) –
-
setWidth
(self, width: float)¶ - Parameters
width (float) –
-
startRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
stopRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
toSld
(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])¶ - Parameters
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
-
usedAttributes
(self, context: QgsRenderContext) → Set[str]¶ - Parameters
context (QgsRenderContext) –
- Return type
Set[str]
-
width
(self) → float¶ width(self, context:
QgsRenderContext
) -> float- Return type
float