mirui 0.2.1

A lightweight, no_std ECS-driven UI framework for embedded, desktop, and WebAssembly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use alloc::vec::Vec;

/// Image component — raw RGBA pixel data
pub struct Image {
    pub data: Vec<u8>, // RGBA
    pub width: u16,
    pub height: u16,
}

impl Image {
    pub fn new(data: Vec<u8>, width: u16, height: u16) -> Self {
        Self {
            data,
            width,
            height,
        }
    }
}