Skip to main content

Crate oxstack_gfx

Crate oxstack_gfx 

Source
Expand description

Graphics primitives for oxstack devices.

The core type is Framebuffer: a full-screen RGB565 buffer that stores every pixel already in the panel’s wire format (big-endian), and remembers which rows changed since the last flush. Flushing is then a single contiguous slice of the buffer, with no conversion pass and no copy, which DMA can stream directly to the display.

It implements embedded-graphics’ DrawTarget, so every font, shape and image crate in that ecosystem works unchanged. Renderers that write pixels one at a time, such as oxstack-3d, use Framebuffer::wire_rows_mut instead.

TextBuf is the small formatting buffer every status line needs: write! into it, draw as_str, nothing allocates.

Macros§

text
Formats into a TextBuf of the given capacity: text!(40, "{} dBm", rssi).

Structs§

DirtyRows
A run of changed, full-width rows ready to be sent to the panel.
Framebuffer
A W×H RGB565 framebuffer in display wire format.
Rgb565
Rgb565 color.
TextBuf
A fixed-capacity, stack-allocated string for formatting text to draw.

Functions§

wire_color
color in the framebuffer’s wire format (big-endian RGB565), the value Framebuffer::wire_rows_mut rows hold.