Skip to main content

Module loader

Module loader 

Source
Expand description

Loading indicators for splash and loading screens.

Pure functions operating on raw RGB565 byte buffers. All take explicit screen dimensions so they are reusable by any crate without global state.

There used to be a rotating-arc spinner here. It was removed: a rotating arc drives every pixel in its ring from black to white and back, continuously, for as long as loading takes. Non-monotone and unbounded is the worst case this panel can be given, and no amount of tuning the rate fixed it. The splash now reveals its wordmark one piece at a time instead, so each pixel changes state exactly once (see rendering::splash in the app crate).

A progress bar only ever fills in one direction, so it stays valid.

Structs§

Rect
A screen rectangle (x, y, width, height) in pixels, for partial-refresh bounding regions.

Functions§

box_downscale
Area-average downscale of an RGB888 buffer.
loading_bar_rect
Bounding rectangle of the loading bar for partial-refresh updates, with a small margin so the refresh band covers the full bar including anti-aliasing edges.
paint_loading_bar
Draw a horizontal progress bar at the bottom of the screen.