Class: QgsTextRendererUtils¶
Utility functions for text rendering.
Added in version 3.10.
Enums
Flags controlling behavior of curved text generation. |
Static Methods
Decodes a string representation of a background rotation type to a type. |
|
Decodes a string representation of a background size type to a type. |
|
Decodes a string representation of a shadow placement type to a type. |
|
Decodes a string representation of a background shape type to a type. |
|
Attempts to decode a string representation of a text orientation. |
|
Encodes a text orientation. |
- class qgis.core.QgsTextRendererUtils[source]¶
Bases:
object- class CurvedTextFlag(*values)¶
Bases:
IntEnumFlags controlling behavior of curved text generation.
Added in version 4.0..
TruncateStringWhenLineIsTooShort: When a string is too long for the line, truncate characters instead of aborting the placementUseBaselinePlacement: Generate placement based on the character baselines instead of centersUprightCharactersOnly: Permit upright characters only. If not present then upside down text placement is permitted.ExtendLineToFitText: When a string is too long for the line, extend the line’s final segment to fit the entire string.Added in version 4.0.
- class CurvedTextFlags¶
- class CurvedTextFlags(f: Qgis.CurvedTextFlags | Qgis.CurvedTextFlag)
- class CurvedTextFlags(a0: Qgis.CurvedTextFlags)
Bases:
object
- static decodeBackgroundRotationType(string: str | None) QgsTextBackgroundSettings.RotationType[source]¶
Decodes a string representation of a background rotation type to a type.
- Parameters:
string (Optional[str])
- Return type:
- static decodeBackgroundSizeType(string: str | None) QgsTextBackgroundSettings.SizeType[source]¶
Decodes a string representation of a background size type to a type.
- Parameters:
string (Optional[str])
- Return type:
- static decodeShadowPlacementType(string: str | None) QgsTextShadowSettings.ShadowPlacement[source]¶
Decodes a string representation of a shadow placement type to a type.
- Parameters:
string (Optional[str])
- Return type:
- static decodeShapeType(string: str | None) QgsTextBackgroundSettings.ShapeType[source]¶
Decodes a string representation of a background shape type to a type.
- Parameters:
string (Optional[str])
- Return type:
- static decodeTextOrientation(name: str | None)[source]¶
Attempts to decode a string representation of a text orientation.
- Parameters:
name (Optional[str]) -> (Qgis.TextOrientation) – encoded text orientation name
ok – if specified, will be set to
Trueif the name was successfully decoded
- Returns:
decoded text orientation
See also
- static encodeTextOrientation(orientation: Qgis.TextOrientation) str[source]¶
Encodes a text
orientation.- Return type:
str
- Returns:
encoded string
See also
- Parameters:
orientation (Qgis.TextOrientation)