Text¶
- class easy_pil.text.Text(text: str, font: FreeTypeFont | Font, color: int | str | tuple[int, int, int] | tuple[int, int, int, int] = 'black', anchor: str | None = None)¶
Text class.
- Parameters:
text (str) – Text
font (ImageFont.FreeTypeFont) – Font for text
color (Color, optional) – Font color, by default “black”
- getsize() tuple[float, float]¶
Get the width and height of the text.
- Returns:
Width and height of the text bounding box.
- Return type:
tuple[float, float]