pub struct CrossfadeNode {
pub factor: f32,
pub to_rgba: Vec<u8>,
pub to_width: u32,
pub to_height: u32,
}Expand description
Linear crossfade between two RGBA frames.
factor = 0.0→ output equals the input frame (inputs[0]/process_cpuargument).factor = 1.0→ output equalsto_rgba.factor = 0.5→ arithmetic mean of both frames.
The “to” frame is stored in the node at construction time.
Fields§
§factor: f32Blend factor: 0.0 (from) → 1.0 (to).
to_rgba: Vec<u8>The “to” frame as RGBA bytes. Length must equal to_width × to_height × 4.
to_width: u32Width of to_rgba.
to_height: u32Height of to_rgba.
Implementations§
Trait Implementations§
Source§impl RenderNodeCpu for CrossfadeNode
impl RenderNodeCpu for CrossfadeNode
Auto Trait Implementations§
impl Freeze for CrossfadeNode
impl RefUnwindSafe for CrossfadeNode
impl Send for CrossfadeNode
impl Sync for CrossfadeNode
impl Unpin for CrossfadeNode
impl UnsafeUnpin for CrossfadeNode
impl UnwindSafe for CrossfadeNode
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