pub struct RenderOutput {
pub color: RgbaImage,
pub id_buffer: Vec<u32>,
pub width: u32,
pub height: u32,
}Expand description
The result of an offscreen render.
Fields§
§color: RgbaImageShaded color image (sRGB, RGBA8).
id_buffer: Vec<u32>Per-pixel face id, row-major (width * height entries). 0 is
background; otherwise the value is FaceId.index() + 1.
width: u32Image width in pixels.
height: u32Image height in pixels.
Implementations§
Source§impl RenderOutput
impl RenderOutput
Sourcepub fn face_id_at(&self, x: u32, y: u32) -> Option<u32>
pub fn face_id_at(&self, x: u32, y: u32) -> Option<u32>
Face id at pixel (x, y), or None for background or out-of-bounds.
The returned value is FaceId.index() + 1 (the same encoding stored in
RenderOutput::id_buffer); 0/background maps to None.
Auto Trait Implementations§
impl Freeze for RenderOutput
impl RefUnwindSafe for RenderOutput
impl Send for RenderOutput
impl Sync for RenderOutput
impl Unpin for RenderOutput
impl UnsafeUnpin for RenderOutput
impl UnwindSafe for RenderOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more