@leafer-ui/interface 1.9.12 → 1.10.1

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-ui/interface",
3
- "version": "1.9.12",
3
+ "version": "1.10.1",
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": "1.9.12"
25
+ "@leafer/interface": "1.10.1"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -15,6 +15,7 @@ import { ILeafer } from './app/ILeafer'
15
15
  import { IEditorConfig } from './editor/IEditor'
16
16
  import { IColorString } from './type/IStringType'
17
17
  import { IScroller, IScrollConfig } from './IScroller'
18
+ import { ILeafPaint } from './type/IComputedType'
18
19
 
19
20
  // Line
20
21
  export interface ILine extends ILineAttrData, IUI {
@@ -227,6 +228,7 @@ export interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIDat
227
228
  __letterSpacing?: number
228
229
  __padding?: number[]
229
230
  __clipText?: boolean
231
+ __isCharMode?: boolean
230
232
  __isPlacehold?: boolean
231
233
  __textBoxBounds?: IBoundsData
232
234
  }
@@ -426,7 +428,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
426
428
  __drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void
427
429
  __drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void
428
430
 
429
- drawImagePlaceholder(canvas: ILeaferCanvas, image: ILeaferImage): void
431
+ drawImagePlaceholder(image: ILeafPaint, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
430
432
 
431
433
  animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate
432
434
  killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void
@@ -54,6 +54,8 @@ export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
54
54
 
55
55
  update(): void
56
56
  updateEditBox(): void
57
+
58
+ getEditTool(name: string): IObject
57
59
  updateEditTool(): void
58
60
  unloadEditTool(): void
59
61
 
@@ -64,6 +66,7 @@ export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
64
66
  openGroup(group: IGroup): void
65
67
  closeGroup(group: IGroup): void
66
68
 
69
+ getInnerEditor(name: string): IObject
67
70
  openInnerEditor(target?: IUI, nameOrSelect?: string | boolean, select?: boolean): void
68
71
  closeInnerEditor(onlyInnerEditor?: boolean): void
69
72
 
@@ -105,7 +108,7 @@ export interface IEditorConfig extends IObject {
105
108
 
106
109
  point?: IEditPointInputData | IEditPointInputData[]
107
110
  middlePoint?: IEditPointInputData | IEditPointInputData[]
108
- resizeLine?: IEditPointInputData
111
+ resizeLine?: IEditPointInputData | IEditPointInputData[]
109
112
 
110
113
  rect?: IBoxInputData
111
114
  rectThrough?: boolean // 是否穿透rect(穿透后,可以拾取到rect下面的元素,默认单选元素时穿透)
@@ -1,6 +1,6 @@
1
- import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage, IAlign, IPointData, IMatrixData } from '@leafer/interface'
1
+ import { ILeaferCanvas, IRenderOptions, IBooleanMap, IBoundsData, ILeaferImage, IAlign, IPointData, IMatrixData, IScaleData, IFunction, ITaskItem } from '@leafer/interface'
2
2
 
3
- import { ILeafPaint, ILeafPaintPatternData } from '../type/IComputedType'
3
+ import { ILeafPaint, ILeafStrokePaint, ILeafPaintPatternData } from '../type/IComputedType'
4
4
  import { IUI, IUIData } from '../IUI'
5
5
  import { ICachedShape } from '../ICachedShape'
6
6
  import { IGradientPaint, IImagePaint, IPaintAttr } from '../type/IType'
@@ -9,18 +9,19 @@ import { IGradientPaint, IImagePaint, IPaintAttr } from '../type/IType'
9
9
  export interface IPaintModule {
10
10
  compute(attrName: IPaintAttr, ui: IUI): void
11
11
 
12
- fill(fill: string, ui: IUI, canvas: ILeaferCanvas,): void
13
- fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
12
+ fill(fill: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
13
+ fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
14
14
 
15
- fillPathOrText(ui: IUI, canvas: ILeaferCanvas): void
16
- fillText(ui: IUI, canvas: ILeaferCanvas): void
15
+ fillPathOrText(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
16
+ fillText(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
17
17
 
18
- stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void
19
- strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
18
+ stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
19
+ strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
20
20
 
21
- strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
22
- strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void
23
- drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void
21
+ strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
22
+ strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
23
+ drawStrokesStyle(strokes: ILeafStrokePaint[], strokeWidthScale: number, isText: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
24
+ drawTextStroke(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
24
25
 
25
26
  shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape
26
27
  }
@@ -28,10 +29,16 @@ export interface IPaintModule {
28
29
 
29
30
  export interface IPaintImageModule {
30
31
  image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint
31
- checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean // 返回true表示已进行了原生绘制
32
- createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean
32
+
33
+ checkImage(paint: ILeafPaint, allowDraw: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): boolean // 返回true表示已进行了原生绘制
34
+ drawImage(paint: ILeafPaint, imageScaleX: number, imageScaleY: number, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
35
+ getImageRenderScaleData(paint: ILeafPaint, ui: IUI, canvas?: ILeaferCanvas, renderOptions?: IRenderOptions): IScaleData // 当前图片渲染的比例数据,必须马上分解使用
33
36
  recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap
34
37
 
38
+ createPatternTask(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void
39
+ createPattern(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions, resolve?: IFunction, task?: ITaskItem): void
40
+ getPatternFixScale(paint: ILeafPaint, imageScaleX: number, imageScaleY: number): number
41
+
35
42
  createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void
36
43
  getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData
37
44
 
@@ -1,7 +1,7 @@
1
1
  import { IBlendMode, IDirection, ILeaferImage, IMatrixData, IPointData, IScaleFixed, ITaskItem } from '@leafer/interface'
2
2
 
3
3
  import { IColorString } from './IStringType'
4
- import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters } from './IType'
4
+ import { IStrokeAlign, IStrokeJoin, IStrokeCap, IImagePaintMode, IImageFilters, IPaint } from './IType'
5
5
  import { IPaintType } from './IType'
6
6
  import { IStrokeComputedStyle } from '../ICommonAttr'
7
7
 
@@ -12,22 +12,17 @@ export interface ILeafPaint {
12
12
  style?: ILeafPaintColor
13
13
  strokeStyle?: IStrokeComputedStyle // 子描边样式选项
14
14
  transform?: IMatrixData // 存在时表示pattern自身不能应用transform
15
- blendMode?: IBlendMode
16
15
  image?: ILeaferImage
16
+ level?: number
17
17
  loadId?: number
18
18
  patternId?: string
19
19
  patternTask?: ITaskItem
20
- changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
21
- sync?: boolean // 同步显示图片,不走任务列表生成图案
22
20
  isTransparent?: boolean // 是否为透明色
23
21
  data?: ILeafPaintPatternData
24
- editing?: boolean // 标记编辑中
25
- scaleFixed?: IScaleFixed // 平铺图片不跟随画布缩放
22
+ originPaint?: IPaint // 原始paint对象
26
23
  }
27
24
 
28
25
  export interface ILeafPaintPatternData {
29
- width?: number
30
- height?: number
31
26
  scaleX?: number
32
27
  scaleY?: number
33
28
  gap?: IPointData
package/src/type/IType.ts CHANGED
@@ -20,6 +20,7 @@ export interface IPaintBase {
20
20
 
21
21
  style?: IStrokeStyle
22
22
  editing?: boolean // 标记编辑中
23
+ scaleFixed?: IScaleFixed // 不跟随画布缩放
23
24
  }
24
25
 
25
26
  export type IPaintType =
@@ -94,11 +95,10 @@ export interface IImagePaint extends IPaintBase {
94
95
 
95
96
  repeat?: IRepeat
96
97
  gap?: IGap | IPointGap
97
- scaleFixed?: IScaleFixed // 平铺图片不跟随画布缩放
98
98
 
99
99
  changeful?: boolean // 会频繁变化,不生成图案(有特殊性能优化,一般用于游戏精灵、动图场景)
100
100
  sync?: boolean // 同步显示,不走任务列表生成图案
101
- showProgress?: boolean // 是否显示进度
101
+ showProgress?: boolean | IColorString // 是否显示进度
102
102
  }
103
103
 
104
104
  export interface IStrokeImagePaint extends IImagePaint { }
@@ -146,7 +146,15 @@ export interface IPathDataArrowOffset {
146
146
  }
147
147
 
148
148
  // 文本
149
- export type ITextAlign = 'left' | 'center' | 'right' | 'justify' | 'both'
149
+ export type ITextAlign =
150
+ | 'left'
151
+ | 'center'
152
+ | 'right'
153
+ | 'justify' // 两端对齐,最后一行不处理,适合段落文本,英文会均分单词
154
+ | 'justify-letter' // 字符级对齐
155
+ | 'both' // 所有行两端对齐,适合单行文本,英文会均分单词
156
+ | 'both-letter' // 字符级对齐
157
+
150
158
  export type IVerticalAlign = 'top' | 'middle' | 'bottom'
151
159
  export type ITextCase = | 'upper' | 'lower' | 'title' | 'none' | 'small-caps'
152
160
  export type IFontWeight = IFontWeightNumer | IFontWeightString
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IBlendMode, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IScaleFixed, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, IBounds, ILeafInputData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData, IValue, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, IRenderOptions, IExportOptions, IExportResult, IPickOptions, IPickResult, ICanvasContext2DSettings, ICanvasContext2D, ILeaferAttrData, IControl, ILeaferType, ILeaferConfig, ILeafRender, ILeafBounds, ILeafHit, ICachedLeaf, IBooleanMap, IMatrixWithBoundsScaleData } from '@leafer/interface';
1
+ import { IBlendMode, IScaleFixed, IAlign, IUnitPointData, IExportFileType, IFourNumber, IPointData, IOptionSizeData, ISizeData, IGap, IPointGap, IPathCommandData, IAxis, IAxisReverse, IDirection, IWindingRule, IFilter, IMatrixData, ILeaferImage, ITaskItem, INumber, IString, IBoolean, IUnitData, IAnimateOptions, IAnimateEasing, IEventer, IObject, IEventParamsMap, IAnimateEasingFunction, IAnimateEnding, ITransition, IPercentData, IBounds, ILeafInputData, ILeaf as ILeaf$1, ILeafComputedData, ILeafData, IBoundsData, IValue, IPathCreator, IJSONOptions, IFindCondition, IAnswer, IPathString, IPathDrawer, ILeaferCanvas, 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, 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
 
@@ -25,6 +25,7 @@ interface IPaintBase {
25
25
  opacity?: number;
26
26
  style?: IStrokeStyle;
27
27
  editing?: boolean;
28
+ scaleFixed?: IScaleFixed;
28
29
  }
29
30
  type IPaintType = 'image' | 'solid' | IGradientType;
30
31
  type IGradientType = 'linear' | 'radial' | 'angular';
@@ -74,10 +75,9 @@ interface IImagePaint extends IPaintBase {
74
75
  clipSize?: ISizeData;
75
76
  repeat?: IRepeat;
76
77
  gap?: IGap | IPointGap;
77
- scaleFixed?: IScaleFixed;
78
78
  changeful?: boolean;
79
79
  sync?: boolean;
80
- showProgress?: boolean;
80
+ showProgress?: boolean | IColorString;
81
81
  }
82
82
  interface IStrokeImagePaint extends IImagePaint {
83
83
  }
@@ -115,7 +115,7 @@ interface IPathDataArrowOffset {
115
115
  bevelJoin?: number;
116
116
  roundJoin?: number;
117
117
  }
118
- type ITextAlign = 'left' | 'center' | 'right' | 'justify' | 'both';
118
+ type ITextAlign = 'left' | 'center' | 'right' | 'justify' | 'justify-letter' | 'both' | 'both-letter';
119
119
  type IVerticalAlign = 'top' | 'middle' | 'bottom';
120
120
  type ITextCase = 'upper' | 'lower' | 'title' | 'none' | 'small-caps';
121
121
  type IFontWeight = IFontWeightNumer | IFontWeightString;
@@ -168,21 +168,16 @@ interface ILeafPaint {
168
168
  style?: ILeafPaintColor;
169
169
  strokeStyle?: IStrokeComputedStyle;
170
170
  transform?: IMatrixData;
171
- blendMode?: IBlendMode;
172
171
  image?: ILeaferImage;
172
+ level?: number;
173
173
  loadId?: number;
174
174
  patternId?: string;
175
175
  patternTask?: ITaskItem;
176
- changeful?: boolean;
177
- sync?: boolean;
178
176
  isTransparent?: boolean;
179
177
  data?: ILeafPaintPatternData;
180
- editing?: boolean;
181
- scaleFixed?: IScaleFixed;
178
+ originPaint?: IPaint;
182
179
  }
183
180
  interface ILeafPaintPatternData {
184
- width?: number;
185
- height?: number;
186
181
  scaleX?: number;
187
182
  scaleY?: number;
188
183
  gap?: IPointData;
@@ -458,6 +453,7 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
458
453
  setBright(value: boolean): void;
459
454
  update(): void;
460
455
  updateEditBox(): void;
456
+ getEditTool(name: string): IObject$1;
461
457
  updateEditTool(): void;
462
458
  unloadEditTool(): void;
463
459
  getEditSize(ui: ILeaf): IEditSize;
@@ -465,6 +461,7 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
465
461
  ungroup(): IUI$1[];
466
462
  openGroup(group: IGroup$1): void;
467
463
  closeGroup(group: IGroup$1): void;
464
+ getInnerEditor(name: string): IObject$1;
468
465
  openInnerEditor(target?: IUI$1, nameOrSelect?: string | boolean, select?: boolean): void;
469
466
  closeInnerEditor(onlyInnerEditor?: boolean): void;
470
467
  lock(): void;
@@ -495,7 +492,7 @@ interface IEditorConfig extends IObject$1 {
495
492
  pointRadius?: number;
496
493
  point?: IEditPointInputData | IEditPointInputData[];
497
494
  middlePoint?: IEditPointInputData | IEditPointInputData[];
498
- resizeLine?: IEditPointInputData;
495
+ resizeLine?: IEditPointInputData | IEditPointInputData[];
499
496
  rect?: IBoxInputData$1;
500
497
  rectThrough?: boolean;
501
498
  area?: IRectInputData$1;
@@ -864,6 +861,7 @@ interface ITextData extends ITextAttrData, ITextStyleComputedData, IUIData {
864
861
  __letterSpacing?: number;
865
862
  __padding?: number[];
866
863
  __clipText?: boolean;
864
+ __isCharMode?: boolean;
867
865
  __isPlacehold?: boolean;
868
866
  __textBoxBounds?: IBoundsData;
869
867
  }
@@ -1023,7 +1021,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
1023
1021
  __drawPathByBox(drawer: IPathDrawer): void;
1024
1022
  __drawAfterFill?(canvas: ILeaferCanvas, options: IRenderOptions): void;
1025
1023
  __drawContent?(canvas: ILeaferCanvas, options: IRenderOptions): void;
1026
- drawImagePlaceholder(canvas: ILeaferCanvas, image: ILeaferImage): void;
1024
+ drawImagePlaceholder(image: ILeafPaint, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1027
1025
  animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], options?: ITransition, type?: IAnimateType, isTemp?: boolean): IAnimate;
1028
1026
  killAnimate(type?: IAnimateType, nextStyle?: IUIInputData): void;
1029
1027
  export(filename: string, options?: IExportOptions | number | boolean): Promise<IExportResult>;
@@ -1225,22 +1223,27 @@ interface ICachedShape extends ICachedLeaf {
1225
1223
 
1226
1224
  interface IPaintModule {
1227
1225
  compute(attrName: IPaintAttr, ui: IUI): void;
1228
- fill(fill: string, ui: IUI, canvas: ILeaferCanvas): void;
1229
- fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
1230
- fillPathOrText(ui: IUI, canvas: ILeaferCanvas): void;
1231
- fillText(ui: IUI, canvas: ILeaferCanvas): void;
1232
- stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas): void;
1233
- strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
1234
- strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
1235
- strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas): void;
1236
- drawTextStroke(ui: IUI, canvas: ILeaferCanvas): void;
1226
+ fill(fill: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1227
+ fills(fills: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1228
+ fillPathOrText(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1229
+ fillText(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1230
+ stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1231
+ strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1232
+ strokeText(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1233
+ strokeArrow?(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1234
+ drawStrokesStyle(strokes: ILeafStrokePaint[], strokeWidthScale: number, isText: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1235
+ drawTextStroke(ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1237
1236
  shape(ui: IUI, current: ILeaferCanvas, renderOptions: IRenderOptions): ICachedShape;
1238
1237
  }
1239
1238
  interface IPaintImageModule {
1240
1239
  image(ui: IUI, attrName: string, paint: IImagePaint, boxBounds: IBoundsData, firstUse: boolean): ILeafPaint;
1241
- checkImage(ui: IUI, canvas: ILeaferCanvas, paint: ILeafPaint, allowPaint?: boolean): boolean;
1242
- createPattern(ui: IUI, paint: ILeafPaint, pixelRatio: number): boolean;
1240
+ checkImage(paint: ILeafPaint, allowDraw: boolean, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): boolean;
1241
+ drawImage(paint: ILeafPaint, imageScaleX: number, imageScaleY: number, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1242
+ getImageRenderScaleData(paint: ILeafPaint, ui: IUI, canvas?: ILeaferCanvas, renderOptions?: IRenderOptions): IScaleData$1;
1243
1243
  recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap;
1244
+ createPatternTask(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void;
1245
+ createPattern(paint: ILeafPaint, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions, resolve?: IFunction, task?: ITaskItem): void;
1246
+ getPatternFixScale(paint: ILeafPaint, imageScaleX: number, imageScaleY: number): number;
1244
1247
  createData(leafPaint: ILeafPaint, image: ILeaferImage, paint: IImagePaint, box: IBoundsData): void;
1245
1248
  getPatternData(paint: IImagePaint, box: IBoundsData, image: ILeaferImage): ILeafPaintPatternData;
1246
1249
  stretchMode(data: ILeafPaintPatternData, box: IBoundsData, scaleX: number, scaleY: number): void;