pub enum Composition {
Sum,
Over,
Height {
contrast: f32,
},
}Expand description
How the weighted layers combine.
Variants§
Sum
sum(weight[i] * layer[i]).
Over
Slot 0, then lerp(colour, layer[i], weight[i]) for each later slot in order.
Height
Each slot’s weight w_i times its height h_i (LayerWeights::heights) is p_i, the highest m; slot i
gets u_i = max(p_i - (m - (1 - contrast)), 0), normalized by their sum (height_blend). Where every u_i
is 0 (a contrast of 1 or more) the blend has no weight: a consumer states its fallback.
Trait Implementations§
Source§impl Clone for Composition
impl Clone for Composition
impl Copy for Composition
Source§impl Debug for Composition
impl Debug for Composition
Source§impl PartialEq for Composition
impl PartialEq for Composition
Source§impl Serialize for Composition
impl Serialize for Composition
impl StructuralPartialEq for Composition
Auto Trait Implementations§
impl Forget for Composition
impl Freeze for Composition
impl RefUnwindSafe for Composition
impl Send for Composition
impl Sync for Composition
impl Unpin for Composition
impl UnsafeUnpin for Composition
impl UnwindSafe for Composition
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