Class: QgsTextRendererUtils

class qgis.core.QgsTextRendererUtils

Bases: sip.wrapper

Utility functions for text rendering.

New in version 3.10:

Methods

decodeBackgroundRotationType

Decodes a string representation of a background rotation type to a type.

decodeBackgroundSizeType

Decodes a string representation of a background size type to a type.

decodeShadowPlacementType

Decodes a string representation of a shadow placement type to a type.

decodeShapeType

Decodes a string representation of a background shape type to a type.

decodeTextOrientation

Attempts to decode a string representation of a text orientation.

encodeTextOrientation

Encodes a text orientation.

decodeBackgroundRotationType(string: str) QgsTextBackgroundSettings.RotationType

Decodes a string representation of a background rotation type to a type.

Parameters

string (str) –

Return type

QgsTextBackgroundSettings.RotationType

decodeBackgroundSizeType(string: str) QgsTextBackgroundSettings.SizeType

Decodes a string representation of a background size type to a type.

Parameters

string (str) –

Return type

QgsTextBackgroundSettings.SizeType

decodeShadowPlacementType(string: str) QgsTextShadowSettings.ShadowPlacement

Decodes a string representation of a shadow placement type to a type.

Parameters

string (str) –

Return type

QgsTextShadowSettings.ShadowPlacement

decodeShapeType(string: str) QgsTextBackgroundSettings.ShapeType

Decodes a string representation of a background shape type to a type.

Parameters

string (str) –

Return type

QgsTextBackgroundSettings.ShapeType

decodeTextOrientation(name: str) Tuple[Qgis.TextOrientation, bool]

Attempts to decode a string representation of a text orientation.

Parameters
  • name (str) – encoded text orientation name

  • ok – if specified, will be set to True if the name was successfully decoded

Return type

Tuple[Qgis.TextOrientation, bool]

Returns

decoded text orientation

encodeTextOrientation(orientation: Qgis.TextOrientation) str

Encodes a text orientation.

Return type

str

Returns

encoded string

Parameters

orientation (Qgis.TextOrientation) –