@leafer-ui/display 1.0.5 → 1.0.7

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/display",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "@leafer-ui/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.5",
26
- "@leafer-ui/data": "1.0.5",
27
- "@leafer-ui/display-module": "1.0.5",
28
- "@leafer-ui/decorator": "1.0.5",
29
- "@leafer-ui/external": "1.0.5"
25
+ "@leafer/core": "1.0.7",
26
+ "@leafer-ui/data": "1.0.7",
27
+ "@leafer-ui/display-module": "1.0.7",
28
+ "@leafer-ui/decorator": "1.0.7",
29
+ "@leafer-ui/external": "1.0.7"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.0.5",
33
- "@leafer-ui/interface": "1.0.5"
32
+ "@leafer/interface": "1.0.7",
33
+ "@leafer-ui/interface": "1.0.7"
34
34
  }
35
35
  }
package/src/Box.ts CHANGED
@@ -45,9 +45,7 @@ export class Box extends Group implements IBox {
45
45
  @rewrite(rect.__updateRenderSpread)
46
46
  public __updateRectRenderSpread(): number { return 0 }
47
47
 
48
- public __updateRenderSpread(): number {
49
- return this.__updateRectRenderSpread() || -1
50
- }
48
+ public __updateRenderSpread(): number { return this.__updateRectRenderSpread() || -1 }
51
49
 
52
50
 
53
51
  @rewrite(rect.__updateBoxBounds)
@@ -78,13 +76,9 @@ export class Box extends Group implements IBox {
78
76
 
79
77
  this.__updateNaturalSize()
80
78
 
81
- } else {
82
- this.__updateRectBoxBounds()
83
- }
79
+ } else this.__updateRectBoxBounds()
84
80
 
85
- } else {
86
- this.__updateRectBoxBounds()
87
- }
81
+ } else this.__updateRectBoxBounds()
88
82
  }
89
83
 
90
84
  @rewrite(rect.__updateStrokeBounds)
@@ -99,13 +93,11 @@ export class Box extends Group implements IBox {
99
93
  copy(childrenRenderBounds, renderBounds)
100
94
  this.__updateRectRenderBounds()
101
95
 
102
- isOverflow = !includes(renderBounds, childrenRenderBounds) || !this.pathInputed || !this.__.cornerRadius // 路径与圆角直接当溢出处理
103
- } else {
104
- this.__updateRectRenderBounds()
105
- }
96
+ isOverflow = !includes(renderBounds, childrenRenderBounds)
97
+ if (isOverflow && this.__.overflow !== 'hide') add(renderBounds, childrenRenderBounds)
98
+ } else this.__updateRectRenderBounds()
106
99
 
107
- this.isOverflow !== isOverflow && (this.isOverflow = isOverflow)
108
- if (!(this.__.__drawAfterFill = this.__.overflow === 'hide') && isOverflow) add(renderBounds, childrenRenderBounds)
100
+ !this.isOverflow !== !isOverflow && (this.isOverflow = isOverflow) // 节省赋值
109
101
  }
110
102
 
111
103
  @rewrite(rect.__updateRenderBounds)
@@ -136,18 +128,11 @@ export class Box extends Group implements IBox {
136
128
  }
137
129
  }
138
130
 
