pub struct ImageDesc { /* private fields */ }
Expand description
The image descriptor block contains properties which apply to one frame.
use gift::block::{
ColorTableConfig, ColorTableExistence, ColorTableOrdering, ImageDesc,
};
let desc = ImageDesc::default()
.with_width(64)
.with_height(64)
.with_color_table_config(ColorTableConfig::new(
ColorTableExistence::Present,
ColorTableOrdering::NotSorted,
16,
));
Implementations§
source§impl ImageDesc
impl ImageDesc
sourcepub fn with_width(self, width: u16) -> Self
pub fn with_width(self, width: u16) -> Self
Set the width
sourcepub fn with_height(self, height: u16) -> Self
pub fn with_height(self, height: u16) -> Self
Set the height
sourcepub fn with_flags(self, flags: u8) -> Self
pub fn with_flags(self, flags: u8) -> Self
Set the flags which control the interlace value and the local color table configuration.
It is recommended to use with_interlaced or with_color_table_config instead.
sourcepub fn flags(&self) -> u8
pub fn flags(&self) -> u8
Get the flags which control the interlace value and the local color table configuration.
sourcepub fn with_interlaced(self, interlaced: bool) -> Self
pub fn with_interlaced(self, interlaced: bool) -> Self
Set the interlaced flag
sourcepub fn interlaced(&self) -> bool
pub fn interlaced(&self) -> bool
Get the interlaced flag
sourcepub fn color_table_config(&self) -> ColorTableConfig
pub fn color_table_config(&self) -> ColorTableConfig
Get the local color table configuration
sourcepub fn with_color_table_config(self, tbl: ColorTableConfig) -> Self
pub fn with_color_table_config(self, tbl: ColorTableConfig) -> Self
Set the local color table configuration
Trait Implementations§
source§impl PartialEq for ImageDesc
impl PartialEq for ImageDesc
impl Copy for ImageDesc
impl Eq for ImageDesc
impl StructuralEq for ImageDesc
impl StructuralPartialEq for ImageDesc
Auto Trait Implementations§
impl RefUnwindSafe for ImageDesc
impl Send for ImageDesc
impl Sync for ImageDesc
impl Unpin for ImageDesc
impl UnwindSafe for ImageDesc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more