editor-render-v2
Version:
编辑器渲染器
35 lines (34 loc) • 742 B
TypeScript
import { fabric } from 'fabric';
import Handler from './Handler';
interface ICreateOption {
type: string;
figure?: string;
url?: string;
}
/**
* 设置图片蒙版
*/
declare class ImageClipPathHandler {
/** @ignore */
handler: Handler;
/** @ignore */
constructor(handler: Handler);
create({ type, figure, url }: ICreateOption): Promise<unknown>;
/**
* 删除蒙版
*/
delete(): {
version: string;
objects: fabric.Object[];
};
/**
* 更新蒙版的属性
* @param type 属性
* @param value 值
*/
update(type: string, value: number): {
version: string;
objects: fabric.Object[];
};
}
export default ImageClipPathHandler;