(
draw: ImageDraw.ImageDraw,
x: int,
y: int,
label: str,
color: tuple[int, int, int],
text_color: tuple[int, int, int] = TEXT,
)
| 176 | |
| 177 | |
| 178 | def draw_badge( |
| 179 | draw: ImageDraw.ImageDraw, |
| 180 | x: int, |
| 181 | y: int, |
| 182 | label: str, |
| 183 | color: tuple[int, int, int], |
| 184 | text_color: tuple[int, int, int] = TEXT, |
| 185 | ) -> None: |
| 186 | tw, _ = text_box(draw, label, F_TAG) |
| 187 | w = tw + 42 |
| 188 | h = 43 |
| 189 | draw.rounded_rectangle((x, y, x + w, y + h), radius=7, fill=color) |
| 190 | draw_centered(draw, (x + w / 2, y + h / 2 + 1), label, F_TAG, text_color) |
| 191 | |
| 192 | |
| 193 | def draw_card( |
no test coverage detected