From ccb7c5dc16029909045607a02aee70da37ac5c03 Mon Sep 17 00:00:00 2001 From: Bradley Hill Date: Thu, 7 Feb 2019 08:49:41 -0600 Subject: [PATCH] Fabricjs - missing color matrix definition (we only had matrix when charlie chaplin played Neo) --- types/fabric/fabric-impl.d.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 68c0a73efe..5cc59d0941 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -3774,7 +3774,18 @@ interface IAllFilters { */ fromObject(object: any): IBrightnessFilter }; - Convolute: { + ColorMatrix: { + new(options?: { + /** Filter matrix */ + matrix?: number[] + }): IColorMatrix; + /** + * Returns filter instance from an object representation + * @param object Object to create an instance from + */ + fromObject(object: any): IColorMatrix + }; + Convolute: { new(options?: { opaque?: boolean, /** Filter matrix */ @@ -3962,6 +3973,13 @@ interface IBrightnessFilter extends IBaseFilter { */ applyTo(canvasEl: HTMLCanvasElement): void; } +interface IColorMatrix extends IBaseFilter { + /** + * Applies filter to canvas element + * @param canvasEl Canvas element to apply filter to + */ + applyTo(canvasEl: HTMLCanvasElement): void; +} interface IConvoluteFilter extends IBaseFilter { /** * Applies filter to canvas element