139
- public __drawAfterFill(canvas: ILeaferCanvas, options: IRenderOptions): void {
140
- const { length } = this.children
141
- if (this.isOverflow) {
142
- canvas.save()
143
- canvas.clip()
144
- if (length) this.__renderGroup(canvas, options)
145
- canvas.restore()
146
- } else {
147
- if (length) this.__renderGroup(canvas, options)
148
- }
131
+ // in __drawAfterFill()
132
+ public __drawContent(canvas: ILeaferCanvas, options: IRenderOptions): void {
133
+ this.__renderGroup(canvas, options)
149
134
 
150
- if (this.__.stroke && length) {
135
+ if (this.__.__hasStroke) { // 还原绘制路径
151
136
  canvas.setWorld(this.__nowWorld)
152
137
  this.__drawRenderPath(canvas)
153
138
  }
package/src/Canvas.ts CHANGED
@@ -43,7 +43,6 @@ export class Canvas extends Rect implements ICanvas {
43
43
  super(data)
44
44
  this.canvas = Creator.canvas(this.__ as ILeaferCanvasConfig)
45
45
  this.context = this.canvas.context
46
- this.__.__isCanvas = this.__.__drawAfterFill = true
47
46
  if (data && data.url) this.drawImage(data.url)
48
47
  }
49
48
 
@@ -57,9 +56,7 @@ export class Canvas extends Rect implements ICanvas {
57
56
  }
58
57
 
59
58
  public draw(ui: IUI, offset?: IPointData, scale?: number | IPointData, rotation?: number): void {
60
- ui.__layout.update()
61
-
62
- const matrix = new Matrix(ui.__world).invert()
59
+ const matrix = new Matrix(ui.worldTransform).invert()
63
60
 
64
61
  const m = new Matrix()
65
62
  if (offset) m.translate(offset.x, offset.y)
@@ -75,16 +72,10 @@ export class Canvas extends Rect implements ICanvas {
75
72
  this.forceRender()
76
73
  }
77
74
 
78
- public __drawAfterFill(canvas: ILeaferCanvas, _options: IRenderOptions): void {
79
- const { width, height, cornerRadius } = this.__, { view } = this.canvas
80
- if (cornerRadius || this.pathInputed) {
81
- canvas.save()
82
- canvas.clip()
83
- canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height)
84
- canvas.restore()
85
- } else {
86
- canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height)
87
- }
75
+ // in __drawAfterFill()
76
+ public __drawContent(canvas: ILeaferCanvas, _options: IRenderOptions): void {
77
+ const { width, height } = this.__, { view } = this.canvas
78
+ canvas.drawImage(view, 0, 0, view.width, view.height, 0, 0, width, height)
88
79
  }
89
80
 
90
81
  public __updateSize(): void {
package/src/Group.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IJSONOptions, IPickOptions, IPickResult, IPointData } from '@leafer/interface'
2
- import { Branch, useModule, dataProcessor, registerUI, UICreator } from '@leafer/core'
2
+ import { Branch, useModule, dataProcessor, registerUI } from '@leafer/core'
3
3
 
4
4
  import { IGroup, IGroupData, IGroupInputData, IUI, IUIInputData, IUIJSONData, IFindCondition, IFindUIMethod } from '@leafer-ui/interface'
5
5
  import { GroupData } from '@leafer-ui/data'
@@ -39,27 +39,16 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
39
39
  public set(data: IUIInputData, isTemp?: boolean): void {
40
40
  if (data.children) {
41
41
  const { children } = data
42
- delete data.children
43
42
 
44
- if (!this.children) {
45
- this.__setBranch()
46
- } else {
47
- this.clear()
48
- }
43
+ delete data.children
44
+ this.children ? this.clear() : this.__setBranch()
49
45
 
50
46
  super.set(data, isTemp)
51
47
 
52
- let child: IUI
53
- children.forEach(childData => {
54
- child = (childData as IUI).__ ? childData as IUI : UICreator.get(childData.tag, childData) as IUI
55
- this.add(child)
56
- })
57
-
48
+ children.forEach(child => this.add(child))
58
49
  data.children = children
59
50
 
60
- } else {
61
- super.set(data, isTemp)
62
- }
51
+ } else super.set(data, isTemp)
63
52
  }
64
53
 
65
54
  public toJSON(options?: IJSONOptions): IUIJSONData {
@@ -76,21 +65,21 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
76
65
 
77
66
  // add
78
67
 
79
- public addAt(child: IUI | IUIInputData, index: number): void {
68
+ public addAt(child: IUI | IUI[] | IUIInputData | IUIInputData[], index: number): void {
80
69
  this.add(child, index)
81
70
  }
82
71
 
83
- public addAfter(child: IUI | IUIInputData, after: IUI): void {
72
+ public addAfter(child: IUI | IUI[] | IUIInputData | IUIInputData[], after: IUI): void {
84
73
  this.add(child, this.children.indexOf(after) + 1)
85
74
  }
86
75
 
87
- public addBefore(child: IUI | IUIInputData, before: IUI): void {
76
+ public addBefore(child: IUI | IUI[] | IUIInputData | IUIInputData[], before: IUI): void {
88
77
  this.add(child, this.children.indexOf(before))
89
78
  }
90
79
 
91
80
  // Branch rewrite
92
81
 
93
- public add(_child: IUI | IUIInputData, _index?: number): void { }
82
+ public add(_child: IUI | IUI[] | IUIInputData | IUIInputData[], _index?: number): void { }
94
83
 
95
84
  public addMany(..._children: IUI[] | IUIInputData[]): void { }
96
85
 
@@ -100,4 +89,4 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
100
89
 
101
90
  public clear(): void { }
102
91
 
103
- }
92
+ }
package/src/Line.ts CHANGED
@@ -28,7 +28,7 @@ export class Line extends UI implements ILine { // tip: rewrited Polygon
28
28
  declare public height?: INumber
29
29
 
30
30
  @pathType()
31
- public points?: number[]
31
+ public points?: number[] | IPointData[]
32
32
 
33
33
  @pathType(0)
34
34
  public curve?: boolean | number
@@ -79,17 +79,13 @@ export class Line extends UI implements ILine { // tip: rewrited Polygon
79
79
  if (!this.pathInputed && data.points && data.curve) {
80
80
  drawPoints(data.__pathForRender = [], data.points, data.curve, data.closed)
81
81
  if (data.__useArrow) PathArrow.addArrows(this, false)
82
- } else {
83
- super.__updateRenderPath()
84
- }
82
+ } else super.__updateRenderPath()
85
83
  }
86
84
 
87
85
  public __updateBoxBounds(): void {
88
86
  if (this.points) {
89
87
  toBounds(this.__.__pathForRender, this.__layout.boxBounds)
90
- } else {
91
- super.__updateBoxBounds()
92
- }
88
+ } else super.__updateBoxBounds()
93
89
  }
94
90
 
95
91
  }
package/src/Path.ts CHANGED
@@ -19,7 +19,6 @@ export class Path extends UI implements IPath {
19
19
 
20
20
  constructor(data?: IPathInputData) {
21
21
  super(data)
22
- this.__.__pathInputed = 2
23
22
  }
24
23
 
25
24
  }
package/src/Polygon.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { INumber } from '@leafer/interface'
1
+ import { INumber, IPointData } from '@leafer/interface'
2
2
  import { PathCommandDataHelper, dataProcessor, pathType, registerUI, rewrite, rewriteAble } from '@leafer/core'
3
3
 
4
4
  import { IPolygon, IPolygonData, IPolygonInputData } from '@leafer-ui/interface'
@@ -25,7 +25,7 @@ export class Polygon extends UI implements IPolygon {
25
25
  public sides?: INumber
26
26
 
27
27
  @pathType()
28
- public points?: number[]
28
+ public points?: number[] | IPointData[]
29
29
 
30
30
  @pathType(0)
31
31
  public curve?: boolean | number
package/src/Text.ts CHANGED
@@ -2,9 +2,9 @@ import { ILeaferCanvas, IPathDrawer, IPathCommandData, IBoolean, INumber, IStrin
2
2
  import { BoundsHelper, boundsType, surfaceType, dataProcessor, registerUI, affectStrokeBoundsType, dataType, hitType, MathHelper } from '@leafer/core'
3
3
 
4
4
  import { IFill, IText, IFontWeight, ITextCase, ITextDecoration, ITextData, ITextInputData, ITextAlign, IVerticalAlign, ITextDrawData, IOverflow, IStrokeAlign, IHitType, ITextWrap } from '@leafer-ui/interface'
5
- import { TextData, UnitConvert } from '@leafer-ui/data'
5
+ import { TextData } from '@leafer-ui/data'
6
6
 
7
- import { TextConvert } from '@leafer-ui/external'
7
+ import { TextConvert, UnitConvert } from '@leafer-ui/external'
8
8
 
9
9
  import { UI } from './UI'
10
10
 
@@ -86,8 +86,6 @@ export class Text extends UI implements IText {
86
86
  @boundsType('show')
87
87
  public textOverflow?: IOverflow | string
88
88
 
89
- public get editInner(): string { return 'TextEditor' }
90
-
91
89
  public get textDrawData(): ITextDrawData {
92
90
  this.__layout.update()
93
91
  return this.__.__textDrawData
@@ -139,7 +137,7 @@ export class Text extends UI implements IText {
139
137
  data.__lineHeight = UnitConvert.number(lineHeight, fontSize)
140
138
  data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize)
141
139
  data.__padding = padding ? MathHelper.fourNumber(padding) : undefined
142
- data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * 0.7) / 2
140
+ data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * 0.7) / 2 // 基线位置
143
141
  data.__font = `${italic ? 'italic ' : ''}${textCase === 'small-caps' ? 'small-caps ' : ''}${fontWeight !== 'normal' ? fontWeight + ' ' : ''}${fontSize}px ${fontFamily}`
144
142
  data.__clipText = textOverflow !== 'show' && !data.__autoSize
145
143
 
@@ -172,16 +170,14 @@ export class Text extends UI implements IText {
172
170
  super.__updateBoxBounds()
173
171
  }
174
172
 
175
- if (italic) b.width += fontSize * 0.16
173
+ if (italic) b.width += fontSize * 0.16 // 倾斜会导致文本的bounds增大
176
174
 
177
175
  const contentBounds = includes(b, bounds) ? b : bounds
178
176
  if (!isSame(contentBounds, layout.contentBounds)) {
179
177
  layout.contentBounds = contentBounds
180
178
  layout.renderChanged = true
181
179
  setList(data.__textBoxBounds = {} as IBoundsData, [b, bounds])
182
- } else {
183
- data.__textBoxBounds = contentBounds
184
- }
180
+ } else data.__textBoxBounds = contentBounds
185
181
 
186
182
  }
187
183
 
package/src/UI.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject, IScaleData, IUnitData } from '@leafer/interface'
1
+ import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject, IScaleData, IUnitData, IPathCommandObject } from '@leafer/interface'
2
2
  import { Leaf, PathDrawer, surfaceType, dataType, positionType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType, MathHelper, needPlugin } from '@leafer/core'
