@visactor/vrender-core 0.21.0-alpha.12 → 0.21.0-alpha.13

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.
Files changed (240) hide show
  1. package/cjs/animate/Ticker/default-ticker.d.ts +2 -4
  2. package/cjs/animate/Ticker/default-ticker.js +5 -8
  3. package/cjs/animate/Ticker/default-ticker.js.map +1 -1
  4. package/cjs/animate/custom-animate.d.ts +0 -2
  5. package/cjs/animate/custom-animate.js +2 -11
  6. package/cjs/animate/custom-animate.js.map +1 -1
  7. package/cjs/color-string/interpolate.js +1 -1
  8. package/cjs/color-string/store.js +1 -1
  9. package/cjs/common/3d-interceptor.js +1 -2
  10. package/cjs/common/canvas-utils.js +1 -0
  11. package/cjs/common/render-command-list.js +1 -2
  12. package/cjs/common/simplify.js +2 -1
  13. package/cjs/common/text.js +1 -1
  14. package/cjs/common/utils.d.ts +0 -1
  15. package/cjs/common/utils.js +3 -10
  16. package/cjs/common/utils.js.map +1 -1
  17. package/cjs/core/contributions/textMeasure/AtextMeasure.d.ts +4 -56
  18. package/cjs/core/contributions/textMeasure/AtextMeasure.js +14 -107
  19. package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  20. package/cjs/core/contributions/textMeasure/layout.d.ts +3 -8
  21. package/cjs/core/contributions/textMeasure/layout.js +44 -50
  22. package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
  23. package/cjs/core/global.d.ts +3 -0
  24. package/cjs/core/global.js +7 -1
  25. package/cjs/core/global.js.map +1 -1
  26. package/cjs/core/stage.d.ts +0 -2
  27. package/cjs/core/stage.js +5 -9
  28. package/cjs/core/stage.js.map +1 -1
  29. package/cjs/graphic/builtin-symbol/arrow.js +2 -2
  30. package/cjs/graphic/builtin-symbol/arrow.js.map +1 -1
  31. package/cjs/graphic/builtin-symbol/arrow2-down.js +2 -2
  32. package/cjs/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  33. package/cjs/graphic/builtin-symbol/arrow2-left.js +2 -2
  34. package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  35. package/cjs/graphic/builtin-symbol/arrow2-right.js +2 -2
  36. package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  37. package/cjs/graphic/builtin-symbol/arrow2-up.js +2 -2
  38. package/cjs/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  39. package/cjs/graphic/builtin-symbol/base.d.ts +0 -1
  40. package/cjs/graphic/builtin-symbol/base.js +0 -3
  41. package/cjs/graphic/builtin-symbol/base.js.map +1 -1
  42. package/cjs/graphic/builtin-symbol/circle.js +3 -3
  43. package/cjs/graphic/builtin-symbol/circle.js.map +1 -1
  44. package/cjs/graphic/builtin-symbol/close.js +3 -3
  45. package/cjs/graphic/builtin-symbol/close.js.map +1 -1
  46. package/cjs/graphic/builtin-symbol/cross.js +2 -2
  47. package/cjs/graphic/builtin-symbol/cross.js.map +1 -1
  48. package/cjs/graphic/builtin-symbol/diamond.js +3 -3
  49. package/cjs/graphic/builtin-symbol/diamond.js.map +1 -1
  50. package/cjs/graphic/builtin-symbol/line-h.js +3 -3
  51. package/cjs/graphic/builtin-symbol/line-h.js.map +1 -1
  52. package/cjs/graphic/builtin-symbol/line-v.js +3 -3
  53. package/cjs/graphic/builtin-symbol/line-v.js.map +1 -1
  54. package/cjs/graphic/builtin-symbol/square.js +2 -2
  55. package/cjs/graphic/builtin-symbol/square.js.map +1 -1
  56. package/cjs/graphic/builtin-symbol/star.js +2 -2
  57. package/cjs/graphic/builtin-symbol/star.js.map +1 -1
  58. package/cjs/graphic/builtin-symbol/stroke.js +2 -2
  59. package/cjs/graphic/builtin-symbol/stroke.js.map +1 -1
  60. package/cjs/graphic/builtin-symbol/thin-triangle.js +2 -2
  61. package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  62. package/cjs/graphic/builtin-symbol/triangle-down.js +2 -2
  63. package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
  64. package/cjs/graphic/builtin-symbol/triangle-left.js +2 -2
  65. package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
  66. package/cjs/graphic/builtin-symbol/triangle-right.js +2 -2
  67. package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
  68. package/cjs/graphic/builtin-symbol/triangle-up.js +2 -2
  69. package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
  70. package/cjs/graphic/builtin-symbol/utils.d.ts +0 -1
  71. package/cjs/graphic/builtin-symbol/utils.js +3 -6
  72. package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
  73. package/cjs/graphic/builtin-symbol/wedge.js +2 -2
  74. package/cjs/graphic/builtin-symbol/wedge.js.map +1 -1
  75. package/cjs/graphic/builtin-symbol/wye.js +2 -2
  76. package/cjs/graphic/builtin-symbol/wye.js.map +1 -1
  77. package/cjs/graphic/config.d.ts +1 -1
  78. package/cjs/graphic/config.js +3 -7
  79. package/cjs/graphic/config.js.map +1 -1
  80. package/cjs/graphic/richtext/paragraph.js +1 -3
  81. package/cjs/graphic/richtext/paragraph.js.map +1 -1
  82. package/cjs/graphic/text.d.ts +11 -11
  83. package/cjs/graphic/text.js +170 -104
  84. package/cjs/graphic/text.js.map +1 -1
  85. package/cjs/graphic/wrap-text.js +4 -16
  86. package/cjs/graphic/wrap-text.js.map +1 -1
  87. package/cjs/interface/animate.d.ts +1 -3
  88. package/cjs/interface/animate.js.map +1 -1
  89. package/cjs/interface/context.d.ts +0 -1
  90. package/cjs/interface/context.js.map +1 -1
  91. package/cjs/interface/global.d.ts +1 -0
  92. package/cjs/interface/global.js.map +1 -1
  93. package/cjs/interface/graphic/text.d.ts +3 -11
  94. package/cjs/interface/graphic/text.js +1 -6
  95. package/cjs/interface/graphic/text.js.map +1 -1
  96. package/cjs/interface/graphic.d.ts +0 -1
  97. package/cjs/interface/graphic.js.map +1 -1
  98. package/cjs/interface/stage.d.ts +0 -1
  99. package/cjs/interface/stage.js.map +1 -1
  100. package/cjs/interface/text.d.ts +1 -9
  101. package/cjs/interface/text.js.map +1 -1
  102. package/cjs/render/contributions/render/contributions/arc-contribution-render.js +2 -2
  103. package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  104. package/cjs/render/contributions/render/contributions/circle-contribution-render.js +2 -2
  105. package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  106. package/cjs/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
  107. package/cjs/render/contributions/render/contributions/image-contribution-render.js +3 -2
  108. package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  109. package/cjs/render/contributions/render/contributions/rect-contribution-render.js +2 -2
  110. package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  111. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +2 -2
  112. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  113. package/cjs/render/contributions/render/image-render.js +6 -4
  114. package/cjs/render/contributions/render/image-render.js.map +1 -1
  115. package/cjs/render/contributions/render/text-render.d.ts +1 -1
  116. package/cjs/render/contributions/render/text-render.js +46 -24
  117. package/cjs/render/contributions/render/text-render.js.map +1 -1
  118. package/cjs/resource-loader/loader.js +1 -1
  119. package/cjs/resource-loader/loader.js.map +1 -1
  120. package/dist/index.es.js +549 -568
  121. package/es/animate/Ticker/default-ticker.d.ts +2 -4
  122. package/es/animate/Ticker/default-ticker.js +6 -9
  123. package/es/animate/Ticker/default-ticker.js.map +1 -1
  124. package/es/animate/custom-animate.d.ts +0 -2
  125. package/es/animate/custom-animate.js +2 -11
  126. package/es/animate/custom-animate.js.map +1 -1
  127. package/es/color-string/interpolate.js +1 -1
  128. package/es/color-string/store.js +1 -1
  129. package/es/common/3d-interceptor.js +1 -2
  130. package/es/common/canvas-utils.js +2 -1
  131. package/es/common/render-command-list.js +1 -2
  132. package/es/common/simplify.js +2 -1
  133. package/es/common/text.js +1 -1
  134. package/es/common/utils.d.ts +0 -1
  135. package/es/common/utils.js +2 -7
  136. package/es/common/utils.js.map +1 -1
  137. package/es/core/contributions/textMeasure/AtextMeasure.d.ts +4 -56
  138. package/es/core/contributions/textMeasure/AtextMeasure.js +13 -108
  139. package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  140. package/es/core/contributions/textMeasure/layout.d.ts +3 -8
  141. package/es/core/contributions/textMeasure/layout.js +44 -50
  142. package/es/core/contributions/textMeasure/layout.js.map +1 -1
  143. package/es/core/global.d.ts +3 -0
  144. package/es/core/global.js +8 -1
  145. package/es/core/global.js.map +1 -1
  146. package/es/core/stage.d.ts +0 -2
  147. package/es/core/stage.js +5 -9
  148. package/es/core/stage.js.map +1 -1
  149. package/es/graphic/builtin-symbol/arrow.js +2 -2
  150. package/es/graphic/builtin-symbol/arrow.js.map +1 -1
  151. package/es/graphic/builtin-symbol/arrow2-down.js +2 -2
  152. package/es/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  153. package/es/graphic/builtin-symbol/arrow2-left.js +2 -2
  154. package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  155. package/es/graphic/builtin-symbol/arrow2-right.js +2 -2
  156. package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  157. package/es/graphic/builtin-symbol/arrow2-up.js +2 -2
  158. package/es/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  159. package/es/graphic/builtin-symbol/base.d.ts +0 -1
  160. package/es/graphic/builtin-symbol/base.js +0 -3
  161. package/es/graphic/builtin-symbol/base.js.map +1 -1
  162. package/es/graphic/builtin-symbol/circle.js +3 -3
  163. package/es/graphic/builtin-symbol/circle.js.map +1 -1
  164. package/es/graphic/builtin-symbol/close.js +3 -3
  165. package/es/graphic/builtin-symbol/close.js.map +1 -1
  166. package/es/graphic/builtin-symbol/cross.js +2 -2
  167. package/es/graphic/builtin-symbol/cross.js.map +1 -1
  168. package/es/graphic/builtin-symbol/diamond.js +3 -3
  169. package/es/graphic/builtin-symbol/diamond.js.map +1 -1
  170. package/es/graphic/builtin-symbol/line-h.js +3 -3
  171. package/es/graphic/builtin-symbol/line-h.js.map +1 -1
  172. package/es/graphic/builtin-symbol/line-v.js +3 -3
  173. package/es/graphic/builtin-symbol/line-v.js.map +1 -1
  174. package/es/graphic/builtin-symbol/square.js +2 -2
  175. package/es/graphic/builtin-symbol/square.js.map +1 -1
  176. package/es/graphic/builtin-symbol/star.js +2 -2
  177. package/es/graphic/builtin-symbol/star.js.map +1 -1
  178. package/es/graphic/builtin-symbol/stroke.js +2 -2
  179. package/es/graphic/builtin-symbol/stroke.js.map +1 -1
  180. package/es/graphic/builtin-symbol/thin-triangle.js +2 -2
  181. package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  182. package/es/graphic/builtin-symbol/triangle-down.js +2 -2
  183. package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
  184. package/es/graphic/builtin-symbol/triangle-left.js +2 -2
  185. package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
  186. package/es/graphic/builtin-symbol/triangle-right.js +2 -2
  187. package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
  188. package/es/graphic/builtin-symbol/triangle-up.js +2 -2
  189. package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
  190. package/es/graphic/builtin-symbol/utils.d.ts +0 -1
  191. package/es/graphic/builtin-symbol/utils.js +4 -7
  192. package/es/graphic/builtin-symbol/utils.js.map +1 -1
  193. package/es/graphic/builtin-symbol/wedge.js +2 -2
  194. package/es/graphic/builtin-symbol/wedge.js.map +1 -1
  195. package/es/graphic/builtin-symbol/wye.js +2 -2
  196. package/es/graphic/builtin-symbol/wye.js.map +1 -1
  197. package/es/graphic/config.d.ts +1 -1
  198. package/es/graphic/config.js +2 -8
  199. package/es/graphic/config.js.map +1 -1
  200. package/es/graphic/richtext/paragraph.js +2 -4
  201. package/es/graphic/richtext/paragraph.js.map +1 -1
  202. package/es/graphic/text.d.ts +11 -11
  203. package/es/graphic/text.js +165 -103
  204. package/es/graphic/text.js.map +1 -1
  205. package/es/graphic/wrap-text.js +4 -16
  206. package/es/graphic/wrap-text.js.map +1 -1
  207. package/es/interface/animate.d.ts +1 -3
  208. package/es/interface/animate.js.map +1 -1
  209. package/es/interface/context.d.ts +0 -1
  210. package/es/interface/context.js.map +1 -1
  211. package/es/interface/global.d.ts +1 -0
  212. package/es/interface/global.js.map +1 -1
  213. package/es/interface/graphic/text.d.ts +3 -11
  214. package/es/interface/graphic/text.js +1 -6
  215. package/es/interface/graphic/text.js.map +1 -1
  216. package/es/interface/graphic.d.ts +0 -1
  217. package/es/interface/graphic.js.map +1 -1
  218. package/es/interface/stage.d.ts +0 -1
  219. package/es/interface/stage.js.map +1 -1
  220. package/es/interface/text.d.ts +1 -9
  221. package/es/interface/text.js.map +1 -1
  222. package/es/render/contributions/render/contributions/arc-contribution-render.js +2 -2
  223. package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  224. package/es/render/contributions/render/contributions/circle-contribution-render.js +2 -2
  225. package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  226. package/es/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
  227. package/es/render/contributions/render/contributions/image-contribution-render.js +3 -2
  228. package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  229. package/es/render/contributions/render/contributions/rect-contribution-render.js +2 -2
  230. package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  231. package/es/render/contributions/render/contributions/symbol-contribution-render.js +2 -2
  232. package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  233. package/es/render/contributions/render/image-render.js +6 -4
  234. package/es/render/contributions/render/image-render.js.map +1 -1
  235. package/es/render/contributions/render/text-render.d.ts +1 -1
  236. package/es/render/contributions/render/text-render.js +45 -23
  237. package/es/render/contributions/render/text-render.js.map +1 -1
  238. package/es/resource-loader/loader.js +1 -1
  239. package/es/resource-loader/loader.js.map +1 -1
  240. package/package.json +3 -4
