pub struct Movie { /* private fields */ }Expand description
A film and its edits. Cloning is cheap: the film itself is shared.
Implementations§
Source§impl Movie
impl Movie
Sourcepub fn with_project(&self, project: Project) -> Self
pub fn with_project(&self, project: Project) -> Self
The same film with these edits.
Sourcepub fn logical_size(&self) -> Size
pub fn logical_size(&self) -> Size
The size of the app it shows, in logical pixels.
Sourcepub fn background(&self) -> Color
pub fn background(&self) -> Color
The color behind everything.
Sourcepub fn duration_ms(&self) -> u64
pub fn duration_ms(&self) -> u64
How long it runs with its edits, in milliseconds.
Sourcepub fn film_duration_ms(&self) -> u64
pub fn film_duration_ms(&self) -> u64
How long the film runs with no edits.
Sourcepub fn chapters(&self) -> &[Chapter]
pub fn chapters(&self) -> &[Chapter]
Its chapters, on the edited timeline. A chapter that was cut starts where the cut left it, unless nothing of it remains.
Sourcepub fn poster_ms(&self) -> u64
pub fn poster_ms(&self) -> u64
A moment to show before it plays: past any fade from black at the start, and past the coming in of an opening card, so that it shows its words.
Sourcepub fn chapter_at(&self, ms: u64) -> Option<usize>
pub fn chapter_at(&self, ms: u64) -> Option<usize>
The chapter playing at ms of the timeline.
Sourcepub fn draw_list(&self, film_ms: u64) -> Option<(usize, Rc<[u32]>)>
pub fn draw_list(&self, film_ms: u64) -> Option<(usize, Rc<[u32]>)>
What the app drew at this moment of the film.
Sourcepub fn primitive(&self, index: u32) -> Option<&Primitive>
pub fn primitive(&self, index: u32) -> Option<&Primitive>
A thing the app drew, from a Self::draw_list.
Sourcepub fn pointer_at(&self, film_ms: u64) -> Option<Point>
pub fn pointer_at(&self, film_ms: u64) -> Option<Point>
Where the pointer was at this moment of the film.
Sourcepub fn click_before(&self, film_ms: u64) -> Option<(Point, u64)>
pub fn click_before(&self, film_ms: u64) -> Option<(Point, u64)>
The last click at or before this moment of the film, and how long ago it was.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, MovieError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MovieError>
Reads a film back from the bytes of a file.