pub struct EventSelector { /* private fields */ }Expand description
Tracks active events and dirty regions for optimized rendering
Implementations§
Source§impl EventSelector
impl EventSelector
Sourcepub fn set_render_comments(&mut self, render: bool)
pub fn set_render_comments(&mut self, render: bool)
Set whether to render comment events
Sourcepub fn select_active<'a>(
&mut self,
script: &'a Script<'a>,
time_cs: u32,
) -> Result<ActiveEvents<'a>, RenderError>
pub fn select_active<'a>( &mut self, script: &'a Script<'a>, time_cs: u32, ) -> Result<ActiveEvents<'a>, RenderError>
Select active events and track changes for incremental rendering.
time_cs is in centiseconds. An event is active when
start <= time_cs < end — the start is inclusive and the end is
exclusive, matching libass (Start <= now < Start + Duration). The
exclusive end is what stops two events that share a boundary timestamp
(one ending exactly as the next begins) from both rendering for a frame
and stacking on top of each other.
Sourcepub fn add_dirty_region(&mut self, x: u32, y: u32, width: u32, height: u32)
pub fn add_dirty_region(&mut self, x: u32, y: u32, width: u32, height: u32)
Add a dirty region for partial re-rendering
Sourcepub fn dirty_regions(&self) -> &[DirtyRegion]
pub fn dirty_regions(&self) -> &[DirtyRegion]
Get current dirty regions
Sourcepub fn clear_dirty_regions(&mut self)
pub fn clear_dirty_regions(&mut self)
Clear dirty regions after rendering
Trait Implementations§
Source§impl Clone for EventSelector
impl Clone for EventSelector
Source§fn clone(&self) -> EventSelector
fn clone(&self) -> EventSelector
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 moreSource§impl Debug for EventSelector
impl Debug for EventSelector
Auto Trait Implementations§
impl Freeze for EventSelector
impl RefUnwindSafe for EventSelector
impl Send for EventSelector
impl Sync for EventSelector
impl Unpin for EventSelector
impl UnsafeUnpin for EventSelector
impl UnwindSafe for EventSelector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().