[−][src]Struct etagere::AtlasAllocator
A shelf-packing dynamic texture atlas allocator tracking each allocation individually and with support for coalescing empty shelves.
Implementations
impl AtlasAllocator
[src]
pub fn with_options(size: Size, options: &AllocatorOptions) -> Self
[src]
Create an atlas allocator with provided options.
pub fn new(size: Size) -> Self
[src]
Create an atlas allocator with default options.
pub fn clear(&mut self)
[src]
pub fn size(&self) -> Size
[src]
pub fn allocate(&mut self, size: Size) -> Option<Allocation>
[src]
Allocate a rectangle in the atlas.
pub fn deallocate(&mut self, id: AllocId)
[src]
Deallocate a rectangle in the atlas.
pub fn is_empty(&self) -> bool
[src]
pub fn dump_svg(&self, output: &mut dyn Write) -> Result<()>
[src]
Dump a visual representation of the atlas in SVG format.
pub fn dump_into_svg(
&self,
rect: Option<&Rectangle>,
output: &mut dyn Write
) -> Result<()>
[src]
&self,
rect: Option<&Rectangle>,
output: &mut dyn Write
) -> Result<()>
Dump a visual representation of the atlas in SVG, omitting the beginning and end of the SVG document, so that it can be included in a larger document.
If a rectangle is provided, translate and scale the output to fit it.
Trait Implementations
impl Clone for AtlasAllocator
[src]
pub fn clone(&self) -> AtlasAllocator
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for AtlasAllocator
impl Send for AtlasAllocator
impl Sync for AtlasAllocator
impl Unpin for AtlasAllocator
impl UnwindSafe for AtlasAllocator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,