pub enum TransferFunction<'a> {
Identity,
Table(&'a [f64]),
Discrete(&'a [f64]),
Linear {
slope: f64,
intercept: f64,
},
Gamma {
amplitude: f64,
exponent: f64,
offset: f64,
},
}
Expand description
A transfer function used component_transfer
.
https://www.w3.org/TR/SVG11/filters.html#transferFuncElements
Variants§
Identity
Keeps component as is.
Table(&'a [f64])
Applies a linear interpolation to a component.
The number list can be empty.
Discrete(&'a [f64])
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<'a> Clone for TransferFunction<'a>
impl<'a> Clone for TransferFunction<'a>
Source§fn clone(&self) -> TransferFunction<'a>
fn clone(&self) -> TransferFunction<'a>
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 moreSource§impl<'a> Debug for TransferFunction<'a>
impl<'a> Debug for TransferFunction<'a>
impl<'a> Copy for TransferFunction<'a>
Auto Trait Implementations§
impl<'a> Freeze for TransferFunction<'a>
impl<'a> RefUnwindSafe for TransferFunction<'a>
impl<'a> Send for TransferFunction<'a>
impl<'a> Sync for TransferFunction<'a>
impl<'a> Unpin for TransferFunction<'a>
impl<'a> UnwindSafe for TransferFunction<'a>
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