@leafer-ui/interface 2.1.2 → 2.1.3
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 +2 -2
- package/src/module/IPaint.ts +2 -2
- package/src/type/IComputedType.ts +2 -1
- package/types/index.d.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interface",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "@leafer-ui/interface",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/interface": "2.1.
|
|
25
|
+
"@leafer/interface": "2.1.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/module/IPaint.ts
CHANGED
|
@@ -55,11 +55,11 @@ export interface IPaintImageModule {
|
|
|
55
55
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void
|
|
56
56
|
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, align: IAlign, freeTransform?: boolean): void
|
|
57
57
|
|
|
58
|
-
brush?(paint: ILeafPaint): void
|
|
58
|
+
brush?(paint: ILeafPaint, ui: IUI): void
|
|
59
59
|
addBrushScale?(scaleData: IScaleData, paint: ILeafPaint, ui: IUI): void
|
|
60
60
|
getBrushScale?(paint: ILeafPaint, ui: IUI): number
|
|
61
|
+
cacheBrush?(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
|
|
61
62
|
recycleBrush?(paint: ILeafPaint, ui: IUI): void
|
|
62
|
-
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export interface IPaintGradientModule {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlendMode, IDirection, IFilmPlayOptions, IInterlace, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem, ILeaf } from '@leafer/interface'
|
|
1
|
+
import { IBlendMode, IDirection, IFilmPlayOptions, IInterlace, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem, ILeaf, ILeaferCanvas } from '@leafer/interface'
|
|
2
2
|
|
|
3
3
|
import { IColorString } from './IStringType'
|
|
4
4
|
import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IPaint } from './IType'
|
|
@@ -33,6 +33,7 @@ export interface ILeafPaint extends IFilmPlayOptions {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export interface ILeafPaintBrush {
|
|
36
|
+
cache?: ILeaferCanvas
|
|
36
37
|
render(canvas: any, x: number, y: number, width: number, height: number, leaf: ILeaf, paint: any, imageScaleX: number, imageScaleY: number): void
|
|
37
38
|
destroy(): void
|
|
38
39
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMultimediaType, IBlendMode, IScaleFixed, IAlign, IUnitPointData, IFilmOptions, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPercentData, IInterlace, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IFilmPlayOptions, IMatrixData, ILeaferImage, ITaskItem, ILeaf, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IBounds, ILeafInputData, ILeafComputedData, ILeafData, IPathCommandDataWithWindingRule, IBoundsData, IValue, IDirection4 as IDirection4$1, IAround, IOptionPointData, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer,
|
|
1
|
+
import { IMultimediaType, IBlendMode, IScaleFixed, IAlign, IUnitPointData, IFilmOptions, IImageLOD, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPercentData, IInterlace, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IFilmPlayOptions, IMatrixData, ILeaferImage, ITaskItem, ILeaferCanvas, ILeaf, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IBounds, ILeafInputData, ILeafComputedData, ILeafData, IPathCommandDataWithWindingRule, IBoundsData, IValue, IDirection4 as IDirection4$1, IAround, IOptionPointData, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IScaleData as IScaleData$1, IBooleanMap, IFunction, IMatrixWithBoundsScaleData } from '@leafer/interface';
|
|
2
2
|
export * from '@leafer/interface';
|
|
3
3
|
import { IObject as IObject$1, IEditSize, IStroke as IStroke$1, IFourNumber as IFourNumber$1, IFill as IFill$1, IBoxInputData as IBoxInputData$1, IRectInputData as IRectInputData$1, IColorString as IColorString$1, IDirection4, ICursorType, IImageCursor, IAlign as IAlign$1, IUnitPointData as IUnitPointData$1, IUIInputData as IUIInputData$1, IShortcutKeysCheck, IShortcutKeys, IUI as IUI$1, IPointData as IPointData$1, IScaleData, ISkewData, IGroup as IGroup$1, ISelectorProxy, IBox as IBox$1, ILayoutBoundsData, IKeyEvent, IUIEvent, IDragEvent, IMoveEvent, IZoomEvent, IRotateEvent, ITransition as ITransition$1, ILeafList, ILeafer as ILeafer$1, ILeaf as ILeaf$1, IGroupInputData as IGroupInputData$1, IStateName as IStateName$1, IString as IString$1, IBoolean as IBoolean$1, IStateStyle as IStateStyle$1 } from '@leafer-ui/interface';
|
|
4
4
|
|
|
@@ -186,6 +186,7 @@ interface ILeafPaint extends IFilmPlayOptions {
|
|
|
186
186
|
brush?: ILeafPaintBrush;
|
|
187
187
|
}
|
|
188
188
|
interface ILeafPaintBrush {
|
|
189
|
+
cache?: ILeaferCanvas;
|
|
189
190
|
render(canvas: any, x: number, y: number, width: number, height: number, leaf: ILeaf, paint: any, imageScaleX: number, imageScaleY: number): void;
|
|
190
191
|
destroy(): void;
|
|
191
192
|
}
|
|
@@ -1366,9 +1367,10 @@ interface IPaintImageModule {
|
|
|
1366
1367
|
fillOrFitMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number): void;
|
|
1367
1368
|
clipMode(data: ILeafPaintPatternData, box: IBoundsData, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, clipScaleX?: number, clipScaleY?: number): void;
|
|
1368
1369
|
repeatMode(data: ILeafPaintPatternData, box: IBoundsData, width: number, height: number, x: number, y: number, scaleX: number, scaleY: number, rotation: number, skew: IPointData, align: IAlign, freeTransform?: boolean): void;
|
|
1369
|
-
brush?(paint: ILeafPaint): void;
|
|
1370
|
+
brush?(paint: ILeafPaint, ui: IUI): void;
|
|
1370
1371
|
addBrushScale?(scaleData: IScaleData$1, paint: ILeafPaint, ui: IUI): void;
|
|
1371
1372
|
getBrushScale?(paint: ILeafPaint, ui: IUI): number;
|
|
1373
|
+
cacheBrush?(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
|
|
1372
1374
|
recycleBrush?(paint: ILeafPaint, ui: IUI): void;
|
|
1373
1375
|
}
|
|
1374
1376
|
interface IPaintGradientModule {
|