Skip to main content

svg_renderer/
image.rs

1/// Decoded RGBA pixel data from an SVG render operation.
2///
3/// Pixels are stored in premultiplied alpha, RGBA8888 format
4/// (4 bytes per pixel, row-major order).
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct ImageData {
7    /// Width of the image in pixels.
8    pub width: u32,
9    /// Height of the image in pixels.
10    pub height: u32,
11    /// Number of bytes per row (`width × 4`).
12    pub row_bytes: usize,
13    /// Flat pixel buffer in RGBA8888 premultiplied format.
14    pub rgba: Vec<u8>,
15}