[−][src]Struct gif_dispose::Screen
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]
width: usize,
height: usize,
bg_color: PixelType,
global_pal: Option<Vec<PixelType>>
) -> Self
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]
&mut self,
local_pal: Option<&[PixelType]>,
method: DisposalMethod,
left: u16,
top: u16,
buffer: ImgRef<u8>,
transparent: Option<u8>
) -> Result<ImgRef<PixelType>, Error>
Auto Trait Implementations
impl<PixelType> Send for Screen<PixelType> where
PixelType: Send,
PixelType: Send,
impl<PixelType> Sync for Screen<PixelType> where
PixelType: Sync,
PixelType: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,