TextDecoration
A linear decoration to draw near the text.
Inherits: enum.IntFlag
Properties
LINE_THROUGH- Draw a line through each line of text.NONE- Do not draw a decoration.OVERLINE- Draw a line above each line of text.UNDERLINE- Draw a line underneath each line of text.
Methods
combine- Creates a decoration that paints the union of all the given decorations.
Properties
LINE_THROUGHclass-attributeinstance-attribute
Draw a line through each line of text.
NONEclass-attributeinstance-attribute
Do not draw a decoration.
OVERLINEclass-attributeinstance-attribute
Draw a line above each line of text.
UNDERLINEclass-attributeinstance-attribute
Draw a line underneath each line of text.
Methods
combineclassmethod
combine(cls, decorations: list[TextDecoration])Creates a decoration that paints the union of all the given decorations.
Usage Example
The enum is a flag, so multiple decorations can be combined together as follows:
style = ft.TextStyle(decoration=ft.TextDecoration.UNDERLINE | ft.TextDecoration.OVERLINE)