Struct vobsub::Subtitle
[−]
[src]
pub struct Subtitle { /* fields omitted */ }
A single subtitle.
Methods
impl Subtitle
[src]
fn start_time(&self) -> f64
Start time of subtitle, in seconds.
fn end_time(&self) -> f64
End time of subtitle, in seconds. This may be missing from certain subtitles.
fn force(&self) -> bool
Should this subtitle be shown even when subtitles are off?
fn coordinates(&self) -> &Coordinates
Coordinates at which to display the subtitle.
fn palette(&self) -> &[u8; 4]
Map each of the 4 colors in this subtitle to a 4-bit palette.
fn alpha(&self) -> &[u8; 4]
Map each of the 4 colors in this subtitle to 4 bits of alpha channel data.
fn raw_image(&self) -> &[u8]
Our decompressed image, stored with 2 bits per byte in row-major
order, that can be used as indices into palette
and alpha
.
fn to_image(&self, palette: &Palette) -> RgbaImage
Decompress to subtitle to an RBGA image.
Trait Implementations
impl Clone for Subtitle
[src]
fn clone(&self) -> Subtitle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Subtitle
[src]
fn eq(&self, __arg_0: &Subtitle) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Subtitle) -> bool
This method tests for !=
.