Class: QgsTextRendererUtils

class qgis.core.QgsTextRendererUtils

Bases: sip.wrapper

Utility functions for text rendering.

New in version 3.10: Enums

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.

Signals

Attributes

decodeBackgroundRotationType(string: str) → QgsTextBackgroundSettings.RotationType

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

decodeBackgroundSizeType(string: str) → QgsTextBackgroundSettings.SizeType

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

decodeShadowPlacementType(string: str) → QgsTextShadowSettings.ShadowPlacement

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

decodeShapeType(string: str) → QgsTextBackgroundSettings.ShapeType

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

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

Attempts to decode a string representation of a text orientation.

Parameters
  • name – encoded text orientation name

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

Returns

decoded text orientation

encodeTextOrientation(orientation: QgsTextFormat.TextOrientation) → str

Encodes a text orientation.

Returns

encoded string