[−][src]Struct guillotiere::SimpleAtlasAllocator
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
impl RefUnwindSafe for SimpleAtlasAllocator
impl Send for SimpleAtlasAllocator
impl Sync for SimpleAtlasAllocator
impl Unpin for SimpleAtlasAllocator
impl UnwindSafe for SimpleAtlasAllocator
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,
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, 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.
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>,