Type Definition skia_safe::Blender

source ·
pub type Blender = RCHandle<SkBlender>;
Expand description

Blender represents a custom blend function in the Skia pipeline. When an Blender is present in a paint, the BlendMode is ignored. A blender combines a source color (the result of our paint) and destination color (from the canvas) into a final color.

Implementations§

source§

impl Blender

source

pub fn mode(mode: BlendMode) -> Blender

Create a blender that implements the specified BlendMode.

source§

impl Blender

source

pub fn arithmetic( k1: f32, k2: f32, k3: f32, k4: f32, enforce_premul: bool ) -> Option<Blender>

Trait Implementations§

source§

impl Debug for Blender

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SkBlendMode> for Blender

source§

fn from(mode: BlendMode) -> Self

Converts to this type from the input type.
source§

impl Send for Blender

source§

impl Sync for Blender