Module

x/canvas/mod.ts

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface SkShaderFactory
import { type SkShaderFactory } from "https://deno.land/x/canvas@v1.0.0/mod.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.