sunzi-plugin-sketch
v0.0.1
Published
---
Downloads
3
Readme
sunzi-plugin-erasure
Usage
// init
const erasure = new Erasure(canvas: HTMLCanvasElement, image: HTMLImageElement, {
size: number; // 橡皮擦大小
});
// 切换模式 (划线和移动)
erasure.modeToggle();
// 撤销
erasure.revoke();
// 放大图片
erasure.zoomIn(scale: number = 1.1);
// 缩小图片
erasure.zoomOut(scale: number = 0.9);
// 生成图片
erasure.toEtasureURL() : Promise<String>
// 重置
erasure.reset();