Skip to main content

FrameEffect

Trait FrameEffect 

Source
pub trait FrameEffect {
    // Required method
    fn apply(
        &mut self,
        buf: &mut Buffer,
        area: Rect,
        elapsed: Duration,
    ) -> EffectStatus;

    // Provided method
    fn capture_before(&mut self, _buf: &Buffer, _area: Rect) { ... }
}

Required Methods§

Source

fn apply( &mut self, buf: &mut Buffer, area: Rect, elapsed: Duration, ) -> EffectStatus

Provided Methods§

Source

fn capture_before(&mut self, _buf: &Buffer, _area: Rect)

Optionally capture the pre-paint (“before”) state of area from the buffer at the start of a render pass. Called by the runner once per render before the main paint walk, so effects like SlideIn can snapshot the outgoing content and push it out while new content slides in. Default: no-op.

Implementors§