package/dist/index.es.js CHANGED
@@ -846,6 +846,12 @@ let DefaultGlobal = class DefaultGlobal {
846
846
  get env() {
847
847
  return this._env;
848
848
  }
849
+ get isImageAnonymous() {
850
+ return this._isImageAnonymous;
851
+ }
852
+ set isImageAnonymous(isImageAnonymous) {
853
+ this._isImageAnonymous = isImageAnonymous;
854
+ }
849
855
  get devicePixelRatio() {
850
856
  if (!this._env) {
851
857
  this.setEnv(defaultEnv);
@@ -914,6 +920,7 @@ let DefaultGlobal = class DefaultGlobal {
914
920
  }
915
921
  constructor(contributions) {
916
922
  this.contributions = contributions;
923
+ this._isImageAnonymous = true;
917
924
  this.id = Generator.GenAutoIncrementId();
918
925
  this.hooks = {
919
926
  onSetEnv: new SyncHook(['lastEnv', 'env', 'global'])
@@ -1156,32 +1163,6 @@ DefaultGlobal = __decorate([
1156
1163
  __metadata("design:paramtypes", [Object])
1157
1164
  ], DefaultGlobal);
1158
1165
 
1159
- var params;
1160
- (function (params) {
1161
- params[params["W"] = 1] = "W";
1162
- params[params["H"] = 2] = "H";
1163
- params[params["WH"] = 3] = "WH";
1164
- })(params || (params = {}));
1165
-
1166
- var MeasureModeEnum;
1167
- (function (MeasureModeEnum) {
1168
- MeasureModeEnum[MeasureModeEnum["estimate"] = 0] = "estimate";
1169
- MeasureModeEnum[MeasureModeEnum["actualBounding"] = 1] = "actualBounding";
1170
- MeasureModeEnum[MeasureModeEnum["fontBounding"] = 2] = "fontBounding";
1171
- })(MeasureModeEnum || (MeasureModeEnum = {}));
1172
-
1173
- const strCommandMap = [
1174
- 'arc',
1175
- 'arcTo',
1176
- 'bezierCurveTo',
1177
- 'closePath',
1178
- 'ellipse',
1179
- 'lineTo',
1180
- 'moveTo',
1181
- 'quadraticCurveTo',
1182
- 'rect'
1183
- ];
1184
-
1185
1166
  const circleThreshold = tau - 1e-8;
1186
1167
  class BoundsContext {
1187
1168
  constructor(bounds) {
@@ -3042,7 +3023,6 @@ const DefaultStrokeStyle = Object.assign({ outerBorder: Object.assign(Object.ass
3042
3023
  const DefaultTextStyle = {
3043
3024
  text: '',
3044
3025
  maxLineWidth: Infinity,
3045
- maxWidth: Infinity,
3046
3026
  textAlign: 'left',
3047
3027
  textBaseline: 'alphabetic',
3048
3028
  fontSize: 16,
@@ -3067,9 +3047,7 @@ const DefaultTextStyle = {
3067
3047
  suffixPosition: 'end',
3068
3048
  underlineDash: [],
3069
3049
  underlineOffset: 0,
3070
- disableAutoClipedPoptip: undefined,
3071
- measureMode: MeasureModeEnum.fontBounding,
3072
- keepCenterInLine: false
3050
+ disableAutoClipedPoptip: undefined
3073
3051
  };
3074
3052
  const DefaultPickStyle = {
3075
3053
  pickStrokeBuffer: 0
@@ -3084,7 +3062,7 @@ const DefaultConnectAttribute = {
3084
3062
  const DefaultDebugAttribute = {
3085
3063
  _debug_bounds: false
3086
3064
  };
3087
- const DefaultAttribute = Object.assign(Object.assign(Object.assign({ strokeSeg: null, renderable: true, pickable: true, shadowGraphic: undefined, childrenPickable: true, fillPickable: true, strokePickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, fillStrokeOrder: 0, renderStyle: 'default', pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1, globalZIndex: 1, globalCompositeOperation: '', overflow: 'hidden', shadowPickMode: 'graphic', keepStrokeScale: false }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
3065
+ const DefaultAttribute = Object.assign(Object.assign(Object.assign({ strokeSeg: null, renderable: true, pickable: true, shadowGraphic: undefined, childrenPickable: true, fillPickable: true, strokePickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, fillStrokeOrder: 0, renderStyle: 'default', pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1, globalZIndex: 1, globalCompositeOperation: '', overflow: 'hidden', shadowPickMode: 'graphic' }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
3088
3066
  function addAttributeToPrototype(obj, c, keys) {
3089
3067
  keys.forEach(key => {
3090
3068
  c.prototype[key] = obj[key];
@@ -3278,33 +3256,13 @@ let ATextMeasure = class ATextMeasure {
3278
3256
  this.context = service.context;
3279
3257
  service.bindTextMeasure(this);
3280
3258
  }
3281
- _measureTextWithoutAlignBaseline(text, options, compatible) {
3259
+ measureTextWidth(text, options) {
3260
+ if (!this.context) {
3261
+ return this.estimate(text, options).width;
3262
+ }
3282
3263
  this.context.setTextStyleWithoutAlignBaseline(options);
3283
- const metrics = this.context.measureText(text);
3284
- return compatible ? this.compatibleMetrics(metrics, options) : metrics;
3285
- }
3286
- _measureTextWithAlignBaseline(text, options, compatible) {
3287
- this.context.setTextStyle(options);
3288
- const metrics = this.context.measureText(text);
3289
- return compatible ? this.compatibleMetrics(metrics, options) : metrics;
3290
- }
3291
- compatibleMetrics(metrics, options) {
3292
- if (metrics.actualBoundingBoxAscent == null ||
3293
- metrics.actualBoundingBoxDescent == null ||
3294
- metrics.fontBoundingBoxAscent == null ||
3295
- metrics.fontBoundingBoxDescent == null) {
3296
- const { ascent, descent } = this.measureTextBoundADscentEstimate(options);
3297
- metrics.actualBoundingBoxAscent = ascent;
3298
- metrics.actualBoundingBoxDescent = descent;
3299
- metrics.fontBoundingBoxAscent = ascent;
3300
- metrics.fontBoundingBoxDescent = descent;
3301
- }
3302
- if (metrics.actualBoundingBoxLeft == null || metrics.actualBoundingBoxRight == null) {
3303
- const { left, right } = this.measureTextBoundLeftRightEstimate(options);
3304
- metrics.actualBoundingBoxLeft = left;
3305
- metrics.actualBoundingBoxRight = right;
3306
- }
3307
- return metrics;
3264
+ const textMeasure = this.context.measureText(text);
3265
+ return textMeasure.width;
3308
3266
  }
3309
3267
  estimate(text, { fontSize = DefaultTextAttribute.fontSize }) {
3310
3268
  let eCharLen = 0;
@@ -3317,135 +3275,24 @@ let ATextMeasure = class ATextMeasure {
3317
3275
  height: fontSize
3318
3276
  };
3319
3277
  }
3320
- measureTextWidth(text, options, textMeasure) {
3321
- if (!this.context) {
3322
- return this.estimate(text, options).width;
3323
- }
3324
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options);
3325
- return textMeasure.width;
3326
- }
3327
- measureTextBoundsWidth(text, options, textMeasure) {
3328
- if (!this.context) {
3329
- return this.estimate(text, options).width;
3330
- }
3331
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options);
3332
- return textMeasure.width;
3333
- }
3334
- measureTextBoundsLeftRight(text, options, textMeasure) {
3335
- if (!this.context) {
3336
- return this.measureTextBoundLeftRightEstimate(options);
3337
- }
3338
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
3339
- return {
3340
- left: textMeasure.actualBoundingBoxLeft,
3341
- right: textMeasure.actualBoundingBoxRight
3342
- };
3343
- }
3344
- measureTextPixelHeight(text, options, textMeasure) {
3278
+ measureTextPixelHeight(text, options) {
3345
3279
  var _a;
3346
3280
  if (!this.context) {
3347
3281
  return (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
3348
3282
  }
3349
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options, true);
3283
+ this.context.setTextStyleWithoutAlignBaseline(options);
3284
+ const textMeasure = this.context.measureText(text);
3350
3285
  return Math.abs(textMeasure.actualBoundingBoxAscent - textMeasure.actualBoundingBoxDescent);
3351
3286
  }
3352
- measureTextPixelADscent(text, options, textMeasure) {
3353
- if (!this.context) {
3354
- return this.measureTextBoundADscentEstimate(options);
3355
- }
3356
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
3357
- return {
3358
- ascent: textMeasure.actualBoundingBoxAscent,
3359
- descent: textMeasure.actualBoundingBoxDescent
3360
- };
3361
- }
3362
- measureTextBoundHieght(text, options, textMeasure) {
3287
+ measureTextBoundHieght(text, options) {
3363
3288
  var _a;
3364
3289
  if (!this.context) {
3365
3290
  return (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
3366
3291
  }
3367
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options, true);
3292
+ this.context.setTextStyleWithoutAlignBaseline(options);
3293
+ const textMeasure = this.context.measureText(text);
3368
3294
  return Math.abs(textMeasure.fontBoundingBoxAscent - textMeasure.fontBoundingBoxDescent);
3369
3295
  }
3370
- measureTextBoundADscent(text, options, textMeasure) {
3371
- if (!this.context) {
3372
- return this.measureTextBoundADscentEstimate(options);
3373
- }
3374
- textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
3375
- return {
3376
- ascent: textMeasure.fontBoundingBoxAscent,
3377
- descent: textMeasure.fontBoundingBoxDescent
3378
- };
3379
- }
3380
- measureTextBoundADscentEstimate(options) {
3381
- var _a;
3382
- const fontSize = (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
3383
- return {
3384
- ascent: 0.79 * fontSize,
3385
- descent: 0.21 * fontSize
3386
- };
3387
- }
3388
- measureTextBoundLeftRightEstimate(options) {
3389
- var _a;
3390
- const fontSize = (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
3391
- const { textAlign } = options;
3392
- if (textAlign === 'center') {
3393
- return {
3394
- left: fontSize / 2,
3395
- right: fontSize / 2
3396
- };
3397
- }
3398
- else if (textAlign === 'right' || textAlign === 'end') {
3399
- return {
3400
- left: fontSize,
3401
- right: 0
3402
- };
3403
- }
3404
- return {
3405
- left: 0,
3406
- right: fontSize
3407
- };
3408
- }
3409
- measureTextPixelADscentAndWidth(text, options, mode) {
3410
- if (!this.context) {
3411
- return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), { width: this.estimate(text, options).width });
3412
- }
3413
- const out = this._measureTextWithoutAlignBaseline(text, options, true);
3414
- if (mode === MeasureModeEnum.actualBounding) {
3415
- return {
3416
- ascent: out.actualBoundingBoxAscent,
3417
- descent: out.actualBoundingBoxDescent,
3418
- width: out.width
3419
- };
3420
- }
3421
- else if (mode === MeasureModeEnum.estimate) {
3422
- return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), { width: out.width });
3423
- }
3424
- else if (mode === MeasureModeEnum.fontBounding) {
3425
- let ascent = out.fontBoundingBoxAscent;
3426
- let descent = out.fontBoundingBoxDescent;
3427
- if (out.actualBoundingBoxDescent && descent < out.actualBoundingBoxDescent) {
3428
- const delta = out.actualBoundingBoxDescent - descent;
3429
- descent += delta;
3430
- ascent -= delta;
3431
- }
3432
- else if (out.actualBoundingBoxAscent && ascent < out.actualBoundingBoxAscent) {
3433
- const delta = out.actualBoundingBoxAscent - ascent;
3434
- ascent += delta;
3435
- descent -= delta;
3436
- }
3437
- return {
3438
- ascent,
3439
- descent,
3440
- width: out.width
3441
- };
3442
- }
3443
- return {
3444
- ascent: out.actualBoundingBoxAscent,
3445
- descent: out.actualBoundingBoxDescent,
3446
- width: out.width
3447
- };
3448
- }
3449
3296
  measureText(text, options) {
3450
3297
  if (!this.context) {
3451
3298
  return this.estimate(text, options);
@@ -7001,7 +6848,7 @@ class TimeOutTickHandler {
7001
6848
  }
7002
6849
  }
7003
6850
 
7004
- class DefaultTicker extends EventEmitter {
6851
+ class DefaultTicker {
7005
6852
  set mode(m) {
7006
6853
  if (this._mode === m) {
7007
6854
  return;
@@ -7013,19 +6860,18 @@ class DefaultTicker extends EventEmitter {
7013
6860
  return this._mode;
7014
6861
  }
7015
6862
  constructor(timelines = []) {
7016
- super();
7017
6863
  this.handleTick = (handler, params) => {
7018
6864
  const { once = false } = params !== null && params !== void 0 ? params : {};
7019
6865
  if (this.ifCanStop()) {
7020
6866
  this.stop();
7021
6867
  return;
7022
6868
  }
7023
- this._handlerTick();
6869
+ this._handlerTick(handler);
7024
6870
  if (!once) {
7025
6871
  handler.tick(this.interval, this.handleTick);
7026
6872
  }
7027
6873
  };
7028
- this._handlerTick = () => {
6874
+ this._handlerTick = (handler) => {
7029
6875
  const tickerHandler = this.tickerHandler;
7030
6876
  const time = tickerHandler.getTime();
7031
6877
  let delta = 0;
@@ -7040,7 +6886,6 @@ class DefaultTicker extends EventEmitter {
7040
6886
  this.timelines.forEach(t => {
7041
6887
  t.tick(delta);
7042
6888
  });
7043
- this.emit('afterTick');
7044
6889
  };
7045
6890
  this.init();
7046
6891
  this.lastFrameTime = -1;
@@ -7180,11 +7025,6 @@ class DefaultTicker extends EventEmitter {
7180
7025
  this.setupTickHandler();
7181
7026
  this.lastFrameTime = -1;
7182
7027
  }
7183
- trySyncTickStatus() {
7184
- if (this.status === STATUS$1.RUNNING) {
7185
- this._handlerTick();
7186
- }
7187
- }
7188
7028
  }
7189
7029
 
7190
7030
  class ManualTickHandler {
@@ -8407,17 +8247,13 @@ class RafBasedSTO {
8407
8247
  }
8408
8248
  RafBasedSTO.TimeOut = 1000 / 60;
8409
8249
  const rafBasedSto = new RafBasedSTO();
8410
- const _calculateLineHeight = (lineHeight, fontSize) => {
8250
+ const calculateLineHeight = (lineHeight, fontSize) => {
8411
8251
  if (isString(lineHeight) && lineHeight[lineHeight.length - 1] === '%') {
8412
8252
  const scale = Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100;
8413
8253
  return fontSize * scale;
8414
8254
  }
8415
8255
  return lineHeight;
8416
8256
  };
8417
- const calculateLineHeight = (lineHeight, fontSize) => {
8418
- const _lh = _calculateLineHeight(lineHeight, fontSize);
8419
- return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
8420
- };
8421
8257
 
8422
8258
  class IncreaseCount extends ACustomAnimate {
8423
8259
  constructor(from, to, duration, easing, params) {
@@ -9009,11 +8845,6 @@ class TagPointsUpdate extends ACustomAnimate {
9009
8845
  this.clipRange =
9010
8846
  this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /
9011
8847
  this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension];
9012
- if (this.clipRange === 1) {
9013
- this.shrinkClipRange =
9014
- this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /
9015
- this.fromPoints[this.fromPoints.length - 1][this.clipRangeByDimension];
9016
- }
9017
8848
  if (!isValidNumber(this.clipRange)) {
9018
8849
  this.clipRange = 0;
9019
8850
  }
@@ -9053,12 +8884,6 @@ class TagPointsUpdate extends ACustomAnimate {
9053
8884
  return newPoint;
9054
8885
  });
9055
8886
  }
9056
- onFirstRun() {
9057
- const lastClipRange = this.target.attribute.clipRange;
9058
- if (isValidNumber(lastClipRange * this.clipRange)) {
9059
- this.clipRange *= lastClipRange;
9060
- }
9061
- }
9062
8887
  onUpdate(end, ratio, out) {
9063
8888
  this.points = this.points.map((point, index) => {
9064
8889
  const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
@@ -9066,17 +8891,6 @@ class TagPointsUpdate extends ACustomAnimate {
9066
8891
  return newPoint;
9067
8892
  });
9068
8893
  if (this.clipRange) {
9069
- if (this.shrinkClipRange) {
9070
- if (!end) {
9071
- out.points = this.fromPoints;
9072
- out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio;
9073
- }
9074
- else {
9075
- out.points = this.toPoints;
9076
- out.clipRange = 1;
9077
- }
9078
- return;
9079
- }
9080
8894
  out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
9081
8895
  }
9082
8896
  if (this.segmentsCache && this.to.segments) {
@@ -11003,10 +10817,10 @@ class ResourceLoader {
11003
10817
  static GetFile(url, type) {
11004
10818
  let data = ResourceLoader.cache.get(url);
11005
10819
  if (data) {
11006
- if (data.loadState === 'init' || data.loadState === 'fail') {
10820
+ if (data.loadState === 'fail') {
11007
10821
  return Promise.reject();
11008
10822
  }
11009
- else if (data.loadState === 'loading') {
10823
+ else if (data.loadState === 'init' || data.loadState === 'loading') {
11010
10824
  return data.dataPromise.then(data => data.data);
11011
10825
  }
11012
10826
  return Promise.resolve(data.data);
@@ -15602,14 +15416,14 @@ class DefaultArcRenderContribution {
15602
15416
  if (!(doOuterBorder || doInnerBorder)) {
15603
15417
  return;
15604
15418
  }
15605
- const { innerPadding = arcAttribute.innerPadding, outerPadding = arcAttribute.outerPadding, startAngle = arcAttribute.startAngle, endAngle = arcAttribute.endAngle, opacity = arcAttribute.opacity, x: originX = arcAttribute.x, y: originY = arcAttribute.y, scaleX = arcAttribute.scaleX, scaleY = arcAttribute.scaleY, keepStrokeScale = arcAttribute.keepStrokeScale } = arc.attribute;
15419
+ const { innerPadding = arcAttribute.innerPadding, outerPadding = arcAttribute.outerPadding, startAngle = arcAttribute.startAngle, endAngle = arcAttribute.endAngle, opacity = arcAttribute.opacity, x: originX = arcAttribute.x, y: originY = arcAttribute.y, scaleX = arcAttribute.scaleX, scaleY = arcAttribute.scaleY } = arc.attribute;
15606
15420
  let { innerRadius = arcAttribute.innerRadius, outerRadius = arcAttribute.outerRadius } = arc.attribute;
15607
15421
  outerRadius += outerPadding;
15608
15422
  innerRadius -= innerPadding;
15609
15423
  const renderBorder = (borderStyle, key) => {
15610
15424
  const doStroke = !!(borderStyle && borderStyle.stroke);
15611
15425
  const { distance = arcAttribute[key].distance } = borderStyle;
15612
- const d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr);
15426
+ const d = getScaledStroke(context, distance, context.dpr);
15613
15427
  const deltaAngle = distance / outerRadius;
15614
15428
  const sign = key === 'outerBorder' ? 1 : -1;
15615
15429
  arc.setAttributes({
@@ -15654,11 +15468,11 @@ class DefaultCircleRenderContribution {
15654
15468
  if (!(doOuterBorder || doInnerBorder)) {
15655
15469
  return;
15656
15470
  }
15657
- const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, opacity = circleAttribute.opacity, x: originX = circleAttribute.x, y: originY = circleAttribute.y, scaleX = circleAttribute.scaleX, scaleY = circleAttribute.scaleY, keepStrokeScale = circleAttribute.keepStrokeScale } = circle.attribute;
15471
+ const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, opacity = circleAttribute.opacity, x: originX = circleAttribute.x, y: originY = circleAttribute.y, scaleX = circleAttribute.scaleX, scaleY = circleAttribute.scaleY } = circle.attribute;
15658
15472
  const renderBorder = (borderStyle, key) => {
15659
15473
  const doStroke = !!(borderStyle && borderStyle.stroke);
15660
15474
  const { distance = circleAttribute[key].distance } = borderStyle;
15661
- const d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr);
15475
+ const d = getScaledStroke(context, distance, context.dpr);
15662
15476
  const sign = key === 'outerBorder' ? 1 : -1;
15663
15477
  context.beginPath();
15664
15478
  context.arc(x, y, radius + sign * d, startAngle, endAngle);
@@ -15843,7 +15657,7 @@ class DefaultRectRenderContribution {
15843
15657
  if (!(doOuterBorder || doInnerBorder)) {
15844
15658
  return;
15845
15659
  }
15846
- const { cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY, x1, y1, keepStrokeScale = rectAttribute.keepStrokeScale } = rect.attribute;
15660
+ const { cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY, x1, y1 } = rect.attribute;
15847
15661
  let { width, height } = rect.attribute;
15848
15662
  width = (width !== null && width !== void 0 ? width : x1 - x) || 0;
15849
15663
  height = (height !== null && height !== void 0 ? height : y1 - y) || 0;
@@ -15851,7 +15665,7 @@ class DefaultRectRenderContribution {
15851
15665
  const doStroke = !!(borderStyle && borderStyle.stroke);
15852
15666
  const sign = key === 'outerBorder' ? -1 : 1;
15853
15667
  const { distance = rectAttribute[key].distance } = borderStyle;
15854
- const d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr);
15668
+ const d = getScaledStroke(context, distance, context.dpr);
15855
15669
  const nextX = x + sign * d;
15856
15670
  const nextY = y + sign * d;
15857
15671
  const dw = d * 2;
@@ -16067,8 +15881,13 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
16067
15881
  this.useStyle = true;
16068
15882
  this.order = 0;
16069
15883
  }
16070
- drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
16071
- return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
15884
+ drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
15885
+ if (image.isGifImage && image.renderFrame && image.playing) {
15886
+ image.renderFrame(context, x, y);
15887
+ }
15888
+ else {
15889
+ return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
15890
+ }
16072
15891
  }
16073
15892
  }
16074
15893
  const defaultImageRenderContribution = new DefaultImageRenderContribution();
@@ -16091,11 +15910,11 @@ class DefaultSymbolRenderContribution {
16091
15910
  if (!(doOuterBorder || doInnerBorder)) {
16092
15911
  return;
16093
15912
  }
16094
- const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY, keepStrokeScale = symbolAttribute.keepStrokeScale } = symbol.attribute;
15913
+ const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY } = symbol.attribute;
16095
15914
  const renderBorder = (borderStyle, key) => {
16096
15915
  const doStroke = !!(borderStyle && borderStyle.stroke);
16097
15916
  const { distance = symbolAttribute[key].distance } = borderStyle;
16098
- const d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr);
15917
+ const d = getScaledStroke(context, distance, context.dpr);
16099
15918
  const sign = key === 'outerBorder' ? 1 : -1;
16100
15919
  context.beginPath();
16101
15920
  if (parsedPath.drawOffset(context, size, x, y, sign * d) === false) {
@@ -17984,7 +17803,13 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
17984
17803
  var _a, _b, _c;
17985
17804
  const textAttribute = getTheme(text, params === null || params === void 0 ? void 0 : params.theme).text;
17986
17805
  const { text: str, underline = textAttribute.underline, lineThrough = textAttribute.lineThrough, keepDirIn3d = textAttribute.keepDirIn3d, direction = textAttribute.direction, fontSize = textAttribute.fontSize, verticalMode = textAttribute.verticalMode, x: originX = textAttribute.x, y: originY = textAttribute.y } = text.attribute;
17987
- const lineHeight = (_a = calculateLineHeight(text.attribute.lineHeight, fontSize)) !== null && _a !== void 0 ? _a : fontSize;
17806
+ let { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline } = text.attribute;
17807
+ if (!verticalMode && direction === 'vertical') {
17808
+ const t = textAlign;
17809
+ textAlign = (_a = text.getBaselineMapAlign()[textBaseline]) !== null && _a !== void 0 ? _a : 'left';
17810
+ textBaseline = (_b = text.getAlignMapBaseline()[t]) !== null && _b !== void 0 ? _b : 'top';
17811
+ }
17812
+ const lineHeight = (_c = calculateLineHeight(text.attribute.lineHeight, fontSize)) !== null && _c !== void 0 ? _c : fontSize;
17988
17813
  const data = this.valid(text, textAttribute, fillCb, strokeCb);
17989
17814
  if (!data) {
17990
17815
  return;
@@ -18023,6 +17848,7 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
18023
17848
  else if (fVisible) {
18024
17849
  context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute);
18025
17850
  context.fillText(t, _x, _y, z);
17851
+ this.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context);
18026
17852
  }
18027
17853
  }
18028
17854
  if (direction) {
@@ -18030,88 +17856,132 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
18030
17856
  context.setTransformForCurrent();
18031
17857
  }
18032
17858
  };
18033
- context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
18034
- if (direction === 'horizontal') {
18035
- const { multilineLayout } = text;
18036
- if (!multilineLayout) {
18037
- context.highPerformanceRestore();
18038
- return;
18039
- }
18040
- const { xOffset, yOffset } = multilineLayout.bbox;
18041
- if (doStroke) {
18042
- if (strokeCb) {
18043
- strokeCb(context, text.attribute, textAttribute);
17859
+ if (text.isMultiLine) {
17860
+ context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
17861
+ if (direction === 'horizontal') {
17862
+ const { multilineLayout } = text;
17863
+ if (!multilineLayout) {
17864
+ context.highPerformanceRestore();
17865
+ return;
18044
17866
  }
18045
- else if (sVisible) {
18046
- context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute);
18047
- multilineLayout.lines.forEach(line => {
18048
- context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
18049
- });
17867
+ const { xOffset, yOffset } = multilineLayout.bbox;
17868
+ if (doStroke) {
17869
+ if (strokeCb) {
17870
+ strokeCb(context, text.attribute, textAttribute);
17871
+ }
17872
+ else if (sVisible) {
17873
+ context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute);
17874
+ multilineLayout.lines.forEach(line => {
17875
+ context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
17876
+ });
17877
+ }
17878
+ }
17879
+ if (doFill) {
17880
+ if (fillCb) {
17881
+ fillCb(context, text.attribute, textAttribute);
17882
+ }
17883
+ else if (fVisible) {
17884
+ context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute);
17885
+ multilineLayout.lines.forEach(line => {
17886
+ context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
17887
+ this.drawUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y - textDrawOffsetY('bottom', fontSize) - 0.05 * fontSize, z, textAttribute, context, {
17888
+ width: line.width
17889
+ });
17890
+ });
17891
+ }
18050
17892
  }
18051
17893
  }
18052
- if (doFill) {
18053
- if (fillCb) {
18054
- fillCb(context, text.attribute, textAttribute);
17894
+ else {
17895
+ text.tryUpdateAABBBounds();
17896
+ const cache = text.cache;
17897
+ const { verticalList } = cache;
17898
+ context.textAlign = 'left';
17899
+ context.textBaseline = 'top';
17900
+ const totalHeight = lineHeight * verticalList.length;
17901
+ let totalW = 0;
17902
+ verticalList.forEach(verticalData => {
17903
+ const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
17904
+ totalW = max(_w, totalW);
17905
+ });
17906
+ let offsetY = 0;
17907
+ let offsetX = 0;
17908
+ if (textBaseline === 'bottom') {
17909
+ offsetX = -totalHeight;
18055
17910
  }
18056
- else if (fVisible) {
18057
- context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute);
18058
- multilineLayout.lines.forEach(line => {
18059
- context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
18060
- this.drawUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, line.descent, (line.descent - line.ascent) / 2, z, textAttribute, context, {
18061
- width: line.width
18062
- });
18063
- });
17911
+ else if (textBaseline === 'middle') {
17912
+ offsetX = -totalHeight / 2;
17913
+ }
17914
+ if (textAlign === 'center') {
17915
+ offsetY -= totalW / 2;
18064
17916
  }
17917
+ else if (textAlign === 'right') {
17918
+ offsetY -= totalW;
17919
+ }
17920
+ verticalList.forEach((verticalData, i) => {
17921
+ const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0);
17922
+ const dw = totalW - currentW;
17923
+ let currentOffsetY = offsetY;
17924
+ if (textAlign === 'center') {
17925
+ currentOffsetY += dw / 2;
17926
+ }
17927
+ else if (textAlign === 'right') {
17928
+ currentOffsetY += dw;
17929
+ }
17930
+ verticalData.forEach(item => {
17931
+ const { text, width, direction } = item;
17932
+ drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction);
17933
+ currentOffsetY += width;
17934
+ });
17935
+ });
18065
17936
  }
18066
17937
  }
18067
17938
  else {
18068
- let { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline } = text.attribute;
18069
- if (!verticalMode) {
18070
- const t = textAlign;
18071
- textAlign = (_b = text.getBaselineMapAlign()[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
18072
- textBaseline = (_c = text.getAlignMapBaseline()[t]) !== null && _c !== void 0 ? _c : 'top';
18073
- }
18074
- text.tryUpdateAABBBounds();
18075
- const cache = text.cache;
18076
- const { verticalList } = cache;
18077
- context.textAlign = 'left';
18078
- context.textBaseline = 'top';
18079
- const totalHeight = lineHeight * verticalList.length;
18080
- let totalW = 0;
18081
- verticalList.forEach(verticalData => {
18082
- const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
18083
- totalW = max(_w, totalW);
18084
- });
18085
- let offsetY = 0;
18086
- let offsetX = 0;
18087
- if (textBaseline === 'bottom') {
18088
- offsetX = -totalHeight;
18089
- }
18090
- else if (textBaseline === 'middle') {
18091
- offsetX = -totalHeight / 2;
18092
- }
18093
- if (textAlign === 'center') {
18094
- offsetY -= totalW / 2;
18095
- }
18096
- else if (textAlign === 'right') {
18097
- offsetY -= totalW;
18098
- }
18099
- verticalList.forEach((verticalData, i) => {
18100
- const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0);
18101
- const dw = totalW - currentW;
18102
- let currentOffsetY = offsetY;
18103
- if (textAlign === 'center') {
18104
- currentOffsetY += dw / 2;
17939
+ if (direction === 'horizontal') {
17940
+ context.setTextStyle(text.attribute, textAttribute, z);
17941
+ const t = text.clipedText;
17942
+ let dy = 0;
17943
+ if (lineHeight !== fontSize) {
17944
+ if (textBaseline === 'top') {
17945
+ dy = (lineHeight - fontSize) / 2;
17946
+ }
17947
+ else if (textBaseline === 'middle') ;
17948
+ else if (textBaseline === 'bottom') {
17949
+ dy = -(lineHeight - fontSize) / 2;
17950
+ }
17951
+ else ;
18105
17952
  }
18106
- else if (textAlign === 'right') {
18107
- currentOffsetY += dw;
17953
+ drawText(t, 0, dy, 0);
17954
+ }
17955
+ else {
17956
+ text.tryUpdateAABBBounds();
17957
+ const cache = text.cache;
17958
+ if (cache) {
17959
+ context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
17960
+ const { verticalList } = cache;
17961
+ let offsetY = 0;
17962
+ const totalW = verticalList[0].reduce((a, b) => a + (b.width || 0), 0);
17963
+ let offsetX = 0;
17964
+ if (textBaseline === 'bottom') {
17965
+ offsetX = -lineHeight;
17966
+ }
17967
+ else if (textBaseline === 'middle') {
17968
+ offsetX = -lineHeight / 2;
17969
+ }
17970
+ if (textAlign === 'center') {
17971
+ offsetY -= totalW / 2;
17972
+ }
17973
+ else if (textAlign === 'right') {
17974
+ offsetY -= totalW;
17975
+ }
17976
+ context.textAlign = 'left';
17977
+ context.textBaseline = 'top';
17978
+ verticalList[0].forEach(item => {
17979
+ const { text, width, direction } = item;
17980
+ drawText(text, offsetX, offsetY, direction);
17981
+ offsetY += width;
17982
+ });
18108
17983
  }
18109
- verticalData.forEach(item => {
18110
- const { text, width, direction } = item;
18111
- drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction);
18112
- currentOffsetY += width;
18113
- });
18114
- });
17984
+ }
18115
17985
  }
18116
17986
  transform3dMatrixToContextMatrix && this.restoreTransformUseContext2d(text, textAttribute, z, context);
18117
17987
  this.afterRenderStep(text, context, x, y, doFill, doStroke, fVisible, sVisible, textAttribute, drawContext, fillCb, strokeCb);
@@ -18122,32 +17992,37 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
18122
17992
  const computed3dMatrix = !keepDirIn3d;
18123
17993
  this._draw(text, textAttribute, computed3dMatrix, drawContext, params);
18124
17994
  }
18125
- drawUnderLine(underline, lineThrough, text, anchorX, anchorY, offsetUnderLineY, offsetThroughLineY, z, textAttribute, context, multiOption) {
17995
+ drawUnderLine(underline, lineThrough, text, x, y, z, textAttribute, context, multiOption) {
18126
17996
  if (lineThrough + underline <= 0) {
18127
17997
  return;
18128
17998
  }
18129
- const { textAlign = textAttribute.textAlign, fill = textAttribute.fill, opacity = textAttribute.opacity, underlineOffset = textAttribute.underlineOffset, underlineDash = textAttribute.underlineDash, fillOpacity = textAttribute.fillOpacity } = text.attribute;
17999
+ const { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline, fontSize = textAttribute.fontSize, fill = textAttribute.fill, opacity = textAttribute.opacity, underlineOffset = textAttribute.underlineOffset, underlineDash = textAttribute.underlineDash, fillOpacity = textAttribute.fillOpacity } = text.attribute;
18130
18000
  const isMulti = !isNil(multiOption);
18131
18001
  const w = isMulti ? multiOption.width : text.clipedWidth;
18132
18002
  const offsetX = isMulti ? 0 : textDrawOffsetX(textAlign, w);
18003
+ const offsetY = textLayoutOffsetY(isMulti ? 'alphabetic' : textBaseline, fontSize, fontSize);
18133
18004
  const attribute = { lineWidth: 0, stroke: fill, opacity, strokeOpacity: fillOpacity };
18005
+ let deltaY = isMulti ? -3 : 0;
18134
18006
  if (underline) {
18135
18007
  attribute.lineWidth = underline;
18136
- context.setStrokeStyle(text, attribute, anchorX, anchorY, textAttribute);
18008
+ context.setStrokeStyle(text, attribute, x, y, textAttribute);
18137
18009
  underlineDash && context.setLineDash(underlineDash);
18138
18010
  context.beginPath();
18139
- const dy = anchorY + offsetUnderLineY + underlineOffset;
18140
- context.moveTo(anchorX + offsetX, dy, z);
18141
- context.lineTo(anchorX + offsetX + w, dy, z);
18011
+ const dy = y + offsetY + fontSize + underlineOffset + deltaY;
18012
+ context.moveTo(x + offsetX, dy, z);
18013
+ context.lineTo(x + offsetX + w, dy, z);
18142
18014
  context.stroke();
18143
18015
  }
18016
+ if (isMulti) {
18017
+ deltaY = -1;
18018
+ }
18144
18019
  if (lineThrough) {
18145
18020
  attribute.lineWidth = lineThrough;
18146
- context.setStrokeStyle(text, attribute, anchorX, anchorY, textAttribute);
18021
+ context.setStrokeStyle(text, attribute, x, y, textAttribute);
18147
18022
  context.beginPath();
18148
- const dy = anchorY + offsetThroughLineY;
18149
- context.moveTo(anchorX + offsetX, dy, z);
18150
- context.lineTo(anchorX + offsetX + w, dy, z);
18023
+ const dy = y + offsetY + fontSize / 2 + deltaY;
18024
+ context.moveTo(x + offsetX, dy, z);
18025
+ context.lineTo(x + offsetX + w, dy, z);
18151
18026
  context.stroke();
18152
18027
  }
18153
18028
  }
@@ -18587,16 +18462,18 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
18587
18462
  }
18588
18463
  draw(image, renderService, drawContext) {
18589
18464
  const { image: url } = image.attribute;
18590
- if (!url || !image.resources) {
18591
- return;
18592
- }
18593
- const res = image.resources.get(url);
18594
- if (res.state === 'loading' && isString(url)) {
18595
- ResourceLoader.improveImageLoading(url);
18596
- return;
18597
- }
18598
- else if (res.state !== 'success') {
18599
- return;
18465
+ if (!image.isGifImage) {
18466
+ if (!url || !image.resources) {
18467
+ return;
18468
+ }
18469
+ const res = image.resources.get(url);
18470
+ if (res.state === 'loading' && isString(url)) {
18471
+ ResourceLoader.improveImageLoading(url);
18472
+ return;
18473
+ }
18474
+ else if (res.state !== 'success') {
18475
+ return;
18476
+ }
18600
18477
  }
18601
18478
  const { context } = renderService.drawParams;
18602
18479
  if (!context) {
@@ -19149,7 +19026,7 @@ class CanvasTextLayout {
19149
19026
  this.textOptions = options;
19150
19027
  this.textMeasure = textMeasure;
19151
19028
  }
19152
- LayoutBBox(bbox, textAlign, textBaseline, linesLayout) {
19029
+ LayoutBBox(bbox, textAlign, textBaseline) {
19153
19030
  if (textAlign === 'left' || textAlign === 'start') {
19154
19031
  bbox.xOffset = 0;
19155
19032
  }
@@ -19160,7 +19037,7 @@ class CanvasTextLayout {
19160
19037
  bbox.xOffset = -bbox.width;
19161
19038
  }
19162
19039
  else {
19163
- bbox.xOffset = 0;
19040
+ throw new Error('非法的textAlign');
19164
19041
  }
19165
19042
  if (textBaseline === 'top') {
19166
19043
  bbox.yOffset = 0;
@@ -19169,52 +19046,73 @@ class CanvasTextLayout {
19169
19046
  bbox.yOffset = bbox.height / -2;
19170
19047
  }
19171
19048
  else if (textBaseline === 'alphabetic') {
19172
- let percent = 0.79;
19173
- if (linesLayout.length === 1) {
19174
- const lineInfo = linesLayout[0];
19175
- percent = lineInfo.ascent / (lineInfo.ascent + lineInfo.descent);
19176
- }
19177
- bbox.yOffset = bbox.height * -percent;
19049
+ bbox.yOffset = bbox.height * -0.79;
19178
19050
  }
19179
19051
  else {
19180
19052
  bbox.yOffset = -bbox.height;
19181
19053
  }
19182
19054
  return bbox;
19183
19055
  }
19184
- GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = '', wordBreak, params) {
19185
- const { lineWidth, suffixPosition = 'end', measureMode = MeasureModeEnum.actualBounding, keepCenterInLine = false } = params !== null && params !== void 0 ? params : {};
19056
+ GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, suffixPosition) {
19057
+ const linesLayout = [];
19058
+ const bboxWH = [width, height];
19059
+ const bboxOffset = [0, 0];
19060
+ while (str.length > 0) {
19061
+ const { str: clipText } = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak, suffixPosition);
19062
+ linesLayout.push({
19063
+ str: clipText,
19064
+ width: this.textMeasure.measureTextWidth(clipText, this.textOptions)
19065
+ });
19066
+ str = str.substring(clipText.length);
19067
+ }
19068
+ if (textAlign === 'left' || textAlign === 'start') ;
19069
+ else if (textAlign === 'center') {
19070
+ bboxOffset[0] = bboxWH[0] / -2;
19071
+ }
19072
+ else if (textAlign === 'right' || textAlign === 'end') {
19073
+ bboxOffset[0] = -bboxWH[0];
19074
+ }
19075
+ if (textBaseline === 'top') ;
19076
+ else if (textBaseline === 'middle') {
19077
+ bboxOffset[1] = bboxWH[1] / -2;
19078
+ }
19079
+ else if (textBaseline === 'bottom') {
19080
+ bboxOffset[1] = -bboxWH[1];
19081
+ }
19082
+ const bbox = {
19083
+ xOffset: bboxOffset[0],
19084
+ yOffset: bboxOffset[1],
19085
+ width: bboxWH[0],
19086
+ height: bboxWH[1]
19087
+ };
19088
+ return this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
19089
+ }
19090
+ GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = '', wordBreak, lineWidth, suffixPosition = 'end') {
19186
19091
  lines = lines.map(l => l.toString());
19187
19092
  const linesLayout = [];
19188
19093
  const bboxWH = [0, 0];
19189
19094
  if (typeof lineWidth === 'number' && lineWidth !== Infinity) {
19190
19095
  let width;
19191
19096
  for (let i = 0, len = lines.length; i < len; i++) {
19192
- const metrics = this.textMeasure.measureTextPixelADscentAndWidth(lines[i], this.textOptions, measureMode);
19193
- width = Math.min(metrics.width, lineWidth);
19097
+ width = Math.min(this.textMeasure.measureTextWidth(lines[i], this.textOptions), lineWidth);
19194
19098
  linesLayout.push({
19195
- str: metrics.width <= lineWidth
19196
- ? lines[i].toString()
19197
- : this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
19198
- width,
19199
- ascent: metrics.ascent,
19200
- descent: metrics.descent,
19201
- keepCenterInLine
19099
+ str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
19100
+ width
19202
19101
  });
19203
19102
  }
19204
19103
  bboxWH[0] = lineWidth;
19205
19104
  }
19206
19105
  else {
19207
- let _lineWidth = 0;
19106
+ lineWidth = 0;
19208
19107
  let width;
19209
19108
  let text;
19210
19109
  for (let i = 0, len = lines.length; i < len; i++) {
19211
19110
  text = lines[i];
19212
- const metrics = this.textMeasure.measureTextPixelADscentAndWidth(lines[i], this.textOptions, measureMode);
19213
- width = metrics.width;
19214
- _lineWidth = Math.max(_lineWidth, width);
19215
- linesLayout.push({ str: text, width, ascent: metrics.ascent, descent: metrics.descent, keepCenterInLine });
19111
+ width = this.textMeasure.measureTextWidth(text, this.textOptions);
19112
+ lineWidth = Math.max(lineWidth, width);
19113
+ linesLayout.push({ str: text, width });
19216
19114
  }
19217
- bboxWH[0] = _lineWidth;
19115
+ bboxWH[0] = lineWidth;
19218
19116
  }
19219
19117
  bboxWH[1] = linesLayout.length * lineHeight;
19220
19118
  bboxWH[0] = linesLayout.reduce((a, b) => Math.max(a, b.width), 0);
@@ -19224,7 +19122,7 @@ class CanvasTextLayout {
19224
19122
  width: bboxWH[0],
19225
19123
  height: bboxWH[1]
19226
19124
  };
19227
- this.LayoutBBox(bbox, textAlign, textBaseline, linesLayout);
19125
+ this.LayoutBBox(bbox, textAlign, textBaseline);
19228
19126
  return this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
19229
19127
  }
19230
19128
  layoutWithBBox(bbox, lines, textAlign, textBaseline, lineHeight) {
@@ -19261,25 +19159,7 @@ class CanvasTextLayout {
19261
19159
  else if (textAlign === 'right' || textAlign === 'end') {
19262
19160
  line.leftOffset = bbox.width - line.width;
19263
19161
  }
19264
- line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 + origin[1];
19265
- if (!line.keepCenterInLine) {
19266
- const actualHeight = line.ascent + line.descent;
19267
- const buf = 0;
19268
- const actualHeightWithBuf = actualHeight + buf;
19269
- if (actualHeightWithBuf < lineHeight - buf) {
19270
- if (textBaseline === 'bottom') {
19271
- line.topOffset += (lineHeight - actualHeightWithBuf) / 2;
19272
- }
19273
- else if (textBaseline === 'top') {
19274
- line.topOffset -= (lineHeight - actualHeightWithBuf) / 2;
19275
- }
19276
- }
19277
- if (textBaseline === 'alphabetic') {
19278
- const fontBoundingHeight = line.ascent + line.descent;
19279
- const ratio = lineHeight / fontBoundingHeight;
19280
- line.topOffset = lineHeight / 2 + ((line.ascent - line.descent) / 2) * ratio + origin[1];
19281
- }
19282
- }
19162
+ line.topOffset = (lineHeight - this.textOptions.fontSize) / 2 + this.textOptions.fontSize * 0.79 + origin[1];
19283
19163
  origin[1] += lineHeight;
19284
19164
  return line;
19285
19165
  }
@@ -19288,7 +19168,6 @@ class CanvasTextLayout {
19288
19168
  const TEXT_UPDATE_TAG_KEY = [
19289
19169
  'text',
19290
19170
  'maxLineWidth',
19291
- 'maxWidth',
19292
19171
  'textAlign',
19293
19172
  'textBaseline',
19294
19173
  'heightLimit',
@@ -19316,14 +19195,20 @@ class Text extends Graphic {
19316
19195
  var _a;
19317
19196
  const attribute = this.attribute;
19318
19197
  const textTheme = this.getGraphicTheme();
19319
- const maxWidth = this.getMaxWidth(textTheme);
19320
- if (!Number.isFinite(maxWidth)) {
19198
+ if (!this.isSimplify()) {
19199
+ return undefined;
19200
+ }
19201
+ const { maxLineWidth = textTheme.maxLineWidth } = attribute;
19202
+ if (!Number.isFinite(maxLineWidth)) {
19321
19203
  return ((_a = attribute.text) !== null && _a !== void 0 ? _a : textTheme.text).toString();
19322
19204
  }
19323
19205
  this.tryUpdateAABBBounds();
19324
19206
  return this.cache.clipedText;
19325
19207
  }
19326
19208
  get clipedWidth() {
19209
+ if (!this.isSimplify()) {
19210
+ return undefined;
19211
+ }
19327
19212
  this.tryUpdateAABBBounds();
19328
19213
  return this.cache.clipedWidth;
19329
19214
  }
@@ -19331,11 +19216,10 @@ class Text extends Graphic {
19331
19216
  var _a, _b;
19332
19217
  const textTheme = this.getGraphicTheme();
19333
19218
  const attribute = this.attribute;
19334
- const maxWidth = this.getMaxWidth(textTheme);
19335
- if (!Number.isFinite(maxWidth)) {
19219
+ const { maxLineWidth = textTheme.maxLineWidth, text, whiteSpace = textTheme.whiteSpace } = attribute;
19220
+ if (!Number.isFinite(maxLineWidth)) {
19336
19221
  return false;
19337
19222
  }
19338
- const { text } = this.attribute;
19339
19223
  this.tryUpdateAABBBounds();
19340
19224
  if ((_b = (_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData) === null || _b === void 0 ? void 0 : _b.lines) {
19341
19225
  let mergedText = '';
@@ -19354,9 +19238,15 @@ class Text extends Graphic {
19354
19238
  return this.clipedText !== attribute.text.toString();
19355
19239
  }
19356
19240
  get multilineLayout() {
19241
+ if (!this.isMultiLine) {
19242
+ return undefined;
19243
+ }
19357
19244
  this.tryUpdateAABBBounds();
19358
19245
  return this.cache.layoutData;
19359
19246
  }
19247
+ isSimplify() {
19248
+ return !this.isMultiLine && this.attribute.direction !== 'vertical';
19249
+ }
19360
19250
  get isMultiLine() {
19361
19251
  return Array.isArray(this.attribute.text) || this.attribute.whiteSpace === 'normal';
19362
19252
  }
@@ -19424,74 +19314,13 @@ class Text extends Graphic {
19424
19314
  transformBoundsWithMatrix(aabbBounds, aabbBounds, this.transMatrix);
19425
19315
  return aabbBounds;
19426
19316
  }
19427
- updateSingallineAABBBounds(text) {
19428
- this.updateMultilineAABBBounds([text]);
19429
- const layoutData = this.cache.layoutData;
19430
- if (layoutData && layoutData.lines && layoutData.lines.length) {
19431
- const line = layoutData.lines[0];
19432
- this.cache.clipedText = line.str;
19433
- this.cache.clipedWidth = line.width;
19434
- }
19435
- return this._AABBBounds;
19436
- }
19437
- updateMultilineAABBBounds(text) {
19438
- const textTheme = this.getGraphicTheme();
19439
- const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
19440
- const b = direction === 'horizontal'
19441
- ? this.updateHorizontalMultilineAABBBounds(text)
19442
- : this.updateVerticalMultilineAABBBounds(text);
19443
- if (direction === 'horizontal') {
19444
- if (underlineOffset) {
19445
- this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
19446
- }
19447
- }
19448
- return b;
19449
- }
19450
- guessLineHeightBuf(fontSize) {
19451
- return fontSize ? fontSize * 0.1 : 0;
19452
- }
19453
- updateHorizontalMultilineAABBBounds(text) {
19454
- var _a;
19455
- const textTheme = this.getGraphicTheme();
19456
- const attribute = this.attribute;
19457
- const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, wrap = textTheme.wrap, measureMode = textTheme.measureMode, lineWidth = textTheme.lineWidth, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition, ignoreBuf = textTheme.ignoreBuf, keepCenterInLine = textTheme.keepCenterInLine } = attribute;
19458
- const buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize);
19459
- const lineHeight = this.getLineHeight(attribute, textTheme, buf);
19460
- if (whiteSpace === 'normal' || wrap) {
19461
- return this.updateWrapAABBBounds(text);
19462
- }
19463
- if (!this.shouldUpdateShape() && ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData)) {
19464
- const bbox = this.cache.layoutData.bbox;
19465
- this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
19466
- if (stroke) {
19467
- this._AABBBounds.expand(lineWidth / 2);
19468
- }
19469
- return this._AABBBounds;
19470
- }
19471
- const textMeasure = application.graphicUtil.textMeasure;
19472
- const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily, lineHeight }, textMeasure);
19473
- const layoutData = layoutObj.GetLayoutByLines(text, textAlign, textBaseline, lineHeight, ellipsis === true ? textTheme.ellipsis : ellipsis || undefined, false, {
19474
- lineWidth: maxLineWidth,
19475
- suffixPosition,
19476
- measureMode,
19477
- keepCenterInLine
19478
- });
19479
- const { bbox } = layoutData;
19480
- this.cache.layoutData = layoutData;
19481
- this.clearUpdateShapeTag();
19482
- this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
19483
- if (stroke) {
19484
- this._AABBBounds.expand(lineWidth / 2);
19485
- }
19486
- return this._AABBBounds;
19487
- }
19488
19317
  updateWrapAABBBounds(text) {
19489
- var _a, _b, _c;
19318
+ var _a, _b, _c, _d;
19490
19319
  const textTheme = this.getGraphicTheme();
19491
- const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, fontWeight = textTheme.fontWeight, ignoreBuf = textTheme.ignoreBuf, measureMode = textTheme.measureMode, suffixPosition = textTheme.suffixPosition, heightLimit = 0, lineClamp, keepCenterInLine = textTheme.keepCenterInLine } = this.attribute;
19492
- const buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize);
19493
- const lineHeight = this.getLineHeight(this.attribute, textTheme, buf);
19494
- if (!this.shouldUpdateShape() && ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData)) {
19320
+ const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, fontWeight = textTheme.fontWeight, ignoreBuf = textTheme.ignoreBuf, suffixPosition = textTheme.suffixPosition, heightLimit = 0, lineClamp } = this.attribute;
19321
+ const lineHeight = (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (this.attribute.fontSize || textTheme.fontSize);
19322
+ const buf = ignoreBuf ? 0 : 2;
19323
+ if (!this.shouldUpdateShape() && ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.layoutData)) {
19495
19324
  const bbox = this.cache.layoutData.bbox;
19496
19325
  this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
19497
19326
  if (stroke) {
@@ -19500,8 +19329,7 @@ class Text extends Graphic {
19500
19329
  return this._AABBBounds;
19501
19330
  }
19502
19331
  const textMeasure = application.graphicUtil.textMeasure;
19503
- const textOptions = { fontSize, fontWeight, fontFamily, lineHeight };
19504
- const layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure);
19332
+ const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily }, textMeasure);
19505
19333
  const lines = isArray(text) ? text.map(l => l.toString()) : [text.toString()];
19506
19334
  const linesLayout = [];
19507
19335
  const bboxWH = [0, 0];
@@ -19518,23 +19346,19 @@ class Text extends Graphic {
19518
19346
  const str = lines[i];
19519
19347
  let needCut = true;
19520
19348
  if (i === lineCountLimit - 1) {
19521
- const clip = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, false, suffixPosition, i !== lines.length - 1);
19522
- const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
19349
+ const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition, i !== lines.length - 1);
19523
19350
  linesLayout.push({
19524
19351
  str: clip.str,
19525
- width: clip.width,
19526
- ascent: matrics.ascent,
19527
- descent: matrics.descent,
19528
- keepCenterInLine
19352
+ width: clip.width
19529
19353
  });
19530
19354
  break;
19531
19355
  }
19532
- const clip = textMeasure.clipText(str, textOptions, maxLineWidth, wordBreak !== 'break-all', wordBreak === 'keep-all');
19356
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, wordBreak !== 'break-all', wordBreak === 'keep-all');
19533
19357
  if ((str !== '' && clip.str === '') || clip.wordBreaked) {
19534
19358
  if (ellipsis) {
19535
- const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19536
- clip.str = (_b = clipEllipsis.str) !== null && _b !== void 0 ? _b : '';
19537
- clip.width = (_c = clipEllipsis.width) !== null && _c !== void 0 ? _c : 0;
19359
+ const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19360
+ clip.str = (_c = clipEllipsis.str) !== null && _c !== void 0 ? _c : '';
19361
+ clip.width = (_d = clipEllipsis.width) !== null && _d !== void 0 ? _d : 0;
19538
19362
  }
19539
19363
  else {
19540
19364
  clip.str = '';
@@ -19542,13 +19366,9 @@ class Text extends Graphic {
19542
19366
  }
19543
19367
  needCut = false;
19544
19368
  }
19545
- const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
19546
19369
  linesLayout.push({
19547
19370
  str: clip.str,
19548
- width: clip.width,
19549
- ascent: matrics.ascent,
19550
- descent: matrics.descent,
19551
- keepCenterInLine
19371
+ width: clip.width
19552
19372
  });
19553
19373
  let cutLength = clip.str.length;
19554
19374
  if (clip.wordBreaked && !(str !== '' && clip.str === '')) {
@@ -19557,7 +19377,10 @@ class Text extends Graphic {
19557
19377
  }
19558
19378
  if (clip.str.length === str.length) ;
19559
19379
  else if (needCut) {
19560
- const newStr = str.substring(cutLength);
19380
+ let newStr = str.substring(cutLength);
19381
+ if (wordBreak === 'keep-all') {
19382
+ newStr = newStr.replace(/^\s+/g, '');
19383
+ }
19561
19384
  lines.splice(i + 1, 0, newStr);
19562
19385
  }
19563
19386
  }
@@ -19574,34 +19397,29 @@ class Text extends Graphic {
19574
19397
  let text;
19575
19398
  for (let i = 0, len = lines.length; i < len; i++) {
19576
19399
  if (i === lineCountLimit - 1) {
19577
- const clip = textMeasure.clipTextWithSuffix(lines[i], textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19578
- const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
19400
+ const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19579
19401
  linesLayout.push({
19580
19402
  str: clip.str,
19581
- width: clip.width,
19582
- ascent: matrics.ascent,
19583
- descent: matrics.descent,
19584
- keepCenterInLine
19403
+ width: clip.width
19585
19404
  });
19586
19405
  lineWidth = Math.max(lineWidth, clip.width);
19587
19406
  break;
19588
19407
  }
19589
19408
  text = lines[i];
19590
- width = textMeasure.measureTextWidth(text, textOptions);
19409
+ width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, wordBreak === 'break-word');
19591
19410
  lineWidth = Math.max(lineWidth, width);
19592
- const matrics = textMeasure.measureTextPixelADscentAndWidth(text, textOptions, measureMode);
19593
- linesLayout.push({ str: text, width, ascent: matrics.ascent, descent: matrics.descent, keepCenterInLine });
19411
+ linesLayout.push({ str: text, width });
19594
19412
  }
19595
19413
  bboxWH[0] = lineWidth;
19596
19414
  }
19597
- bboxWH[1] = linesLayout.length * lineHeight;
19415
+ bboxWH[1] = linesLayout.length * (lineHeight + buf);
19598
19416
  const bbox = {
19599
19417
  xOffset: 0,
19600
19418
  yOffset: 0,
19601
19419
  width: bboxWH[0],
19602
19420
  height: bboxWH[1]
19603
19421
  };
19604
- layoutObj.LayoutBBox(bbox, textAlign, textBaseline, linesLayout);
19422
+ layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
19605
19423
  const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
19606
19424
  this.cache.layoutData = layoutData;
19607
19425
  this.clearUpdateShapeTag();
@@ -19611,19 +19429,212 @@ class Text extends Graphic {
19611
19429
  }
19612
19430
  return this._AABBBounds;
19613
19431
  }
19614
- updateVerticalMultilineAABBBounds(text) {
19432
+ updateSingallineAABBBounds(text) {
19433
+ const textTheme = this.getGraphicTheme();
19434
+ const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
19435
+ const b = direction === 'horizontal'
19436
+ ? this.updateHorizontalSinglelineAABBBounds(text)
19437
+ : this.updateVerticalSinglelineAABBBounds(text);
19438
+ if (direction === 'horizontal') {
19439
+ if (underlineOffset) {
19440
+ this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
19441
+ }
19442
+ }
19443
+ return b;
19444
+ }
19445
+ updateMultilineAABBBounds(text) {
19446
+ const textTheme = this.getGraphicTheme();
19447
+ const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
19448
+ const b = direction === 'horizontal'
19449
+ ? this.updateHorizontalMultilineAABBBounds(text)
19450
+ : this.updateVerticalMultilineAABBBounds(text);
19451
+ if (direction === 'horizontal') {
19452
+ if (underlineOffset) {
19453
+ this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
19454
+ }
19455
+ }
19456
+ return b;
19457
+ }
19458
+ updateHorizontalSinglelineAABBBounds(text) {
19459
+ var _a, _b;
19460
+ const textTheme = this.getGraphicTheme();
19461
+ const { wrap = textTheme.wrap } = this.attribute;
19462
+ if (wrap) {
19463
+ return this.updateWrapAABBBounds([text]);
19464
+ }
19465
+ const textMeasure = application.graphicUtil.textMeasure;
19466
+ let width;
19467
+ let str;
19468
+ const attribute = this.attribute;
19469
+ const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, ignoreBuf = textTheme.ignoreBuf, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition } = attribute;
19470
+ if (whiteSpace === 'normal') {
19471
+ return this.updateWrapAABBBounds(text);
19472
+ }
19473
+ const buf = ignoreBuf ? 0 : Math.max(2, fontSize * 0.075);
19474
+ const textFontSize = attribute.fontSize || textTheme.fontSize;
19475
+ const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, textFontSize)) !== null && _a !== void 0 ? _a : textFontSize + buf;
19476
+ if (!this.shouldUpdateShape() && this.cache) {
19477
+ width = (_b = this.cache.clipedWidth) !== null && _b !== void 0 ? _b : 0;
19478
+ const dx = textDrawOffsetX(textAlign, width);
19479
+ const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
19480
+ this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight);
19481
+ if (stroke) {
19482
+ this._AABBBounds.expand(lineWidth / 2);
19483
+ }
19484
+ return this._AABBBounds;
19485
+ }
19486
+ if (Number.isFinite(maxLineWidth)) {
19487
+ if (ellipsis) {
19488
+ const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
19489
+ const data = textMeasure.clipTextWithSuffix(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, false, suffixPosition);
19490
+ str = data.str;
19491
+ width = data.width;
19492
+ }
19493
+ else {
19494
+ const data = textMeasure.clipText(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, false);
19495
+ str = data.str;
19496
+ width = data.width;
19497
+ }
19498
+ this.cache.clipedText = str;
19499
+ this.cache.clipedWidth = width;
19500
+ }
19501
+ else {
19502
+ width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontWeight, fontFamily });
19503
+ this.cache.clipedText = text.toString();
19504
+ this.cache.clipedWidth = width;
19505
+ }
19506
+ this.clearUpdateShapeTag();
19507
+ const dx = textDrawOffsetX(textAlign, width);
19508
+ let lh = lineHeight;
19509
+ if (application.global && application.global.isSafari()) {
19510
+ lh += fontSize * 0.2;
19511
+ }
19512
+ const dy = textLayoutOffsetY(textBaseline, lh, fontSize, buf);
19513
+ this._AABBBounds.set(dx, dy, dx + width, dy + lh);
19514
+ if (stroke) {
19515
+ this._AABBBounds.expand(lineWidth / 2);
19516
+ }
19517
+ return this._AABBBounds;
19518
+ }
19519
+ getBaselineMapAlign() {
19520
+ return Text.baselineMapAlign;
19521
+ }
19522
+ getAlignMapBaseline() {
19523
+ return Text.alignMapBaseline;
19524
+ }
19525
+ updateVerticalSinglelineAABBBounds(text) {
19526
+ var _a, _b, _c;
19527
+ const textTheme = this.getGraphicTheme();
19528
+ const textMeasure = application.graphicUtil.textMeasure;
19529
+ let width;
19530
+ const attribute = this.attribute;
19531
+ const { ignoreBuf = textTheme.ignoreBuf } = attribute;
19532
+ const buf = ignoreBuf ? 0 : 2;
19533
+ const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode, suffixPosition = textTheme.suffixPosition } = attribute;
19534
+ const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
19535
+ let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
19536
+ if (!verticalMode) {
19537
+ const t = textAlign;
19538
+ textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
19539
+ textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
19540
+ }
19541
+ if (!this.shouldUpdateShape() && this.cache) {
19542
+ width = this.cache.clipedWidth;
19543
+ const dx = textDrawOffsetX(textAlign, width);
19544
+ const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
19545
+ this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width);
19546
+ if (stroke) {
19547
+ this._AABBBounds.expand(lineWidth / 2);
19548
+ }
19549
+ return this._AABBBounds;
19550
+ }
19551
+ let verticalList = [
19552
+ verticalLayout(text.toString())
19553
+ ];
19554
+ if (Number.isFinite(maxLineWidth)) {
19555
+ if (ellipsis) {
19556
+ const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
19557
+ const data = textMeasure.clipTextWithSuffixVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, false, suffixPosition);
19558
+ verticalList = [data.verticalList];
19559
+ width = data.width;
19560
+ }
19561
+ else {
19562
+ const data = textMeasure.clipTextVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, false);
19563
+ verticalList = [data.verticalList];
19564
+ width = data.width;
19565
+ }
19566
+ this.cache.verticalList = verticalList;
19567
+ this.cache.clipedWidth = width;
19568
+ }
19569
+ else {
19570
+ width = 0;
19571
+ verticalList[0].forEach(t => {
19572
+ const w = t.direction === TextDirection.HORIZONTAL
19573
+ ? fontSize
19574
+ : textMeasure.measureTextWidth(t.text, { fontSize, fontWeight, fontFamily });
19575
+ width += w;
19576
+ t.width = w;
19577
+ });
19578
+ this.cache.verticalList = verticalList;
19579
+ this.cache.clipedWidth = width;
19580
+ }
19581
+ this.clearUpdateShapeTag();
19582
+ const dx = textDrawOffsetX(textAlign, width);
19583
+ const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
19584
+ this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width);
19585
+ if (stroke) {
19586
+ this._AABBBounds.expand(lineWidth / 2);
19587
+ }
19588
+ return this._AABBBounds;
19589
+ }
19590
+ updateHorizontalMultilineAABBBounds(text) {
19615
19591
  var _a, _b;
19616
19592
  const textTheme = this.getGraphicTheme();
19593
+ const { wrap = textTheme.wrap } = this.attribute;
19594
+ if (wrap) {
19595
+ return this.updateWrapAABBBounds(text);
19596
+ }
19597
+ const attribute = this.attribute;
19598
+ const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition } = attribute;
19599
+ const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize);
19600
+ if (whiteSpace === 'normal') {
19601
+ return this.updateWrapAABBBounds(text);
19602
+ }
19603
+ if (!this.shouldUpdateShape() && ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.layoutData)) {
19604
+ const bbox = this.cache.layoutData.bbox;
19605
+ this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
19606
+ if (stroke) {
19607
+ this._AABBBounds.expand(lineWidth / 2);
19608
+ }
19609
+ return this._AABBBounds;
19610
+ }
19611
+ const textMeasure = application.graphicUtil.textMeasure;
19612
+ const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily }, textMeasure);
19613
+ const layoutData = layoutObj.GetLayoutByLines(text, textAlign, textBaseline, lineHeight, ellipsis === true ? textTheme.ellipsis : ellipsis || undefined, false, maxLineWidth, suffixPosition);
19614
+ const { bbox } = layoutData;
19615
+ this.cache.layoutData = layoutData;
19616
+ this.clearUpdateShapeTag();
19617
+ this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
19618
+ if (stroke) {
19619
+ this._AABBBounds.expand(lineWidth / 2);
19620
+ }
19621
+ return this._AABBBounds;
19622
+ }
19623
+ updateVerticalMultilineAABBBounds(text) {
19624
+ var _a, _b, _c;
19625
+ const textTheme = this.getGraphicTheme();
19617
19626
  const textMeasure = application.graphicUtil.textMeasure;
19618
19627
  let width;
19619
19628
  const attribute = this.attribute;
19629
+ const { ignoreBuf = textTheme.ignoreBuf } = attribute;
19630
+ const buf = ignoreBuf ? 0 : 2;
19620
19631
  const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode, suffixPosition = textTheme.suffixPosition } = attribute;
19621
- const lineHeight = this.getLineHeight(attribute, textTheme, 0);
19632
+ const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
19622
19633
  let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
19623
19634
  if (!verticalMode) {
19624
19635
  const t = textAlign;
19625
- textAlign = (_a = Text.baselineMapAlign[textBaseline]) !== null && _a !== void 0 ? _a : 'left';
19626
- textBaseline = (_b = Text.alignMapBaseline[t]) !== null && _b !== void 0 ? _b : 'top';
19636
+ textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
19637
+ textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
19627
19638
  }
19628
19639
  width = 0;
19629
19640
  if (!this.shouldUpdateShape() && this.cache) {
@@ -19683,15 +19694,6 @@ class Text extends Graphic {
19683
19694
  }
19684
19695
  return this._AABBBounds;
19685
19696
  }
19686
- getMaxWidth(theme) {
19687
- var _a, _b;
19688
- const attribute = this.attribute;
19689
- return (_b = (_a = attribute.maxLineWidth) !== null && _a !== void 0 ? _a : attribute.maxWidth) !== null && _b !== void 0 ? _b : theme.maxWidth;
19690
- }
19691
- getLineHeight(attribute, textTheme, buf) {
19692
- var _a;
19693
- return ((_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf);
19694
- }
19695
19697
  needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
19696
19698
  return super.needUpdateTags(keys, k);
19697
19699
  }
@@ -19704,12 +19706,6 @@ class Text extends Graphic {
19704
19706
  getNoWorkAnimateAttr() {
19705
19707
  return Text.NOWORK_ANIMATE_ATTR;
19706
19708
  }
19707
- getBaselineMapAlign() {
19708
- return Text.baselineMapAlign;
19709
- }
19710
- getAlignMapBaseline() {
19711
- return Text.alignMapBaseline;
19712
- }
19713
19709
  }
19714
19710
  Text.NOWORK_ANIMATE_ATTR = Object.assign({ ellipsis: 1, wordBreak: 1, direction: 1, textAlign: 1, textBaseline: 1, fontFamily: 1, fontWeight: 1 }, NOWORK_ANIMATE_ATTR);
19715
19711
  Text.baselineMapAlign = {
@@ -19773,10 +19769,7 @@ class WrapText extends Text {
19773
19769
  const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19774
19770
  linesLayout.push({
19775
19771
  str: clip.str,
19776
- width: clip.width,
19777
- ascent: 0,
19778
- descent: 0,
19779
- keepCenterInLine: false
19772
+ width: clip.width
19780
19773
  });
19781
19774
  break;
19782
19775
  }
@@ -19795,10 +19788,7 @@ class WrapText extends Text {
19795
19788
  }
19796
19789
  linesLayout.push({
19797
19790
  str: clip.str,
19798
- width: clip.width,
19799
- ascent: 0,
19800
- descent: 0,
19801
- keepCenterInLine: false
19791
+ width: clip.width
19802
19792
  });
19803
19793
  if (clip.str.length === str.length) ;
19804
19794
  else if (needCut) {
@@ -19822,10 +19812,7 @@ class WrapText extends Text {
19822
19812
  const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
19823
19813
  linesLayout.push({
19824
19814
  str: clip.str,
19825
- width: clip.width,
19826
- ascent: 0,
19827
- descent: 0,
19828
- keepCenterInLine: false
19815
+ width: clip.width
19829
19816
  });
19830
19817
  lineWidth = Math.max(lineWidth, clip.width);
19831
19818
  break;
@@ -19833,7 +19820,7 @@ class WrapText extends Text {
19833
19820
  text = lines[i];
19834
19821
  width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, wordBreak === 'break-word');
19835
19822
  lineWidth = Math.max(lineWidth, width);
19836
- linesLayout.push({ str: text, width, ascent: 0, descent: 0, keepCenterInLine: false });
19823
+ linesLayout.push({ str: text, width });
19837
19824
  }
19838
19825
  bboxWH[0] = lineWidth;
19839
19826
  }
@@ -19896,9 +19883,6 @@ class BaseSymbol {
19896
19883
  bounds.y2 = size[1] / 2;
19897
19884
  }
19898
19885
  }
19899
- parseSize(size) {
19900
- return isNumber(size) ? size : Math.min(size[0], size[1]);
19901
- }
19902
19886
  }
19903
19887
 
19904
19888
  function circle(ctx, r, x, y, z) {
@@ -19917,15 +19901,15 @@ class CircleSymbol extends BaseSymbol {
19917
19901
  this.pathStr = 'M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0';
19918
19902
  }
19919
19903
  draw(ctx, size, x, y, z) {
19920
- const r = this.parseSize(size) / 2;
19904
+ const r = size / 2;
19921
19905
  return circle(ctx, r, x, y, z);
19922
19906
  }
19923
19907
  drawOffset(ctx, size, x, y, offset, z) {
19924
- const r = this.parseSize(size) / 2 + offset;
19908
+ const r = size / 2 + offset;
19925
19909
  return circle(ctx, r, x, y, z);
19926
19910
  }
19927
19911
  drawToSvgPath(size, x, y, z) {
19928
- const r = this.parseSize(size) / 2;
19912
+ const r = size / 2;
19929
19913
  return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${r * 2},0 a ${r},${r} 0 1,0 -${r * 2},0`;
19930
19914
  }
19931
19915
  }
@@ -19970,11 +19954,11 @@ class CrossSymbol extends BaseSymbol {
19970
19954
  this.pathStr = 'M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z';
19971
19955
  }
19972
19956
  draw(ctx, size, x, y, z) {
19973
- const r = this.parseSize(size) / 6;
19957
+ const r = size / 6;
19974
19958
  return cross(ctx, r, x, y, z);
19975
19959
  }
19976
19960
  drawOffset(ctx, size, x, y, offset, z) {
19977
- const r = this.parseSize(size) / 6;
19961
+ const r = size / 6;
19978
19962
  return crossOffset(ctx, r, x, y, offset, z);
19979
19963
  }
19980
19964
  }
@@ -19995,15 +19979,15 @@ class DiamondSymbol extends BaseSymbol {
19995
19979
  this.pathStr = 'M-0.5,0L0,-0.5L0.5,0L0,0.5Z';
19996
19980
  }
19997
19981
  draw(ctx, size, x, y, z) {
19998
- const r = this.parseSize(size) / 2;
19982
+ const r = size / 2;
19999
19983
  return diamond(ctx, r, x, y, z);
20000
19984
  }
20001
19985
  drawFitDir(ctx, size, x, y, z) {
20002
- const r = this.parseSize(size) / 2;
19986
+ const r = size / 2;
20003
19987
  return diamond(ctx, r, x, y, z);
20004
19988
  }
20005
19989
  drawOffset(ctx, size, x, y, offset, z) {
20006
- const r = this.parseSize(size) / 2 + offset;
19990
+ const r = size / 2 + offset;
20007
19991
  return diamond(ctx, r, x, y, z);
20008
19992
  }
20009
19993
  }
@@ -20021,11 +20005,11 @@ class SquareSymbol extends BaseSymbol {
20021
20005
  this.pathStr = 'M-0.5,-0.5h1v1h-1Z';
20022
20006
  }
20023
20007
  draw(ctx, size, x, y) {
20024
- const r = this.parseSize(size) / 2;
20008
+ const r = size / 2;
20025
20009
  return square(ctx, r, x, y);
20026
20010
  }
20027
20011
  drawOffset(ctx, size, x, y, offset) {
20028
- const r = this.parseSize(size) / 2 + offset;
20012
+ const r = size / 2 + offset;
20029
20013
  return square(ctx, r, x, y);
20030
20014
  }
20031
20015
  }
@@ -20045,11 +20029,11 @@ class TriangleUpSymbol extends BaseSymbol {
20045
20029
  this.pathStr = 'M0.5,0.5 L-0.5,0.5 L0,-0.5 Z';
20046
20030
  }
20047
20031
  draw(ctx, size, x, y) {
20048
- const r = this.parseSize(size) / 2;
20032
+ const r = size / 2;
20049
20033
  return trianglUpOffset(ctx, r, x, y);
20050
20034
  }
20051
20035
  drawOffset(ctx, size, x, y, offset) {
20052
- const r = this.parseSize(size) / 2;
20036
+ const r = size / 2;
20053
20037
  return trianglUpOffset(ctx, r, x, y, offset);
20054
20038
  }
20055
20039
  }
@@ -20088,11 +20072,11 @@ class StarSymbol extends BaseSymbol {
20088
20072
  this.pathStr = 'M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z';
20089
20073
  }
20090
20074
  draw(ctx, size, transX, transY) {
20091
- const r = this.parseSize(size) / 2;
20075
+ const r = size / 2;
20092
20076
  return star(ctx, r, transX, transY);
20093
20077
  }
20094
20078
  drawOffset(ctx, size, transX, transY, offset) {
20095
- const r = this.parseSize(size) / 2 + offset;
20079
+ const r = size / 2 + offset;
20096
20080
  return star(ctx, r, transX, transY);
20097
20081
  }
20098
20082
  }
@@ -20121,11 +20105,11 @@ class ArrowSymbol extends BaseSymbol {
20121
20105
  this.pathStr = 'M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z';
20122
20106
  }
20123
20107
  draw(ctx, size, transX, transY) {
20124
- const r = this.parseSize(size) / 2;
20108
+ const r = size / 2;
20125
20109
  return arrow(ctx, r, transX, transY);
20126
20110
  }
20127
20111
  drawOffset(ctx, size, transX, transY, offset) {
20128
- const r = this.parseSize(size) / 2 + offset;
20112
+ const r = size / 2 + offset;
20129
20113
  return arrow(ctx, r, transX, transY);
20130
20114
  }
20131
20115
  }
@@ -20146,11 +20130,11 @@ class WedgeSymbol extends BaseSymbol {
20146
20130
  this.pathStr = 'M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z';
20147
20131
  }
20148
20132
  draw(ctx, size, transX, transY) {
20149
- const r = this.parseSize(size) / 2;
20133
+ const r = size / 2;
20150
20134
  return wedge(ctx, r, transX, transY);
20151
20135
  }
20152
20136
  drawOffset(ctx, size, transX, transY, offset) {
20153
- const r = this.parseSize(size) / 2 + offset;
20137
+ const r = size / 2 + offset;
20154
20138
  return wedge(ctx, r, transX, transY);
20155
20139
  }
20156
20140
  }
@@ -20168,11 +20152,11 @@ class StrokeSymbol extends BaseSymbol {
20168
20152
  this.pathStr = '';
20169
20153
  }
20170
20154
  draw(ctx, size, transX, transY) {
20171
- const r = this.parseSize(size) / 2;
20155
+ const r = size / 2;
20172
20156
  return stroke(ctx, r, transX, transY);
20173
20157
  }
20174
20158
  drawOffset(ctx, size, transX, transY, offset) {
20175
- const r = this.parseSize(size) / 2 + offset;
20159
+ const r = size / 2 + offset;
20176
20160
  return stroke(ctx, r, transX, transY);
20177
20161
  }
20178
20162
  }
@@ -20207,11 +20191,11 @@ class WyeSymbol extends BaseSymbol {
20207
20191
  this.pathStr = 'M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z';
20208
20192
  }
20209
20193
  draw(ctx, size, transX, transY) {
20210
- const r = this.parseSize(size) / 2;
20194
+ const r = size / 2;
20211
20195
  return wye(ctx, r, transX, transY);
20212
20196
  }
20213
20197
  drawOffset(ctx, size, transX, transY, offset) {
20214
- const r = this.parseSize(size) / 2 + offset;
20198
+ const r = size / 2 + offset;
20215
20199
  return wye(ctx, r, transX, transY);
20216
20200
  }
20217
20201
  }
@@ -20231,11 +20215,11 @@ class TriangleLeftSymbol extends BaseSymbol {
20231
20215
  this.pathStr = 'M-0.5,0 L0.5,0.5 L0.5,-0.5 Z';
20232
20216
  }
20233
20217
  draw(ctx, size, x, y) {
20234
- const r = this.parseSize(size) / 2;
20218
+ const r = size / 2;
20235
20219
  return trianglLeftOffset(ctx, r, x, y, 0);
20236
20220
  }
20237
20221
  drawOffset(ctx, size, x, y, offset) {
20238
- const r = this.parseSize(size) / 2;
20222
+ const r = size / 2;
20239
20223
  return trianglLeftOffset(ctx, r, x, y, offset);
20240
20224
  }
20241
20225
  }
@@ -20255,11 +20239,11 @@ class TriangleRightSymbol extends BaseSymbol {
20255
20239
  this.pathStr = 'M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z';
20256
20240
  }
20257
20241
  draw(ctx, size, x, y) {
20258
- const r = this.parseSize(size) / 2;
20242
+ const r = size / 2;
20259
20243
  return trianglRightOffset(ctx, r, x, y);
20260
20244
  }
20261
20245
  drawOffset(ctx, size, x, y, offset) {
20262
- const r = this.parseSize(size) / 2;
20246
+ const r = size / 2;
20263
20247
  return trianglRightOffset(ctx, r, x, y, offset);
20264
20248
  }
20265
20249
  }
@@ -20279,11 +20263,11 @@ class TriangleDownSymbol extends BaseSymbol {
20279
20263
  this.pathStr = 'M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z';
20280
20264
  }
20281
20265
  draw(ctx, size, x, y) {
20282
- const r = this.parseSize(size) / 2;
20266
+ const r = size / 2;
20283
20267
  return trianglDownOffset(ctx, r, x, y);
20284
20268
  }
20285
20269
  drawOffset(ctx, size, x, y, offset) {
20286
- const r = this.parseSize(size) / 2;
20270
+ const r = size / 2;
20287
20271
  return trianglDownOffset(ctx, r, x, y, offset);
20288
20272
  }
20289
20273
  }
@@ -20305,11 +20289,11 @@ class ThinTriangleSymbol extends BaseSymbol {
20305
20289
  this.pathStr = 'M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z';
20306
20290
  }
20307
20291
  draw(ctx, size, x, y) {
20308
- const r = this.parseSize(size) / 2 / sqrt3;
20292
+ const r = size / 2 / sqrt3;
20309
20293
  return thinTriangle(ctx, r, x, y);
20310
20294
  }
20311
20295
  drawOffset(ctx, size, x, y, offset) {
20312
- const r = this.parseSize(size) / 2 / sqrt3 + offset;
20296
+ const r = size / 2 / sqrt3 + offset;
20313
20297
  return thinTriangle(ctx, r, x, y);
20314
20298
  }
20315
20299
  }
@@ -20329,11 +20313,11 @@ class Arrow2LeftSymbol extends BaseSymbol {
20329
20313
  this.pathStr = 'M 0.25 -0.5 L -0.25 0 l 0.25 0.5';
20330
20314
  }
20331
20315
  draw(ctx, size, transX, transY) {
20332
- const r = this.parseSize(size) / 4;
20316
+ const r = size / 4;
20333
20317
  return arrow2Left(ctx, r, transX, transY);
20334
20318
  }
20335
20319
  drawOffset(ctx, size, transX, transY, offset) {
20336
- const r = this.parseSize(size) / 4 + offset;
20320
+ const r = size / 4 + offset;
20337
20321
  return arrow2Left(ctx, r, transX, transY);
20338
20322
  }
20339
20323
  }
@@ -20353,11 +20337,11 @@ class Arrow2RightSymbol extends BaseSymbol {
20353
20337
  this.pathStr = 'M -0.25 -0.5 l 0.25 0 l -0.25 0.5';
20354
20338
  }
20355
20339
  draw(ctx, size, transX, transY) {
20356
- const r = this.parseSize(size) / 4;
20340
+ const r = size / 4;
20357
20341
  return arrow2Right(ctx, r, transX, transY);
20358
20342
  }
20359
20343
  drawOffset(ctx, size, transX, transY, offset) {
20360
- const r = this.parseSize(size) / 4 + offset;
20344
+ const r = size / 4 + offset;
20361
20345
  return arrow2Right(ctx, r, transX, transY);
20362
20346
  }
20363
20347
  }
@@ -20377,11 +20361,11 @@ class Arrow2UpSymbol extends BaseSymbol {
20377
20361
  this.pathStr = 'M -0.5 0.25 L 0 -0.25 l 0.5 0.25';
20378
20362
  }
20379
20363
  draw(ctx, size, transX, transY) {
20380
- const r = this.parseSize(size) / 4;
20364
+ const r = size / 4;
20381
20365
  return arrow2Up(ctx, r, transX, transY);
20382
20366
  }
20383
20367
  drawOffset(ctx, size, transX, transY, offset) {
20384
- const r = this.parseSize(size) / 4 + offset;
20368
+ const r = size / 4 + offset;
20385
20369
  return arrow2Up(ctx, r, transX, transY);
20386
20370
  }
20387
20371
  }
@@ -20401,11 +20385,11 @@ class Arrow2DownSymbol extends BaseSymbol {
20401
20385
  this.pathStr = 'M -0.5 -0.25 L 0 0.25 l 0.5 -0.25';
20402
20386
  }
20403
20387
  draw(ctx, size, transX, transY) {
20404
- const r = this.parseSize(size) / 4;
20388
+ const r = size / 4;
20405
20389
  return arrow2Down(ctx, r, transX, transY);
20406
20390
  }
20407
20391
  drawOffset(ctx, size, transX, transY, offset) {
20408
- const r = this.parseSize(size) / 4 + offset;
20392
+ const r = size / 4 + offset;
20409
20393
  return arrow2Down(ctx, r, transX, transY);
20410
20394
  }
20411
20395
  }
@@ -20423,15 +20407,15 @@ class LineVSymbol extends BaseSymbol {
20423
20407
  this.pathStr = 'M0,-0.5L0,0.5';
20424
20408
  }
20425
20409
  draw(ctx, size, x, y, z) {
20426
- const r = this.parseSize(size) / 2;
20410
+ const r = size / 2;
20427
20411
  return lineV(ctx, r, x, y);
20428
20412
  }
20429
20413
  drawOffset(ctx, size, x, y, offset, z) {
20430
- const r = this.parseSize(size) / 2 + offset;
20414
+ const r = size / 2 + offset;
20431
20415
  return lineV(ctx, r, x, y);
20432
20416
  }
20433
20417
  drawToSvgPath(size, x, y, z) {
20434
- const r = this.parseSize(size) / 2;
20418
+ const r = size / 2;
20435
20419
  return `M ${x}, ${y - r} L ${x},${y + r}`;
20436
20420
  }
20437
20421
  }
@@ -20449,15 +20433,15 @@ class LineHSymbol extends BaseSymbol {
20449
20433
  this.pathStr = 'M-0.5,0L0.5,0';
20450
20434
  }
20451
20435
  draw(ctx, size, x, y, z) {
20452
- const r = this.parseSize(size) / 2;
20436
+ const r = size / 2;
20453
20437
  return lineH(ctx, r, x, y);
20454
20438
  }
20455
20439
  drawOffset(ctx, size, x, y, offset, z) {
20456
- const r = this.parseSize(size) / 2 + offset;
20440
+ const r = size / 2 + offset;
20457
20441
  return lineH(ctx, r, x, y);
20458
20442
  }
20459
20443
  drawToSvgPath(size, x, y, z) {
20460
- const r = this.parseSize(size) / 2;
20444
+ const r = size / 2;
20461
20445
  return `M ${x - r}, ${y} L ${x + r},${y}`;
20462
20446
  }
20463
20447
  }
@@ -20477,15 +20461,15 @@ class CloseSymbol extends BaseSymbol {
20477
20461
  this.pathStr = 'M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5';
20478
20462
  }
20479
20463
  draw(ctx, size, x, y, z) {
20480
- const r = this.parseSize(size) / 2;
20464
+ const r = size / 2;
20481
20465
  return close(ctx, r, x, y);
20482
20466
  }
20483
20467
  drawOffset(ctx, size, x, y, offset, z) {
20484
- const r = this.parseSize(size) / 2 + offset;
20468
+ const r = size / 2 + offset;
20485
20469
  return close(ctx, r, x, y);
20486
20470
  }
20487
20471
  drawToSvgPath(size, x, y, z) {
20488
- const r = this.parseSize(size) / 2;
20472
+ const r = size / 2;
20489
20473
  return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
20490
20474
  }
20491
20475
  }
@@ -20536,7 +20520,6 @@ class CustomSymbolClass {
20536
20520
  this.isSvg = isSvg;
20537
20521
  }
20538
20522
  drawOffset(ctx, size, x, y, offset, z, cb) {
20539
- size = this.parseSize(size);
20540
20523
  if (this.isSvg) {
20541
20524
  if (!this.svgCache) {
20542
20525
  return false;
@@ -20552,14 +20535,9 @@ class CustomSymbolClass {
20552
20535
  return false;
20553
20536
  }
20554
20537
  draw(ctx, size, x, y, z, cb) {
20555
- size = this.parseSize(size);
20556
20538
  return this.drawOffset(ctx, size, x, y, 0, z, cb);
20557
20539
  }
20558
- parseSize(size) {
20559
- return isNumber(size) ? size : Math.min(size[0], size[1]);
20560
- }
20561
20540
  bounds(size, bounds) {
20562
- size = this.parseSize(size);
20563
20541
  if (this.isSvg) {
20564
20542
  if (!this.svgCache) {
20565
20543
  return;
@@ -21579,8 +21557,7 @@ class Paragraph {
21579
21557
  left = 0;
21580
21558
  baseline = 0;
21581
21559
  }
21582
- const { lineWidth = 1 } = this.character;
21583
- if (this.character.stroke && lineWidth) {
21560
+ if (this.character.stroke) {
21584
21561
  applyStrokeStyle(ctx, this.character);
21585
21562
  ctx.strokeText(text, left, baseline);
21586
21563
  }
@@ -24737,7 +24714,6 @@ class Stage extends Group {
24737
24714
  constructor(params = {}) {
24738
24715
  var _a;
24739
24716
  super({});
24740
- this.tickedBeforeRender = true;
24741
24717
  this._onVisibleChange = (visible) => {
24742
24718
  if (this._skipRender < 0) {
24743
24719
  return;
@@ -24764,15 +24740,6 @@ class Stage extends Group {
24764
24740
  this._afterRender && this._afterRender(stage);
24765
24741
  this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));
24766
24742
  this._afterNextRenderCbs = null;
24767
- this.tickedBeforeRender = false;
24768
- };
24769
- this.afterTickCb = () => {
24770
- var _a;
24771
- this.tickedBeforeRender = true;
24772
- if (((_a = this.params.optimize) === null || _a === void 0 ? void 0 : _a.tickRenderMode) === 'performance') ;
24773
- else {
24774
- this.state !== 'rendering' && this.render();
24775
- }
24776
24743
  };
24777
24744
  this.params = params;
24778
24745
  this.theme = new Theme();
@@ -24840,7 +24807,6 @@ class Stage extends Group {
24840
24807
  if (params.background && isString(this._background) && this._background.includes('/')) {
24841
24808
  this.setAttributes({ background: this._background });
24842
24809
  }
24843
- this.ticker.on('afterTick', this.afterTickCb);
24844
24810
  }
24845
24811
  pauseRender(sr = -1) {
24846
24812
  this._skipRender = sr;
@@ -25154,9 +25120,6 @@ class Stage extends Group {
25154
25120
  this.timeline.resume();
25155
25121
  const state = this.state;
25156
25122
  this.state = 'rendering';
25157
- if (!this.tickedBeforeRender) {
25158
- this.ticker.trySyncTickStatus();
25159
- }
25160
25123
  this.layerService.prepareStageLayer(this);
25161
25124
  if (!this._skipRender) {
25162
25125
  this.lastRenderparams = params;
@@ -25354,7 +25317,6 @@ class Stage extends Group {
25354
25317
  }
25355
25318
  this.window.release();
25356
25319
  this.ticker.remTimeline(this.timeline);
25357
- this.ticker.removeListener('afterTick', this.afterTickCb);
25358
25320
  this.renderService.renderTreeRoots = [];
25359
25321
  }
25360
25322
  setStage(stage) {
@@ -25467,6 +25429,25 @@ function createStage(params) {
25467
25429
  return new Stage(params);
25468
25430
  }
25469
25431
 
25432
+ var params;
25433
+ (function (params) {
25434
+ params[params["W"] = 1] = "W";
25435
+ params[params["H"] = 2] = "H";
25436
+ params[params["WH"] = 3] = "WH";
25437
+ })(params || (params = {}));
25438
+
25439
+ const strCommandMap = [
25440
+ 'arc',
25441
+ 'arcTo',
25442
+ 'bezierCurveTo',
25443
+ 'closePath',
25444
+ 'ellipse',
25445
+ 'lineTo',
25446
+ 'moveTo',
25447
+ 'quadraticCurveTo',
25448
+ 'rect'
25449
+ ];
25450
+
25470
25451
  const initMatrix = new Matrix(1, 0, 0, 1, 0, 0);
25471
25452
  const globalPoint = { x: 0, y: 0 };
25472
25453
  let EmptyContext2d = class EmptyContext2d {
@@ -28738,4 +28719,4 @@ const registerFlexLayoutPlugin = () => {
28738
28719
  Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
28739
28720
  };
28740
28721
 
28741
- export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, MeasureModeEnum, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawPathProxy, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
28722
+ export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawPathProxy, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };