Trait texture_packer::texture::Texture
[−]
[src]
pub trait Texture { type Pixel: Pixel; fn width(&self) -> u32; fn height(&self) -> u32; fn get(&self, x: u32, y: u32) -> Option<Self::Pixel>; fn set(&mut self, x: u32, y: u32, val: Self::Pixel); fn get_rotated(&self, x: u32, y: u32) -> Option<Self::Pixel> { ... } fn is_column_transparent(&self, col: u32) -> bool { ... } fn is_row_transparent(&self, row: u32) -> bool { ... } }
Associated Types
Required Methods
fn width(&self) -> u32
fn height(&self) -> u32
fn get(&self, x: u32, y: u32) -> Option<Self::Pixel>
fn set(&mut self, x: u32, y: u32, val: Self::Pixel)
Provided Methods
fn get_rotated(&self, x: u32, y: u32) -> Option<Self::Pixel>
fn is_column_transparent(&self, col: u32) -> bool
fn is_row_transparent(&self, row: u32) -> bool
Implementations on Foreign Types
impl<P: Pixel> Texture for Box<Texture<Pixel = P> + 'static>
[src]
type Pixel = P
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
fn get(&self, x: u32, y: u32) -> Option<P>
[src]
fn set(&mut self, x: u32, y: u32, val: P)
[src]
fn get_rotated(&self, x: u32, y: u32) -> Option<Self::Pixel>
[src]
fn is_column_transparent(&self, col: u32) -> bool
[src]
fn is_row_transparent(&self, row: u32) -> bool
[src]
Implementors
impl<'a, T: Texture + Clone> Texture for SubTexture<'a, T> type Pixel = T::Pixel;
impl Texture for MemoryRGBA8Texture type Pixel = RGBA8;
impl<P: Pixel + Pixel, I: GenericImage<Pixel = P>> Texture for I type Pixel = I::Pixel;
impl<'a, Pix, P, T: Clone> Texture for TexturePacker<'a, T, P> where
Pix: Pixel,
P: Packer<Pixel = Pix>,
T: Texture<Pixel = Pix>, type Pixel = Pix;