[−][src]Struct a2d::SpriteSheet
An image loaded in GPU memory ready to be used with a SpriteBatch
Implementations
impl SpriteSheet
[src]
pub fn from_bytes(
state: &mut Graphics2D,
diffuse_bytes: &[u8]
) -> Result<Rc<Self>>
[src]
state: &mut Graphics2D,
diffuse_bytes: &[u8]
) -> Result<Rc<Self>>
Creates a sprite sheet from image bytes
The bytes are interpreted by passing the bytes to the
load_from_memory
function from the image
crate
pub fn from_color<C: Into<Color>>(
state: &mut Graphics2D,
color: C
) -> Result<Rc<Self>>
[src]
state: &mut Graphics2D,
color: C
) -> Result<Rc<Self>>
pub fn from_colors<C, V>(
state: &mut Graphics2D,
width: u32,
height: u32,
colors: V
) -> Result<Rc<Self>> where
C: Into<Color>,
V: IntoIterator<Item = C>,
[src]
state: &mut Graphics2D,
width: u32,
height: u32,
colors: V
) -> Result<Rc<Self>> where
C: Into<Color>,
V: IntoIterator<Item = C>,
pub fn from_rgba_bytes(
state: &mut Graphics2D,
width: u32,
height: u32,
bytes: Vec<u8>
) -> Result<Rc<Self>>
[src]
state: &mut Graphics2D,
width: u32,
height: u32,
bytes: Vec<u8>
) -> Result<Rc<Self>>
Auto Trait Implementations
impl !RefUnwindSafe for SpriteSheet
impl Send for SpriteSheet
impl Sync for SpriteSheet
impl Unpin for SpriteSheet
impl UnwindSafe for SpriteSheet
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> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,