[][src]Struct blitter::Bitmap

pub struct Bitmap<'a> {
    pub w: usize,
    pub h: usize,
    pub x: isize,
    pub y: isize,
    pub pixels: &'a Vec<u32>,
}

This structure stores bitmap's sizes, coordinates, and a pointer to its pixel data

Fields

w: usize

Bitmap width

h: usize

Bitmap height

x: isize

Bitmap horizontal position

y: isize

Bitmap vertical position

pixels: &'a Vec<u32>

32 bits pixel data

Methods

impl<'_> Bitmap<'_>[src]

pub fn blit_mask(&self, fb: &mut Framebuffer, mask: Mask)[src]

Copies a bitmap to the framebuffer, applying a mask

pub fn blit(&self, fb: &mut Framebuffer)[src]

Convenience function to blit without any mask

pub fn blit_part(
    &self,
    fb: &mut Framebuffer,
    start_offset: usize,
    w: usize,
    h: usize
)
[src]

Copies a portion of a bitmap to the framebuffer

Auto Trait Implementations

impl<'a> RefUnwindSafe for Bitmap<'a>

impl<'a> Send for Bitmap<'a>

impl<'a> Sync for Bitmap<'a>

impl<'a> Unpin for Bitmap<'a>

impl<'a> UnwindSafe for Bitmap<'a>

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.