pub enum ActiveTransferFunction {
Single(Function),
Four([Function; 4]),
}Expand description
A transfer function.
Variants§
Single(Function)
A single transfer function applied to all components.
Four([Function; 4])
Four transfer functions, one for each component.
Implementations§
Source§impl ActiveTransferFunction
impl ActiveTransferFunction
Sourcepub fn apply(&self, color: &AlphaColor) -> AlphaColor
pub fn apply(&self, color: &AlphaColor) -> AlphaColor
Apply the transfer function to the RGB channels of an RGBA color. The alpha channel is left unchanged.
Trait Implementations§
Source§impl Clone for ActiveTransferFunction
impl Clone for ActiveTransferFunction
Source§fn clone(&self) -> ActiveTransferFunction
fn clone(&self) -> ActiveTransferFunction
Returns a duplicate 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 ActiveTransferFunction
impl RefUnwindSafe for ActiveTransferFunction
impl Send for ActiveTransferFunction
impl Sync for ActiveTransferFunction
impl Unpin for ActiveTransferFunction
impl UnsafeUnpin for ActiveTransferFunction
impl UnwindSafe for ActiveTransferFunction
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