pub enum TransferFunction {
Identity,
Table(Vec<f32>),
Discrete(Vec<f32>),
Linear {
slope: f32,
intercept: f32,
},
Gamma {
amplitude: f32,
exponent: f32,
offset: f32,
},
}
Expand description
A transfer function used by FeComponentTransfer
.
https://www.w3.org/TR/SVG11/filters.html#transferFuncElements
Variants§
Identity
Keeps a component as is.
Table(Vec<f32>)
Applies a linear interpolation to a component.
The number list can be empty.
Discrete(Vec<f32>)
Applies a step function to a component.
The number list can be empty.
Linear
Applies a linear shift to a component.
Gamma
Applies an exponential shift to a component.
Trait Implementations§
source§impl Clone for TransferFunction
impl Clone for TransferFunction
source§fn clone(&self) -> TransferFunction
fn clone(&self) -> TransferFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TransferFunction
impl RefUnwindSafe for TransferFunction
impl Send for TransferFunction
impl Sync for TransferFunction
impl Unpin for TransferFunction
impl UnwindSafe for TransferFunction
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)