pub struct ArithmeticCompositeEffect {
pub name: String,
pub multiply_amount: f32,
pub source1_amount: f32,
pub source2_amount: f32,
pub offset: f32,
pub clamp_output: bool,
pub source1: Option<GraphicsEffectSource>,
pub source2: Option<GraphicsEffectSource>,
}Expand description
Combines two sources channel by channel as
MultiplyAmount * s1 * s2 + Source1Amount * s1 + Source2Amount * s2 + Offset
on premultiplied colours (Win2D ArithmeticCompositeEffect).
Animatable: MultiplyAmount, Source1Amount, Source2Amount, Offset.
Drawn when one of the sources is a colour source: the combination is
then a colour matrix of the other source. A factory made from one whose
sources are both images reports
CompositionEffectFactoryError::EffectTypeNotSupported.
Fields§
§name: StringThe name of the effect.
multiply_amount: f32The weight of the product of the sources (default 1).
source1_amount: f32The weight of the first source (default 0).
source2_amount: f32The weight of the second source (default 0).
offset: f32The constant added (default 0).
clamp_output: boolWhether the output is clamped (stored; the drawing contexts clamp).
source1: Option<GraphicsEffectSource>The first input.
source2: Option<GraphicsEffectSource>The second input.
Trait Implementations§
Source§impl Clone for ArithmeticCompositeEffect
impl Clone for ArithmeticCompositeEffect
Source§impl Debug for ArithmeticCompositeEffect
impl Debug for ArithmeticCompositeEffect
Source§impl Default for ArithmeticCompositeEffect
impl Default for ArithmeticCompositeEffect
Source§impl From<ArithmeticCompositeEffect> for GraphicsEffect
impl From<ArithmeticCompositeEffect> for GraphicsEffect
Source§fn from(effect: ArithmeticCompositeEffect) -> Self
fn from(effect: ArithmeticCompositeEffect) -> Self
Source§impl From<ArithmeticCompositeEffect> for GraphicsEffectSource
impl From<ArithmeticCompositeEffect> for GraphicsEffectSource
Source§fn from(effect: ArithmeticCompositeEffect) -> Self
fn from(effect: ArithmeticCompositeEffect) -> Self
impl StructuralPartialEq for ArithmeticCompositeEffect
Auto Trait Implementations§
impl Freeze for ArithmeticCompositeEffect
impl RefUnwindSafe for ArithmeticCompositeEffect
impl Send for ArithmeticCompositeEffect
impl Sync for ArithmeticCompositeEffect
impl Unpin for ArithmeticCompositeEffect
impl UnsafeUnpin for ArithmeticCompositeEffect
impl UnwindSafe for ArithmeticCompositeEffect
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more