pub struct RuntimeAtlas { /* private fields */ }Expand description
Runtime atlas with pixel data management.
Implementations§
Source§impl RuntimeAtlas
impl RuntimeAtlas
pub fn new(cfg: RuntimeConfig) -> Self
pub fn with_background_color(self, color: Rgba<u8>) -> Self
pub fn with_outlines(self, enabled: bool) -> Self
pub fn append_with_image( &mut self, key: String, image: &RgbaImage, ) -> Result<RuntimeImageUpdate>
pub fn append( &mut self, key: String, w: u32, h: u32, ) -> Result<RuntimePlacement>
pub fn evict_with_clear( &mut self, page_id: PageId, key: &str, clear: bool, ) -> Option<UpdateRegion>
pub fn evict_by_key_with_clear( &mut self, key: &str, clear: bool, ) -> Option<UpdateRegion>
pub fn get_page_image(&self, page_id: PageId) -> Option<&RgbaImage>
pub fn get_page_image_mut(&mut self, page_id: PageId) -> Option<&mut RgbaImage>
pub fn num_pages(&self) -> usize
pub fn get_frame(&self, key: &str) -> Option<RuntimePlacement>
pub fn contains(&self, key: &str) -> bool
pub fn keys(&self) -> Vec<&str>
pub fn texture_count(&self) -> usize
pub fn stats(&self) -> RuntimeStats
pub fn snapshot_atlas(&self) -> Result<Atlas>
Auto Trait Implementations§
impl Freeze for RuntimeAtlas
impl RefUnwindSafe for RuntimeAtlas
impl Send for RuntimeAtlas
impl Sync for RuntimeAtlas
impl Unpin for RuntimeAtlas
impl UnsafeUnpin for RuntimeAtlas
impl UnwindSafe for RuntimeAtlas
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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