Class: QgsLineSymbolLayer¶
-
class
qgis.core.
QgsLineSymbolLayer
(locked: bool = False)¶ Bases:
qgis._core.QgsSymbolLayer
QgsLineSymbolLayer(QgsLineSymbolLayer)
Enums
Methods
Returns the units for the line’s offset.
Returns the line symbol layer’s ring filter, which controls which rings are rendered when the line symbol is being used to draw a polygon’s rings.
Sets the units for the line’s offset.
Sets the line symbol layer’s ring
filter
, which controls which rings are rendered when the line symbol is being used to draw a polygon’s rings.Sets the units for the line’s width.
Returns the estimated width for the line symbol layer.
Returns the units for the line’s width.
Signals
Attributes
-
AllRings
= 0¶
-
ExteriorRingOnly
= 1¶
-
InteriorRingsOnly
= 2¶
-
class
RenderRingFilter
¶ Bases:
int
-
copyDataDefinedProperties
()¶
-
copyPaintEffect
()¶
-
drawPreviewIcon
(self, context: QgsSymbolRenderContext, size: QSize)¶
-
dxfWidth
(self, e: QgsDxfExport, context: QgsSymbolRenderContext) → float¶
-
mapUnitScale
(self) → QgsMapUnitScale¶
-
offset
(self) → float¶
-
offsetMapUnitScale
(self) → QgsMapUnitScale¶
-
offsetUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the line’s offset.
See also
-
outputUnit
(self) → QgsUnitTypes.RenderUnit¶
-
renderPolygonStroke
(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶
-
renderPolyline
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
-
restoreOldDataDefinedProperties
()¶
-
ringFilter
(self) → QgsLineSymbolLayer.RenderRingFilter¶ Returns the line symbol layer’s ring filter, which controls which rings are rendered when the line symbol is being used to draw a polygon’s rings.
This setting has no effect when the line symbol is not being rendered for a polygon.
See also
New in version 3.6.
-
setMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setOffset
(self, offset: float)¶
-
setOffsetMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setOffsetUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the line’s offset.
- Parameters
unit – offset units
See also
-
setOutputUnit
(self, unit: QgsUnitTypes.RenderUnit)¶
-
setRingFilter
(self, filter: QgsLineSymbolLayer.RenderRingFilter)¶ Sets the line symbol layer’s ring
filter
, which controls which rings are rendered when the line symbol is being used to draw a polygon’s rings.This setting has no effect when the line symbol is not being rendered for a polygon.
See also
New in version 3.6.
-
setWidth
(self, width: float)¶
-
setWidthMapUnitScale
(self, scale: QgsMapUnitScale)¶
-
setWidthUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units for the line’s width.
- Parameters
unit – width units
See also
-
width
(self) → float¶ Returns the estimated width for the line symbol layer.
Warning
This returned value is inaccurate if the symbol layer has sub-symbols with different width units. Use the overload accepting a
QgsRenderContext
argument instead for accurate sizes in this case.See also
width(self, context: QgsRenderContext) -> float Returns the line symbol layer width, in painter units.
This method returns an accurate width by calculating the actual rendered width of the symbol layer using the provided render
context
.See also
New in version 3.4.5.
-
widthMapUnitScale
(self) → QgsMapUnitScale¶
-
widthUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the line’s width.
See also
-