[][src]Struct guillotiere::SimpleAtlasAllocator

pub struct SimpleAtlasAllocator { /* fields omitted */ }

A simpler atlas allocator implementation that can allocate rectangles but not deallocate them.

Methods

impl SimpleAtlasAllocator[src]

pub fn new(size: Size) -> Self[src]

Create a simple atlas allocator with default options.

pub fn with_options(size: Size, options: &AllocatorOptions) -> Self[src]

Create a simple atlas allocator with the provided options.

pub fn reset(&mut self, size: Size)[src]

Clear the allocator.

pub fn reset_with_options(&mut self, size: Size, options: &AllocatorOptions)[src]

Clear the allocator and reset its options.

pub fn size(&self) -> Size[src]

The total size of the atlas.

pub fn allocate(&mut self, requested_size: Size) -> Option<Rectangle>[src]

Allocate a rectangle in the atlas.

pub fn grow(&mut self, new_size: Size)[src]

Resize the atlas without changing the allocations.

This method is not allowed to shrink the width or height of the atlas.

pub fn init_from_allocator(&mut self, src: &AtlasAllocator)[src]

Initialize this simple allocator with the content of an atlas allocator.

Auto Trait Implementations

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.