(
draw: ImageDraw.ImageDraw,
xy: tuple[float, float],
text: str,
font: ImageFont.FreeTypeFont,
fill: tuple[int, int, int],
)
| 149 | |
| 150 | |
| 151 | def draw_centered( |
| 152 | draw: ImageDraw.ImageDraw, |
| 153 | xy: tuple[float, float], |
| 154 | text: str, |
| 155 | font: ImageFont.FreeTypeFont, |
| 156 | fill: tuple[int, int, int], |
| 157 | ) -> None: |
| 158 | tw, th = text_box(draw, text, font) |
| 159 | draw.text((xy[0] - tw / 2, xy[1] - th / 2), text, font=font, fill=fill) |
| 160 | |
| 161 | |
| 162 | def draw_wrapped_text( |
no test coverage detected