@wendyjs/watermarker
Version:
This is a framework-agnostic package that provides a Watermark class for managing watermarks on HTML elements. It includes features such as automatic re-rendering when mutations occur, customizable watermark styles
16 lines (15 loc) • 934 B
TypeScript
import { WatermarkConfigs } from "./type";
/** converting camel-cased strings to be lowercase and link it with Separato */
export declare function toLowercaseSeparator(key: string): string;
export declare function getStyleStr(style: CSSStyleDeclaration): string;
/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
export declare function getPixelRatio(): number;
/** Whether to re-render the watermark */
export declare const reRendering: (mutation: MutationRecord, isWatermarkEle: (ele: Node) => boolean) => boolean;
/**
* Get the width and height of the watermark. The default values are as follows
* Image: [120, 64]; Content: It's calculated by content;
*/
export declare function getMarkSize(ctx: CanvasRenderingContext2D, configs: WatermarkConfigs): readonly [number, number];
export declare function getMarkStyle(configs: WatermarkConfigs): any;
export declare const FontGap = 3;