pub struct LogicalScreenDesc { /* private fields */ }Expand description
The logical screen descriptor contains properties which apply to all frames in the file.
use gift::block::{
ColorTableConfig, ColorTableExistence, ColorTableOrdering,
LogicalScreenDesc
};
let desc = LogicalScreenDesc::default()
.with_screen_width(64)
.with_screen_height(64)
.with_color_table_config(ColorTableConfig::new(
ColorTableExistence::Present,
ColorTableOrdering::NotSorted,
16,
))
.with_background_color_idx(1);Implementations§
Source§impl LogicalScreenDesc
impl LogicalScreenDesc
Sourcepub fn with_screen_width(self, screen_width: u16) -> Self
pub fn with_screen_width(self, screen_width: u16) -> Self
Set the screen width
Sourcepub fn screen_width(self) -> u16
pub fn screen_width(self) -> u16
Get the screen width
Sourcepub fn with_screen_height(self, screen_height: u16) -> Self
pub fn with_screen_height(self, screen_height: u16) -> Self
Set the screen height
Sourcepub fn screen_height(self) -> u16
pub fn screen_height(self) -> u16
Get the screen height
Sourcepub fn equal_size(self, rhs: Self) -> bool
pub fn equal_size(self, rhs: Self) -> bool
Check if screen sizes are equal
Sourcepub fn with_flags(self, flags: u8) -> Self
pub fn with_flags(self, flags: u8) -> Self
Set the flags which control the global color table configuration.
It is recommended to use with_color_table_config instead.
Sourcepub fn color_resolution(self) -> u16
pub fn color_resolution(self) -> u16
Get the color resolution (obsolete GIF feature)
Sourcepub fn color_table_config(self) -> ColorTableConfig
pub fn color_table_config(self) -> ColorTableConfig
Get the global 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 global color table configuration
Sourcepub fn with_background_color_idx(self, background_color_idx: u8) -> Self
pub fn with_background_color_idx(self, background_color_idx: u8) -> Self
Set the background color index
Sourcepub fn background_color_idx(self) -> u8
pub fn background_color_idx(self) -> u8
Get the background color index
Sourcepub fn with_pixel_aspect_ratio(self, pixel_aspect_ratio: u8) -> Self
pub fn with_pixel_aspect_ratio(self, pixel_aspect_ratio: u8) -> Self
Set the pixel aspect ratio (obsolete GIF feature)
Sourcepub fn pixel_aspect_ratio(self) -> u8
pub fn pixel_aspect_ratio(self) -> u8
Get the pixel aspect ratio (obsolete GIF feature)
Trait Implementations§
Source§impl Clone for LogicalScreenDesc
impl Clone for LogicalScreenDesc
Source§fn clone(&self) -> LogicalScreenDesc
fn clone(&self) -> LogicalScreenDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LogicalScreenDesc
Source§impl Debug for LogicalScreenDesc
impl Debug for LogicalScreenDesc
Source§impl Default for LogicalScreenDesc
impl Default for LogicalScreenDesc
Source§fn default() -> LogicalScreenDesc
fn default() -> LogicalScreenDesc
Returns the “default value” for a type. Read more
impl Eq for LogicalScreenDesc
Source§impl From<LogicalScreenDesc> for Block
impl From<LogicalScreenDesc> for Block
Source§fn from(b: LogicalScreenDesc) -> Self
fn from(b: LogicalScreenDesc) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LogicalScreenDesc
impl PartialEq for LogicalScreenDesc
Source§fn eq(&self, other: &LogicalScreenDesc) -> bool
fn eq(&self, other: &LogicalScreenDesc) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LogicalScreenDesc
Auto Trait Implementations§
impl Freeze for LogicalScreenDesc
impl RefUnwindSafe for LogicalScreenDesc
impl Send for LogicalScreenDesc
impl Sync for LogicalScreenDesc
impl Unpin for LogicalScreenDesc
impl UnsafeUnpin for LogicalScreenDesc
impl UnwindSafe for LogicalScreenDesc
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