Class: QgsVectorTileBasicRenderer¶
The default vector tile renderer implementation.
It has an ordered list of “styles”, each defines a rendering rule.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Abstract base class for all vector tile renderer implementations. |
Methods
Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing) |
|
Sets list of styles of the renderer |
|
Returns style definition at the particular index |
|
Returns list of styles of the renderer |
Static Methods
Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes |
|
Returns a list of styles to render all layers, using random colors |
- class qgis.core.QgsVectorTileBasicRenderer[source]¶
Bases:
QgsVectorTileRenderer
- __init__()
Constructs renderer with no styles
- __init__(a0: QgsVectorTileBasicRenderer)
- Parameters:
- setStyle(self, index: int, style: QgsVectorTileBasicRendererStyle)[source]¶
Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing)
- Parameters:
index (int)
style (QgsVectorTileBasicRendererStyle)
- setStyles(self, styles: Iterable[QgsVectorTileBasicRendererStyle])[source]¶
Sets list of styles of the renderer
- Parameters:
styles (Iterable[QgsVectorTileBasicRendererStyle])
- static simpleStyle(polygonFillColor: QColor | Qt.GlobalColor, polygonStrokeColor: QColor | Qt.GlobalColor, polygonStrokeWidth: float, lineStrokeColor: QColor | Qt.GlobalColor, lineStrokeWidth: float, pointFillColor: QColor | Qt.GlobalColor, pointStrokeColor: QColor | Qt.GlobalColor, pointSize: float) List[QgsVectorTileBasicRendererStyle] ¶
Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes
- Parameters:
polygonFillColor (Union[QColor, Qt.GlobalColor])
polygonStrokeColor (Union[QColor, Qt.GlobalColor])
polygonStrokeWidth (float)
lineStrokeColor (Union[QColor, Qt.GlobalColor])
lineStrokeWidth (float)
pointFillColor (Union[QColor, Qt.GlobalColor])
pointStrokeColor (Union[QColor, Qt.GlobalColor])
pointSize (float)
- Return type:
- static simpleStyleWithRandomColors() List[QgsVectorTileBasicRendererStyle] ¶
Returns a list of styles to render all layers, using random colors
- Return type:
- style(self, index: int) QgsVectorTileBasicRendererStyle [source]¶
Returns style definition at the particular index
- Parameters:
index (int)
- Return type:
- styles(self) List[QgsVectorTileBasicRendererStyle] ¶
Returns list of styles of the renderer
- Return type: