pub struct Atlas { /* private fields */ }Expand description
Validated texture-atlas aggregate.
Implementations§
Source§impl Atlas
impl Atlas
Sourcepub fn try_new(pages: Vec<Page>, meta: Meta) -> Result<Self>
pub fn try_new(pages: Vec<Page>, meta: Meta) -> Result<Self>
Builds a validated aggregate, expanding descriptive maximum dimensions to cover its pages. Other metadata guarantees must already match the supplied geometry.
pub fn pages(&self) -> &[Page]
pub fn page(&self, id: PageId) -> Option<&Page>
pub const fn meta(&self) -> &Meta
pub fn stats(&self) -> PackStats
Trait Implementations§
impl StructuralPartialEq for Atlas
Auto Trait Implementations§
impl Freeze for Atlas
impl RefUnwindSafe for Atlas
impl Send for Atlas
impl Sync for Atlas
impl Unpin for Atlas
impl UnsafeUnpin for Atlas
impl UnwindSafe for Atlas
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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