3
3
 
4
4
  import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowType, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, ITransition, IAnimateType } from '@leafer-ui/interface'
@@ -138,7 +138,7 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
138
138
 
139
139
  // path
140
140
  @pathInputType()
141
- public path?: IPathCommandData | IPathString
141
+ public path?: IPathCommandData | IPathCommandObject[] | IPathString
142
142
 
143
143
  @pathType()
144
144
  public windingRule?: IWindingRule
@@ -352,13 +352,13 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
352
352
  }
353
353
 
354
354
 
355
- // editor
355
+ // @leafer-in/editor rewrite
356
356
 
357
357
  public get editConfig(): IEditorConfig { return undefined }
358
358
 
359
- public get editOuter(): string { return this.__.__isLinePath ? 'LineEditTool' : 'EditTool' }
359
+ public get editOuter(): string { return '' }
360
360
 
361
- public get editInner(): string { return 'PathEditor' }
361
+ public get editInner(): string { return '' }
362
362
 
363
363
 
364
364
  constructor(data?: IUIInputData) {
@@ -377,9 +377,7 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
377
377
  this.lockNormalStyle = true
378
378
  Object.assign(this, data)
379
379
  this.lockNormalStyle = false
380
- } else {
381
- Object.assign(this, data)
382
- }
380
+ } else Object.assign(this, data)
383
381
  }
