Function arithmetic
pub fn arithmetic(
k1: f32,
k2: f32,
k3: f32,
k4: f32,
enforce_pm_color: bool,
background: impl Into<Option<RCHandle<SkImageFilter>>>,
foreground: impl Into<Option<RCHandle<SkImageFilter>>>,
crop_rect: impl Into<CropRect>,
) -> Option<RCHandle<SkImageFilter>>Expand description
Create a filter that implements a custom blend mode. Each output pixel is the result of combining the corresponding background and foreground pixels using the 4 coefficients: k1 * foreground * background + k2 * foreground + k3 * background + k4
k1,k2,k3,k4The four coefficients used to combine the foreground and background.enforce_pm_color- Iftrue, the RGB channels will be clamped to the calculated alpha.background- The background content, using the source bitmap when this is null.foreground- The foreground content, using the source bitmap when this is null.crop_rect- Optional rectangle that crops the inputs and output.