Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface SkShaderFactory
import { type SkShaderFactory } from "https://deno.land/x/canvaseno@v1.0.2/types.ts";

For more information, see SkShaders.h. TODO(kjlubick) Rename these to Make* as per the convention

Methods

Blend(
mode: BlendMode,
one: SkShader,
two: SkShader,
): SkShader

Returns a shader that combines the given shaders with a BlendMode.

Color(color: InputColor, space: ColorSpace): SkShader

Returns a shader with a given color and colorspace.

Lerp(
t: number,
one: SkShader,
two: SkShader,
): SkShader

Returns a shader is a linear interpolation combines the given shaders with a BlendMode.