Struct texture_packer::MultiTexturePacker[][src]

pub struct MultiTexturePacker<'a, T: 'a + Clone> { /* fields omitted */ }

Texture packer supporting multiple atlases.

Will create a new page for textures that do not fit. Textures packed after a new page is added will still attempt to check each page for available space.

Implementations

impl<'a, Pix: Pixel, T: Clone + Texture<Pixel = Pix>> MultiTexturePacker<'a, T>[src]

pub fn get_pages(&self) -> &[TexturePacker<'a, T>][src]

Get an array of all underlying single-atlas texture packers.

impl<'a, Pix: Pixel, T: 'a + Clone + Texture<Pixel = Pix>> MultiTexturePacker<'a, T>[src]

pub fn new_skyline(config: TexturePackerConfig) -> Self[src]

Create a new packer using the skyline packing algorithm.

impl<'a, Pix: Pixel, T: 'a + Clone + Texture<Pixel = Pix>> MultiTexturePacker<'a, T>[src]

pub fn pack_ref(&mut self, key: String, texture: &'a T) -> Result<(), PackError>[src]

Pack the texture into this packer, taking a reference of the texture object.

pub fn pack_own(&mut self, key: String, texture: T) -> Result<(), PackError>[src]

Pack the texture into this packer, taking ownership of the texture object.

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for MultiTexturePacker<'a, T>[src]

impl<'a, T> !Send for MultiTexturePacker<'a, T>[src]

impl<'a, T> !Sync for MultiTexturePacker<'a, T>[src]

impl<'a, T> Unpin for MultiTexturePacker<'a, T> where
    T: Unpin
[src]

impl<'a, T> !UnwindSafe for MultiTexturePacker<'a, T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.