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

See effects/SkImageFilters.h for more.

Methods

MakeBlur(
sigmaX: number,
sigmaY: number,
mode: TileMode,
input: SkImageFilter | null,
): SkImageFilter

Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode is used when the blur kernel goes outside the input image.

MakeColorFilter(cf: SkColorFilter, input: SkImageFilter | null): SkImageFilter

Create a filter that applies the color filter to the input filter results.

MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null): SkImageFilter

Create a filter that composes 'inner' with 'outer', such that the results of 'inner' are treated as the source bitmap passed to 'outer'. If either param is null, the other param will be returned.

MakeMatrixTransform(
input: SkImageFilter | null,
): SkImageFilter

Create a filter that transforms the input image by 'matrix'. This matrix transforms the local space, which means it effectively happens prior to any transformation coming from the SkCanvas initiating the filtering.