384
382
 
385
383
  public get(name?: string | string[] | IUIInputData): IUIInputData | IValue {
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
1
+ import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathCommandObject, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IUnitData, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IJSONOptions, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
2
2
  import { Leaf, LeafList } from '@leafer/core';
3
3
  import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IAnimation, ITransition, IStates, IStateName, IAnimate, IEditorConfig, IFindUIMethod, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, IUIJSONData, IFindCondition as IFindCondition$1, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, IBoxInputData, IFrame, IFrameData, IFrameInputData, IRect, IRectData, IRectInputData, IEllipse, IEllipseData, IEllipseInputData, IPolygon, IPolygonData, IPolygonInputData, IStar, IStarData, IStarInputData, ILine, ILineData, ILineInputData, IImage, IImageData, IImageInputData, ICanvas, ICanvasData, ICanvasInputData, IText, ITextData, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, ITextWrap, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData } from '@leafer-ui/interface';
4
4
 
@@ -39,7 +39,7 @@ declare class UI extends Leaf implements IUI {
39
39
  around?: IAlign | IUnitPointData;
40
40
  lazy?: IBoolean;
41
41
  pixelRatio?: INumber;
42
- path?: IPathCommandData | IPathString;
42
+ path?: IPathCommandData | IPathCommandObject[] | IPathString;
43
43
  windingRule?: IWindingRule;
44
44
  closed?: boolean;
45
45
  flow?: IFlowType;
@@ -153,10 +153,10 @@ declare class Group extends UI implements IGroup {
153
153
  set(data: IUIInputData, isTemp?: boolean): void;
154
154
  toJSON(options?: IJSONOptions): IUIJSONData;
155
155
  pick(_hitPoint: IPointData, _options?: IPickOptions): IPickResult;
156
- addAt(child: IUI | IUIInputData, index: number): void;
157
- addAfter(child: IUI | IUIInputData, after: IUI): void;
158
- addBefore(child: IUI | IUIInputData, before: IUI): void;
159
- add(_child: IUI | IUIInputData, _index?: number): void;
156
+ addAt(child: IUI | IUI[] | IUIInputData | IUIInputData[], index: number): void;
157
+ addAfter(child: IUI | IUI[] | IUIInputData | IUIInputData[], after: IUI): void;
158
+ addBefore(child: IUI | IUI[] | IUIInputData | IUIInputData[], before: IUI): void;
159
+ add(_child: IUI | IUI[] | IUIInputData | IUIInputData[], _index?: number): void;
160
160
  addMany(..._children: IUI[] | IUIInputData[]): void;
161
161
  remove(_child?: IUI | number | string | IFindCondition$1 | IFindUIMethod, _destroy?: boolean): void;
162
162
  removeAll(_destroy?: boolean): void;
@@ -276,7 +276,7 @@ declare class Box extends Group implements IBox {
276
276
  __renderRect(_canvas: ILeaferCanvas, _options: IRenderOptions): void;
277
277
  __renderGroup(_canvas: ILeaferCanvas, _options: IRenderOptions): void;
278
278
  __render(canvas: ILeaferCanvas, options: IRenderOptions): void;
279
- __drawAfterFill(canvas: ILeaferCanvas, options: IRenderOptions): void;
279
+ __drawContent(canvas: ILeaferCanvas, options: IRenderOptions): void;
280
280
  }
281
281
 
282
282
  declare class Frame extends Box implements IFrame {
@@ -308,7 +308,7 @@ declare class Polygon extends UI implements IPolygon {
308
308
  get __tag(): string;
309
309
  __: IPolygonData;
310
310
  sides?: INumber;
311
- points?: number[];
311
+ points?: number[] | IPointData[];
312
312
  curve?: boolean | number;
313
313
  constructor(data?: IPolygonInputData);
314
314
  __updatePath(): void;
@@ -330,7 +330,7 @@ declare class Line extends UI implements ILine {
330
330
  __: ILineData;
331
331
  strokeAlign?: IStrokeAlign;
332
332
  height?: INumber;
333
- points?: number[];
333
+ points?: number[] | IPointData[];
334
334
  curve?: boolean | number;
335
335
  closed?: boolean;
336
336
  get toPoint(): IPointData;
@@ -368,7 +368,7 @@ declare class Canvas extends Rect implements ICanvas {
368
368
  drawImage(url: string): void;
369
369
  draw(ui: IUI, offset?: IPointData, scale?: number | IPointData, rotation?: number): void;
370
370
  paint(): void;
371
- __drawAfterFill(canvas: ILeaferCanvas, _options: IRenderOptions): void;
371
+ __drawContent(canvas: ILeaferCanvas, _options: IRenderOptions): void;
372
372
  __updateSize(): void;
373
373
  destroy(): void;
374
374
  }
@@ -398,7 +398,6 @@ declare class Text extends UI implements IText {
398
398
  autoSizeAlign?: IBoolean;
399
399
  textWrap?: ITextWrap;
400
400
  textOverflow?: IOverflow | string;
401
- get editInner(): string;
402
401
  get textDrawData(): ITextDrawData;
403
402
  constructor(data?: ITextInputData);
404
403
  __drawHitPath(canvas: ILeaferCanvas): void;