[][src]Struct gif_dispose::Screen

pub struct Screen<PixelType = RGBA8> {
    pub pixels: ImgVec<PixelType>,
    // some fields omitted
}

Combined GIF frames forming a "virtual screen"

Pixel type can be RGB8 or RGBA8. The size is overall GIF size (grater or equal individual frame sizes).

Fields

pixels: ImgVec<PixelType>

Result of combining all frames so far. It's in RGB/RGBA.

Methods

impl Screen<RGBA8>[src]

pub fn new_reader<T: Read>(reader: &Reader<T>) -> Self[src]

Initialize an empty RGBA screen from the GIF Reader.

Make sure Reader is set to use Indexed color. decoder.set(gif::ColorOutput::Indexed);

impl<PixelType: From<RGB8> + Copy + Default> Screen<PixelType>[src]

pub fn from_reader<T: Read>(reader: &Reader<T>) -> Self[src]

Create an new Screen with any pixel type

You may need type hints or use the screen.pixels to tell Rust whether you want RGB8 or RGBA8.

pub fn new(
    width: usize,
    height: usize,
    bg_color: PixelType,
    global_pal: Option<Vec<PixelType>>
) -> Self
[src]

pub fn blit_frame(&mut self, frame: &Frame) -> Result<ImgRef<PixelType>, Error>[src]

Advance the screen by one frame.

The result will be in screen.pixels.buf

pub fn blit(
    &mut self,
    local_pal: Option<&[PixelType]>,
    method: DisposalMethod,
    left: u16,
    top: u16,
    buffer: ImgRef<u8>,
    transparent: Option<u8>
) -> Result<ImgRef<PixelType>, Error>
[src]

Auto Trait Implementations

impl<PixelType> Send for Screen<PixelType> where
    PixelType: Send

impl<PixelType> Sync for Screen<PixelType> where
    PixelType: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.