pub struct ChromaKeyOptions {
pub method: ChromaKeyMethod,
pub threshold: f32,
pub smoothing: f32,
}Expand description
Construction-time options for either chroma-key backend.
Fields§
§method: ChromaKeyMethodColor selection used as the transparent key.
threshold: f32How far (as a fraction of the maximum possible RGB distance, so
0.0..=1.0 is the meaningful range) a pixel may differ from the key
color before it counts as foreground rather than background.
smoothing: f32Width of the linear feather band straddling threshold, in the
same 0.0..=1.0 units — this is what keeps a key edge from aliasing
into a hard, jagged cutout. 0.0 (or negative) is a hard step with
no feathering at all.
Trait Implementations§
Source§impl Clone for ChromaKeyOptions
impl Clone for ChromaKeyOptions
Source§fn clone(&self) -> ChromaKeyOptions
fn clone(&self) -> ChromaKeyOptions
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 moreimpl Copy for ChromaKeyOptions
Auto Trait Implementations§
impl Freeze for ChromaKeyOptions
impl RefUnwindSafe for ChromaKeyOptions
impl Send for ChromaKeyOptions
impl Sync for ChromaKeyOptions
impl Unpin for ChromaKeyOptions
impl UnsafeUnpin for ChromaKeyOptions
impl UnwindSafe for ChromaKeyOptions
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