Draw the UI's last frame offscreen and write it to path as a PNG. Needs a GPU; build the UI
with system_fonts for readable text. Returns false when there is no adapter or the file
cannot be written.
- ui: the UI whose last frame to draw.
- path: where to write the PNG.
write_screenshot :: (ui: *UI_State, path: string) -> bool
Draw the UI's last frame offscreen and write it to path as a PNG. Needs a GPU; build the UI
with system_fonts for readable text. Returns false when there is no adapter or the file
cannot be written.
Parameters
- ui: *UI_State
- the UI whose last frame to draw.
- path: string
- where to write the PNG.
Returns
- bool