pub enum LayerOperation {
Multiply,
Add,
Overlay,
}Expand description
How a LaidLayer’s value l combines with the value b it changes (per channel), weighted by the layer’s own
opacity w.
Variants§
Multiply
b * (1 + (l - 1) * w): b * l where the layer is opaque, b where it is clear.
Add
b + l * w.
Overlay
b + (overlay(b, l) - b) * w, where overlay(b, l) is 2 b l for b below 0.5 and 1 - 2 (1 - b) (1 - l)
otherwise.
Implementations§
Trait Implementations§
Source§impl Clone for LayerOperation
impl Clone for LayerOperation
impl Copy for LayerOperation
Source§impl Debug for LayerOperation
impl Debug for LayerOperation
impl Eq for LayerOperation
Source§impl PartialEq for LayerOperation
impl PartialEq for LayerOperation
Source§impl Serialize for LayerOperation
impl Serialize for LayerOperation
impl StructuralPartialEq for LayerOperation
Auto Trait Implementations§
impl Forget for LayerOperation
impl Freeze for LayerOperation
impl RefUnwindSafe for LayerOperation
impl Send for LayerOperation
impl Sync for LayerOperation
impl Unpin for LayerOperation
impl UnsafeUnpin for LayerOperation
impl UnwindSafe for LayerOperation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.