Realm

oa::ui::ImagePlanes

Planar image: one retained device buffer per channel, independent dtype. Each plane is a flat row-major array of width * height elements. Missing alpha (fewer than 4 channels) defaults to 1.0 in the blit shader. The value owns its plane storage; cloning plane buffers for frame retention is internal to Ui. Donor: oa::ImagePlanes.

StRust public API

Declaration

pub struct ImagePlanes { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn plane_dtype(&self, channel: usize) -> ImageDtype
pub const fn width(&self) -> i32
pub const fn height(&self) -> i32
pub fn channel_count(&self) -> usize
pub fn is_valid(&self) -> bool

Associated Functions

pub fn load_file(engine: &Engine, path: impl AsRef<Path>) -> Result<Self>
pub fn from_planes( engine: &Engine, planes: &[&[u8]], dtypes: &[ImageDtype], width: i32, height: i32, ) -> Result<Self>

Public Method Documentation

pub fn plane_dtype( &self, channel: usize ) -> ImageDtype
No public source comment is attached to this declaration.
pub const fn width( &self ) -> i32
No public source comment is attached to this declaration.
pub const fn height( &self ) -> i32
No public source comment is attached to this declaration.
pub fn channel_count( &self ) -> usize
No public source comment is attached to this declaration.
pub fn is_valid( &self ) -> bool
No public source comment is attached to this declaration.
pub fn load_file( engine: &Engine, path: impl AsRef<Path> ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn from_planes( engine: &Engine, planes: &[&[u8]], dtypes: &[ImageDtype], width: i32, height: i32 ) -> Result<Self>
No public source comment is attached to this declaration.