[][src]Struct a2d::SpriteBatch

pub struct SpriteBatch { /* fields omitted */ }

Implementations

impl SpriteBatch[src]

pub fn new(sheet: Rc<SpriteSheet>) -> Self[src]

pub fn sheet(&self) -> &SpriteSheet[src]

pub fn scale(&self) -> [f32; 2][src]

The scaling that's applied before performing the batch translation This allows scaling the size of all elements in a batch at once independent of all other batches

pub fn set_scale(&mut self, scale: [f32; 2])[src]

pub fn translation(&self) -> [f32; 2][src]

pub fn set_translation(&mut self, translation: [f32; 2])[src]

pub fn instances(&self) -> &[Instance][src]

pub fn get(&self, i: usize) -> &Instance[src]

pub fn get_mut(&mut self, i: usize) -> &mut Instance[src]

pub fn len(&self) -> usize[src]

pub fn set<I: Into<Instance>>(&mut self, i: usize, inst: I)[src]

pub fn add<I: Into<Instance>>(&mut self, inst: I)[src]

pub fn last(&self) -> Option<&Instance>[src]

pub fn pop(&mut self)[src]

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> SetParameter for T

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.