@leafer/interface 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/interface",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "@leafer/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -129,6 +129,7 @@ interface ICanvasMethod {
129
129
  copyWorldByReset(canvas: ILeaferCanvas, from?: IBoundsData, to?: IBoundsData, blendMode?: string, onlyResetTransform?: boolean): void
130
130
  copyWorldToInner(canvas: ILeaferCanvas, fromWorld: IMatrixWithBoundsData, toInnerBounds: IBoundsData, blendMode?: string): void
131
131
 
132
+ useGrayscaleAlpha(bounds: IBoundsData): void
132
133
  useMask(maskCanvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData): void
133
134
  useEraser(eraserCanvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData): void
134
135
 
@@ -28,6 +28,7 @@ export interface ILeafDataOptions {
28
28
 
29
29
  export interface ILeafData extends IDataProcessor, ILeafComputedData {
30
30
  __single?: boolean
31
+ readonly __hasMultiPaint?: boolean // fill 、stroke 、shadow 等同时存在两次以上外观绘制的情况
31
32
  __checkSingle(): void
32
33
  __removeNaturalSize(): void
33
34
  }
@@ -81,7 +81,9 @@ export type IHitType =
81
81
  export type IMaskType =
82
82
  | 'path'
83
83
  | 'pixel'
84
+ | 'grayscale'
84
85
  | 'clipping'
86
+ | 'clipping-path'
85
87
 
86
88
  export type IEraserType =
87
89
  | 'path'
package/types/index.d.ts CHANGED
@@ -1039,6 +1039,7 @@ interface ICanvasMethod {
1039
1039
  copyWorld(canvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData, blendMode?: string): void;
1040
1040
  copyWorldByReset(canvas: ILeaferCanvas, from?: IBoundsData, to?: IBoundsData, blendMode?: string, onlyResetTransform?: boolean): void;
1041
1041
  copyWorldToInner(canvas: ILeaferCanvas, fromWorld: IMatrixWithBoundsData, toInnerBounds: IBoundsData, blendMode?: string): void;
1042
+ useGrayscaleAlpha(bounds: IBoundsData): void;
1042
1043
  useMask(maskCanvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData): void;
1043
1044
  useEraser(eraserCanvas: ILeaferCanvas, fromBounds?: IBoundsData, toBounds?: IBoundsData): void;
1044
1045
  fillWorld(bounds: IBoundsData, color: string | object, blendMode?: string): void;
@@ -1212,6 +1213,7 @@ interface ILeafDataOptions {
1212
1213
  }
1213
1214
  interface ILeafData extends IDataProcessor, ILeafComputedData {
1214
1215
  __single?: boolean;
1216
+ readonly __hasMultiPaint?: boolean;
1215
1217
  __checkSingle(): void;
1216
1218
  __removeNaturalSize(): void;
1217
1219
  }
@@ -1318,7 +1320,7 @@ interface IConstraint {
1318
1320
  }
1319
1321
  type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale';
1320
1322
  type IHitType = 'path' | 'pixel' | 'all' | 'none';
1321
- type IMaskType = 'path' | 'pixel' | 'clipping';
1323
+ type IMaskType = 'path' | 'pixel' | 'grayscale' | 'clipping' | 'clipping-path';
1322
1324
  type IEraserType = 'path' | 'pixel';
1323
1325
  type IBlendMode = 'pass-through' | 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity' | 'source-over' | 'source-in' | 'source-out' | 'source-atop' | 'destination-over' | 'destination-in' | 'destination-out' | 'destination-atop' | 'xor';
1324
1326
  type IEditSize = 'size' | 'font-size' | 'scale';