Subgroup: Line
Class: QgsLineSymbol¶
-
class
qgis.core.
QgsLineSymbol
(layers: object = QgsSymbolLayerList())¶ Bases:
qgis._core.QgsSymbol
Methods
appendSymbolLayer
Append symbol layer at the end of the list Ownership will be transferred. asImage
Generate symbol as image bigSymbolPreviewImage
Returns a large (roughly 100x100 pixel) preview image for the symbol. changeSymbolLayer
delete layer at specified index and set a new one clipFeaturesToExtent
Returns whether features drawn by the symbol will be clipped to the render context’s extent. clone
cloneLayers
color
createSimple
Create a line symbol with one symbol layer: SimpleLine with specified properties. dataDefinedWidth
Returns data defined width for whole symbol (including all symbol layers). defaultSymbol
return new default symbol for specified geometry type deleteSymbolLayer
delete symbol layer at specified index drawPreviewIcon
Draw icon of the symbol that occupyies area given by size using the painter. dump
exportImage
export symbol as image format. PNG and SVG supported hasDataDefinedProperties
Returns whether the symbol utilizes any data defined properties. insertSymbolLayer
Insert symbol layer to specified index Ownership will be transferred. layer
mapUnitScale
opacity
Returns the opacity for the symbol. outputUnit
Returns the units to use for sizes and widths within the symbol. renderFeature
Render a feature. renderHints
Returns the rendering hint flags for the symbol. renderPolyline
renderUsingLayer
renderVertexMarker
setClipFeaturesToExtent
Sets whether features drawn by the symbol should be clipped to the render context’s extent. setColor
setDataDefinedWidth
Set data defined width for whole symbol (including all symbol layers). setLayer
setMapUnitScale
setOpacity
Sets the opacity
for the symbol.setOutputUnit
Sets the units to use for sizes and widths within the symbol. setRenderHints
Sets rendering hint flags for the symbol. setWidth
startRender
Begins the rendering process for the symbol. stopRender
Ends the rendering process. symbolLayer
Returns a specific symbol layers contained in the symbol. symbolLayerCount
Returns total number of symbol layers contained in the symbol. symbolLayers
Returns list of symbol layers contained in the symbol. symbolRenderContext
Returns the symbol render context. takeSymbolLayer
Remove symbol layer from the list and return pointer to it. toSld
type
usedAttributes
Return a list of attributes required to render this feature. width
Attributes
DynamicRotation
Fill
Hybrid
Line
Marker
ScaleArea
ScaleDiameter
-
clone
(self) → QgsLineSymbol¶
-
cloneLayers
()¶
-
createSimple
(properties: Dict[str, str]) → QgsLineSymbol¶ Create a line symbol with one symbol layer: SimpleLine with specified properties. This is a convenience method for easier creation of line symbols.
-
dataDefinedWidth
(self) → QgsProperty¶ Returns data defined width for whole symbol (including all symbol layers).
Returns: data defined width, or invalid property if size is not set at the line level. Caller takes responsibility for deleting the returned object.
New in version 3.0.
See also
-
renderPolyline
(self, points: QPolygonF, f: QgsFeature, context: QgsRenderContext, layer: int = -1, selected: bool = False)¶
-
renderUsingLayer
()¶
-
renderVertexMarker
()¶
-
setDataDefinedWidth
(self, property: QgsProperty)¶ Set data defined width for whole symbol (including all symbol layers).
See also
New in version 3.0.
-
setWidth
(self, width: float)¶
-
width
(self) → float¶
-