Class: QgsSimpleMarkerSymbolLayerBase¶
- class qgis.core.QgsSimpleMarkerSymbolLayerBase¶
Bases:
QgsMarkerSymbolLayer
Abstract base class for simple marker symbol layers. Handles creation of the symbol shapes but leaves the actual drawing of the symbols to subclasses.
New in version 2.16.
QgsSimpleMarkerSymbolLayerBase(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 – symbol shape for markers
size – symbol size (in mm)
angle – symbol rotation angle
scaleMethod –
scaling method for data defined scaling
Enums
alias of
MarkerShape
Methods
Returns a list of all available shape types.
- param point
Attempts to decode a string representation of a shape name to the corresponding shape.
Encodes a shape to its string representation.
- param point
Sets the rendered marker shape.
Returns the shape for the rendered marker symbol.
Returns
True
if a symbol shape has a fill.- param context
- param context
- Shape¶
alias of
MarkerShape
- availableShapes() List[Qgis.MarkerShape] ¶
Returns a list of all available shape types.
- Return type
List[Qgis.MarkerShape]
- bounds(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext) QRectF ¶
- Parameters
point (Union[QPointF) –
context (QgsSymbolRenderContext) –
- Return type
QRectF
- decodeShape(name: str) Tuple[Qgis.MarkerShape, bool] ¶
Attempts to decode a string representation of a shape name to the corresponding shape.
- Parameters
name (str) – encoded shape name
ok – if specified, will be set to
True
if shape was successfully decoded
- Return type
Tuple[Qgis.MarkerShape, bool]
- Returns
decoded name
See also
- encodeShape(shape: Qgis.MarkerShape) str ¶
Encodes a shape to its string representation.
- Parameters
shape (Qgis.MarkerShape) – shape to encode
- Return type
str
- Returns
encoded string
See also
- renderPoint(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext)¶
- Parameters
point (Union[QPointF) –
context (QgsSymbolRenderContext) –
- setShape(self, shape: Qgis.MarkerShape)¶
Sets the rendered marker shape.
- Parameters
shape (Qgis.MarkerShape) – new marker shape
See also
- shape(self) Qgis.MarkerShape ¶
Returns the shape for the rendered marker symbol.
See also
- Return type
- shapeIsFilled(shape: Qgis.MarkerShape) bool ¶
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
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –