diff --git a/source/gegl/cartoon.ts b/source/gegl/cartoon.ts new file mode 100644 index 0000000..21b8881 --- /dev/null +++ b/source/gegl/cartoon.ts @@ -0,0 +1,24 @@ +import {BaseOperation} from './base.js'; + +export interface CartoonParameters { + maskRadius: number; + pctBlack: number; +} + +export class Cartoon extends BaseOperation { + public static default: CartoonParameters = { + maskRadius: 7, + pctBlack: 0.2, + }; + + public get default() { + return Cartoon.default; + } + + public appendCrop = false; + public name = 'gegl:cartoon'; + + constructor(parameters?: Partial) { + super({...Cartoon.default, ...parameters}); + } +} diff --git a/source/gegl/exports.ts b/source/gegl/exports.ts index cb4e84a..1ad97fe 100644 --- a/source/gegl/exports.ts +++ b/source/gegl/exports.ts @@ -1,4 +1,5 @@ export * from './base.js'; +export * from './cartoon.js'; export * from './cell-noise.js'; export * from './crop.js'; export * from './focus-blur.js';