Expand description
Headless offscreen screenshot capture for modde’s hottest GUI screens.
This module renders fully populated demo screens to RGBA pixels and PNG
files without a GPU or display server, using iced 0.14’s dual-backend
iced_test::renderer::Renderer, which falls back to the pure-CPU
tiny-skia backend when no GPU is present. It powers the hidden
modde dev screenshot CLI command used to generate Flathub / website
assets and (in the future) CI automation.
The whole module is gated behind the non-default screenshot cargo
feature so release binaries carry zero extra weight.
Screens are driven by constructing a demo Modde and setting its state
fields directly — never by dispatching update() messages, which would
fire async Tasks that need a database or network.
For determinism, run with ICED_BACKEND=tiny-skia in the environment so
the software backend is always selected.
Structs§
- Shot
Options - Rendering options for a screenshot capture.
Enums§
- Screen
- A capturable GUI screen.
Functions§
- all_
screens - Every screen, in priority/asset order. Used by the CLI
--allflag. - capture
- Render
screenoffscreen and return the RGBA pixel buffer as an image. - capture_
to_ png - Render
screenand write it tooutas a PNG.