import * as _angular_core from '@angular/core'; import { AfterContentInit, OnDestroy } from '@angular/core'; import SignaturePad, { Options, PointGroup } from 'signature_pad'; interface NgSignaturePadOptions extends Options { canvasBackground?: string; canvasHeight?: number; canvasWidth?: number; } declare class SignaturePadComponent implements AfterContentInit, OnDestroy { readonly options: _angular_core.ModelSignal; readonly drawStart: _angular_core.OutputEmitterRef; readonly drawBeforeUpdate: _angular_core.OutputEmitterRef; readonly drawAfterUpdate: _angular_core.OutputEmitterRef; readonly drawEnd: _angular_core.OutputEmitterRef; readonly drawClear: _angular_core.OutputEmitterRef; private _elementRef; private signaturePad; ngAfterContentInit(): void; ngOnDestroy(): void; getSignaturePad(): SignaturePad; getCanvas(): HTMLCanvasElement; /** * Redraw or Resize canvas, note this will clear data. */ redrawCanvas(): void; /** * Change the color of the background dynamically. */ changeBackgroundColor(color: string): void; /** * Returns signature image as an array of point groups */ toData(): PointGroup[]; /** * Draws signature image from an array of point groups */ fromData(points: Array): void; /** * Returns signature image as data URL (see https://mdn.io/todataurl for the list of possible parameters) */ toDataURL(imageType?: string, quality?: number): string; /** * Draws signature image from data URL */ fromDataURL(dataURL: string, options?: { ratio?: number; width?: number; height?: number; }): Promise; /** * Clears the canvas */ clear(redraw?: boolean): void; /** * Returns true if canvas is empty, otherwise returns false */ isEmpty(): boolean; /** * Unbinds all event handlers */ off(): void; /** * Rebinds all event handlers */ on(): void; /** * set an option on the signaturePad - e.g. set('minWidth', 50); * @param option one of SignaturePad to set with value, properties of NgSignaturePadOptions * @param value the value of option */ set(option: string, value: any): void; /** * notify subscribers on signature begin */ beginStroke(event: MouseEvent | Touch): void; beforeUpdateStroke(event: MouseEvent | Touch): void; afterUpdateStroke(event: MouseEvent | Touch): void; /** * notify subscribers on signature end */ endStroke(event: MouseEvent | Touch): void; private initCanvas; private initSignaturePad; /** * To prevent the growing effect when the redrawCanvas is called for the width * @param canvas * @private */ private _getWidthFix; /** * To prevent the growing effect when the redrawCanvas is called for the height * @param canvas * @private */ private _getHeightFix; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { SignaturePadComponent }; export type { NgSignaturePadOptions };