MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / _compose_dialog

Function _compose_dialog

scripts/generate_assets.py:242–252  ·  view source on GitHub ↗

Dialog = white canvas with FG strip on the left holding a BG-tinted slate.

(slate_bg: Image.Image, size: tuple[int, int])

Source from the content-addressed store, hash-verified

240
241
242def _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
255def render_installer_jpegs(inkscape: str, work_dir: Path) -> None:

Callers 2

render_installer_jpegsFunction · 0.85
render_installer_staticFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected