Dialog = white canvas with FG strip on the left holding a BG-tinted slate.
(slate_bg: Image.Image, size: tuple[int, int])
| 240 | |
| 241 | |
| 242 | def _compose_dialog(slate_bg: Image.Image, size: tuple[int, int]) -> Image.Image: |
| 243 | """Dialog = white canvas with FG strip on the left holding a BG-tinted slate.""" |
| 244 | width, height = size |
| 245 | strip_w = round(width * DIALOG_STRIP_FRAC) |
| 246 | canvas = Image.new("RGBA", size, (255, 255, 255, 255)) |
| 247 | draw = ImageDraw.Draw(canvas) |
| 248 | draw.rectangle([(0, 0), (strip_w, height)], fill=FG) |
| 249 | icon_x = (strip_w - slate_bg.width) // 2 |
| 250 | icon_y = round(height * 0.20) |
| 251 | canvas.paste(slate_bg, (icon_x, icon_y), slate_bg) |
| 252 | return canvas |
| 253 | |
| 254 | |
| 255 | def render_installer_jpegs(inkscape: str, work_dir: Path) -> None: |
no outgoing calls
no test coverage detected