Class: QgsSimpleMarkerSymbolLayerBase¶
Abstract base class for simple marker symbol layers.
Handles creation of the symbol shapes but leaves the actual drawing of the symbols to subclasses.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsSymbolLayer.clone()
, draw()
, QgsSymbolLayer.layerType()
, QgsSymbolLayer.properties()
Class Hierarchy¶
Base classes¶
Abstract base class for marker symbol layers. |
|
Abstract base class for symbol layers. |
Subclasses¶
Filled marker symbol layer, consisting of a shape which is rendered using a |
|
Simple marker symbol layer, consisting of a rendered shape with solid fill color and a stroke. |
Enums
alias of |
Methods
Sets the rendered marker shape. |
|
Returns the shape for the rendered marker symbol. |
Static Methods
Returns a list of all available shape types. |
|
Attempts to decode a string representation of a shape name to the corresponding shape. |
|
Encodes a shape to its string representation. |
|
Returns |
- class qgis.core.QgsSimpleMarkerSymbolLayerBase[source]¶
Bases:
QgsMarkerSymbolLayer
- __init__(shape: Qgis.MarkerShape = Qgis.MarkerShape.Circle, size: float = DEFAULT_SIMPLEMARKER_SIZE, angle: float = DEFAULT_SIMPLEMARKER_ANGLE, scaleMethod: Qgis.ScaleMethod = DEFAULT_SCALE_METHOD)
Constructor for QgsSimpleMarkerSymbolLayerBase.
- Parameters:
shape (Qgis.MarkerShape = Qgis.MarkerShape.Circle) – symbol shape for markers
size (float = DEFAULT_SIMPLEMARKER_SIZE) – symbol size (in mm)
angle (float = DEFAULT_SIMPLEMARKER_ANGLE) – symbol rotation angle
scaleMethod (Qgis.ScaleMethod = DEFAULT_SCALE_METHOD) – scaling method for data defined scaling
- Shape¶
alias of
MarkerShape
- static availableShapes() List[Qgis.MarkerShape] ¶
Returns a list of all available shape types.
- Return type:
List[Qgis.MarkerShape]
- static decodeShape(name: str | None)[source]¶
Attempts to decode a string representation of a shape name to the corresponding shape.
- Parameters:
name (Optional[str]) -> (Qgis.MarkerShape) – encoded shape name
ok – if specified, will be set to
True
if shape was successfully decoded
- Returns:
decoded name
See also
- static encodeShape(shape: Qgis.MarkerShape) str [source]¶
Encodes a shape to its string representation.
- Parameters:
shape (Qgis.MarkerShape) – shape to encode
- Return type:
str
- Returns:
encoded string
See also
- setShape(self, shape: Qgis.MarkerShape)[source]¶
Sets the rendered marker shape.
- Parameters:
shape (Qgis.MarkerShape) – new marker shape
See also
- shape(self) Qgis.MarkerShape [source]¶
Returns the shape for the rendered marker symbol.
See also
- Return type:
- static shapeIsFilled(shape: Qgis.MarkerShape) bool [source]¶
Returns
True
if a symbol shape has a fill.- Parameters:
shape (Qgis.MarkerShape) – shape to test
- Return type:
bool
- Returns:
True
if shape uses a fill, orFalse
if shape uses lines only