Function
draw_right_text
(
draw: ImageDraw.ImageDraw,
x: float,
y: float,
text: str,
font: ImageFont.FreeTypeFont,
fill: tuple[int, int, int],
)
Source from the content-addressed store, hash-verified
| 71 | |
| 72 | |
| 73 | def draw_right_text( |
| 74 | draw: ImageDraw.ImageDraw, |
| 75 | x: float, |
| 76 | y: float, |
| 77 | text: str, |
| 78 | font: ImageFont.FreeTypeFont, |
| 79 | fill: tuple[int, int, int], |
| 80 | ) -> None: |
| 81 | tw, th = text_size(draw, text, font) |
| 82 | draw.text((x - tw, y - th / 2), text, font=font, fill=fill) |
| 83 | |
| 84 | |
| 85 | def color_for(group: str, name: str) -> tuple[int, int, int]: |
Tested by
no test coverage detected