@visactor/vrender 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.
package/dist/index.es.js CHANGED
@@ -589,6 +589,12 @@ let DefaultGlobal = class {
589
589
  get env() {
590
590
  return this._env;
591
591
  }
592
+ get isImageAnonymous() {
593
+ return this._isImageAnonymous;
594
+ }
595
+ set isImageAnonymous(isImageAnonymous) {
596
+ this._isImageAnonymous = isImageAnonymous;
597
+ }
592
598
  get devicePixelRatio() {
593
599
  return this._env || this.setEnv("browser"), this.envContribution.getDevicePixelRatio();
594
600
  }
@@ -623,7 +629,7 @@ let DefaultGlobal = class {
623
629
  this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
624
630
  }
625
631
  constructor(contributions) {
626
- this.contributions = contributions, this.id = Generator.GenAutoIncrementId(), this.hooks = {
632
+ this.contributions = contributions, this._isImageAnonymous = !0, this.id = Generator.GenAutoIncrementId(), this.hooks = {
627
633
  onSetEnv: new SyncHook(["lastEnv", "env", "global"])
628
634
  }, this.measureTextMethod = "native", this.optimizeVisible = !1;
629
635
  }
@@ -742,13 +748,6 @@ let DefaultGlobal = class {
742
748
  };
743
749
  DefaultGlobal = __decorate$1H([injectable(), __param$T(0, inject(ContributionProvider)), __param$T(0, named(EnvContribution)), __metadata$1h("design:paramtypes", [Object])], DefaultGlobal);
744
750
 
745
- var MeasureModeEnum;
746
- !function (MeasureModeEnum) {
747
- MeasureModeEnum[MeasureModeEnum.estimate = 0] = "estimate", MeasureModeEnum[MeasureModeEnum.actualBounding = 1] = "actualBounding", MeasureModeEnum[MeasureModeEnum.fontBounding = 2] = "fontBounding";
748
- }(MeasureModeEnum || (MeasureModeEnum = {}));
749
-
750
- const strCommandMap = ["arc", "arcTo", "bezierCurveTo", "closePath", "ellipse", "lineTo", "moveTo", "quadraticCurveTo", "rect"];
751
-
752
751
  function getDefaultExportFromCjs (x) {
753
752
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
754
753
  }
@@ -1703,9 +1702,7 @@ class TextMeasure {
1703
1702
  } = this.textSpec;
1704
1703
  return {
1705
1704
  width: metrics.width,
1706
- height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize,
1707
- fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
1708
- fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
1705
+ height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize
1709
1706
  };
1710
1707
  }
1711
1708
  quickMeasure(text) {
@@ -1719,7 +1716,7 @@ class TextMeasure {
1719
1716
  for (let i = 0; i < text.length; i++) {
1720
1717
  const char = text[i];
1721
1718
  let size = this._measureSpecialChar(char);
1722
- isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$1(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$1(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
1719
+ isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
1723
1720
  }
1724
1721
  return totalSize;
1725
1722
  }
@@ -1768,9 +1765,7 @@ class TextMeasure {
1768
1765
  const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
1769
1766
  this._numberCharSize = {
1770
1767
  width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
1771
- height: numberBounds.height,
1772
- fontBoundingBoxAscent: numberBounds.fontBoundingBoxAscent,
1773
- fontBoundingBoxDescent: numberBounds.fontBoundingBoxDescent
1768
+ height: numberBounds.height
1774
1769
  };
1775
1770
  }
1776
1771
  return this._numberCharSize;
@@ -1783,9 +1778,7 @@ class TextMeasure {
1783
1778
  const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
1784
1779
  this._letterCharSize = {
1785
1780
  width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
1786
- height: alphabetBounds.height,
1787
- fontBoundingBoxAscent: alphabetBounds.fontBoundingBoxAscent,
1788
- fontBoundingBoxDescent: alphabetBounds.fontBoundingBoxDescent
1781
+ height: alphabetBounds.height
1789
1782
  };
1790
1783
  }
1791
1784
  return this._letterCharSize;
@@ -3926,7 +3919,6 @@ const DefaultStrokeStyle = Object.assign({
3926
3919
  const DefaultTextStyle = {
3927
3920
  text: "",
3928
3921
  maxLineWidth: 1 / 0,
3929
- maxWidth: 1 / 0,
3930
3922
  textAlign: "left",
3931
3923
  textBaseline: "alphabetic",
3932
3924
  fontSize: 16,
@@ -3950,9 +3942,7 @@ const DefaultTextStyle = {
3950
3942
  suffixPosition: "end",
3951
3943
  underlineDash: [],
3952
3944
  underlineOffset: 0,
3953
- disableAutoClipedPoptip: void 0,
3954
- measureMode: MeasureModeEnum.fontBounding,
3955
- keepCenterInLine: !1
3945
+ disableAutoClipedPoptip: void 0
3956
3946
  };
3957
3947
  const DefaultPickStyle = {
3958
3948
  pickStrokeBuffer: 0
@@ -4006,8 +3996,7 @@ const DefaultAttribute = Object.assign(Object.assign(Object.assign({
4006
3996
  globalZIndex: 1,
4007
3997
  globalCompositeOperation: "",
4008
3998
  overflow: "hidden",
4009
- shadowPickMode: "graphic",
4010
- keepStrokeScale: !1
3999
+ shadowPickMode: "graphic"
4011
4000
  }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
4012
4001
  function addAttributeToPrototype(obj, c, keys) {
4013
4002
  keys.forEach(key => {
@@ -4282,32 +4271,10 @@ let ATextMeasure = class {
4282
4271
  configure(service, env) {
4283
4272
  this.canvas = service.canvas, this.context = service.context, service.bindTextMeasure(this);
4284
4273
  }
4285
- _measureTextWithoutAlignBaseline(text, options, compatible) {
4274
+ measureTextWidth(text, options) {
4275
+ if (!this.context) return this.estimate(text, options).width;
4286
4276
  this.context.setTextStyleWithoutAlignBaseline(options);
4287
- const metrics = this.context.measureText(text);
4288
- return compatible ? this.compatibleMetrics(metrics, options) : metrics;
4289
- }
4290
- _measureTextWithAlignBaseline(text, options, compatible) {
4291
- this.context.setTextStyle(options);
4292
- const metrics = this.context.measureText(text);
4293
- return compatible ? this.compatibleMetrics(metrics, options) : metrics;
4294
- }
4295
- compatibleMetrics(metrics, options) {
4296
- if (null == metrics.actualBoundingBoxAscent || null == metrics.actualBoundingBoxDescent || null == metrics.fontBoundingBoxAscent || null == metrics.fontBoundingBoxDescent) {
4297
- const {
4298
- ascent: ascent,
4299
- descent: descent
4300
- } = this.measureTextBoundADscentEstimate(options);
4301
- metrics.actualBoundingBoxAscent = ascent, metrics.actualBoundingBoxDescent = descent, metrics.fontBoundingBoxAscent = ascent, metrics.fontBoundingBoxDescent = descent;
4302
- }
4303
- if (null == metrics.actualBoundingBoxLeft || null == metrics.actualBoundingBoxRight) {
4304
- const {
4305
- left: left,
4306
- right: right
4307
- } = this.measureTextBoundLeftRightEstimate(options);
4308
- metrics.actualBoundingBoxLeft = left, metrics.actualBoundingBoxRight = right;
4309
- }
4310
- return metrics;
4277
+ return this.context.measureText(text).width;
4311
4278
  }
4312
4279
  estimate(text, _ref) {
4313
4280
  let {
@@ -4321,97 +4288,19 @@ let ATextMeasure = class {
4321
4288
  height: fontSize
4322
4289
  };
4323
4290
  }
4324
- measureTextWidth(text, options, textMeasure) {
4325
- return this.context ? (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithoutAlignBaseline(text, options)).width : this.estimate(text, options).width;
4326
- }
4327
- measureTextBoundsWidth(text, options, textMeasure) {
4328
- return this.context ? (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithoutAlignBaseline(text, options)).width : this.estimate(text, options).width;
4329
- }
4330
- measureTextBoundsLeftRight(text, options, textMeasure) {
4331
- return this.context ? {
4332
- left: (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithAlignBaseline(text, options, !0)).actualBoundingBoxLeft,
4333
- right: textMeasure.actualBoundingBoxRight
4334
- } : this.measureTextBoundLeftRightEstimate(options);
4335
- }
4336
- measureTextPixelHeight(text, options, textMeasure) {
4337
- var _a;
4338
- return this.context ? (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithoutAlignBaseline(text, options, !0), Math.abs(textMeasure.actualBoundingBoxAscent - textMeasure.actualBoundingBoxDescent)) : null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize;
4339
- }
4340
- measureTextPixelADscent(text, options, textMeasure) {
4341
- return this.context ? {
4342
- ascent: (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithAlignBaseline(text, options, !0)).actualBoundingBoxAscent,
4343
- descent: textMeasure.actualBoundingBoxDescent
4344
- } : this.measureTextBoundADscentEstimate(options);
4345
- }
4346
- measureTextBoundHieght(text, options, textMeasure) {
4291
+ measureTextPixelHeight(text, options) {
4347
4292
  var _a;
4348
- return this.context ? (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithoutAlignBaseline(text, options, !0), Math.abs(textMeasure.fontBoundingBoxAscent - textMeasure.fontBoundingBoxDescent)) : null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize;
4349
- }
4350
- measureTextBoundADscent(text, options, textMeasure) {
4351
- return this.context ? {
4352
- ascent: (textMeasure = null != textMeasure ? textMeasure : this._measureTextWithAlignBaseline(text, options, !0)).fontBoundingBoxAscent,
4353
- descent: textMeasure.fontBoundingBoxDescent
4354
- } : this.measureTextBoundADscentEstimate(options);
4355
- }
4356
- measureTextBoundADscentEstimate(options) {
4357
- var _a;
4358
- const fontSize = null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize;
4359
- return {
4360
- ascent: .79 * fontSize,
4361
- descent: .21 * fontSize
4362
- };
4293
+ if (!this.context) return null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize;
4294
+ this.context.setTextStyleWithoutAlignBaseline(options);
4295
+ const textMeasure = this.context.measureText(text);
4296
+ return Math.abs(textMeasure.actualBoundingBoxAscent - textMeasure.actualBoundingBoxDescent);
4363
4297
  }
4364
- measureTextBoundLeftRightEstimate(options) {
4298
+ measureTextBoundHieght(text, options) {
4365
4299
  var _a;
4366
- const fontSize = null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize,
4367
- {
4368
- textAlign: textAlign
4369
- } = options;
4370
- return "center" === textAlign ? {
4371
- left: fontSize / 2,
4372
- right: fontSize / 2
4373
- } : "right" === textAlign || "end" === textAlign ? {
4374
- left: fontSize,
4375
- right: 0
4376
- } : {
4377
- left: 0,
4378
- right: fontSize
4379
- };
4380
- }
4381
- measureTextPixelADscentAndWidth(text, options, mode) {
4382
- if (!this.context) return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), {
4383
- width: this.estimate(text, options).width
4384
- });
4385
- const out = this._measureTextWithoutAlignBaseline(text, options, !0);
4386
- if (mode === MeasureModeEnum.actualBounding) return {
4387
- ascent: out.actualBoundingBoxAscent,
4388
- descent: out.actualBoundingBoxDescent,
4389
- width: out.width
4390
- };
4391
- if (mode === MeasureModeEnum.estimate) return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), {
4392
- width: out.width
4393
- });
4394
- if (mode === MeasureModeEnum.fontBounding) {
4395
- let ascent = out.fontBoundingBoxAscent,
4396
- descent = out.fontBoundingBoxDescent;
4397
- if (out.actualBoundingBoxDescent && descent < out.actualBoundingBoxDescent) {
4398
- const delta = out.actualBoundingBoxDescent - descent;
4399
- descent += delta, ascent -= delta;
4400
- } else if (out.actualBoundingBoxAscent && ascent < out.actualBoundingBoxAscent) {
4401
- const delta = out.actualBoundingBoxAscent - ascent;
4402
- ascent += delta, descent -= delta;
4403
- }
4404
- return {
4405
- ascent: ascent,
4406
- descent: descent,
4407
- width: out.width
4408
- };
4409
- }
4410
- return {
4411
- ascent: out.actualBoundingBoxAscent,
4412
- descent: out.actualBoundingBoxDescent,
4413
- width: out.width
4414
- };
4300
+ if (!this.context) return null !== (_a = options.fontSize) && void 0 !== _a ? _a : DefaultTextStyle.fontSize;
4301
+ this.context.setTextStyleWithoutAlignBaseline(options);
4302
+ const textMeasure = this.context.measureText(text);
4303
+ return Math.abs(textMeasure.fontBoundingBoxAscent - textMeasure.fontBoundingBoxDescent);
4415
4304
  }
4416
4305
  measureText(text, options) {
4417
4306
  return this.context ? (this.context.setTextStyleWithoutAlignBaseline(options), this.context.measureText(text)) : this.estimate(text, options);
@@ -6523,7 +6412,7 @@ class TimeOutTickHandler {
6523
6412
  }
6524
6413
  }
6525
6414
 
6526
- class DefaultTicker extends EventEmitter {
6415
+ class DefaultTicker {
6527
6416
  set mode(m) {
6528
6417
  this._mode !== m && (this._mode = m, this.setupTickHandler());
6529
6418
  }
@@ -6532,17 +6421,17 @@ class DefaultTicker extends EventEmitter {
6532
6421
  }
6533
6422
  constructor() {
6534
6423
  let timelines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6535
- super(), this.handleTick = (handler, params) => {
6424
+ this.handleTick = (handler, params) => {
6536
6425
  const {
6537
6426
  once = !1
6538
6427
  } = null != params ? params : {};
6539
- this.ifCanStop() ? this.stop() : (this._handlerTick(), once || handler.tick(this.interval, this.handleTick));
6540
- }, this._handlerTick = () => {
6428
+ this.ifCanStop() ? this.stop() : (this._handlerTick(handler), once || handler.tick(this.interval, this.handleTick));
6429
+ }, this._handlerTick = handler => {
6541
6430
  const time = this.tickerHandler.getTime();
6542
6431
  let delta = 0;
6543
6432
  this.lastFrameTime >= 0 && (delta = time - this.lastFrameTime), this.lastFrameTime = time, this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(t => {
6544
6433
  t.tick(delta);
6545
- }), this.emit("afterTick"));
6434
+ }));
6546
6435
  }, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.timelines = timelines, this.autoStop = !0;
6547
6436
  }
6548
6437
  init() {
@@ -6638,9 +6527,6 @@ class DefaultTicker extends EventEmitter {
6638
6527
  stop() {
6639
6528
  this.status = STATUS$1.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
6640
6529
  }
6641
- trySyncTickStatus() {
6642
- this.status === STATUS$1.RUNNING && this._handlerTick();
6643
- }
6644
6530
  }
6645
6531
 
6646
6532
  class ManualTickHandler {
@@ -7340,16 +7226,12 @@ class RafBasedSTO {
7340
7226
  }
7341
7227
  RafBasedSTO.TimeOut = 1e3 / 60;
7342
7228
  const rafBasedSto = new RafBasedSTO();
7343
- const _calculateLineHeight = (lineHeight, fontSize) => {
7229
+ const calculateLineHeight = (lineHeight, fontSize) => {
7344
7230
  if (isString$1(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
7345
7231
  return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
7346
7232
  }
7347
7233
  return lineHeight;
7348
7234
  };
7349
- const calculateLineHeight = (lineHeight, fontSize) => {
7350
- const _lh = _calculateLineHeight(lineHeight, fontSize);
7351
- return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
7352
- };
7353
7235
 
7354
7236
  class IncreaseCount extends ACustomAnimate {
7355
7237
  constructor(from, to, duration, easing, params) {
@@ -7786,7 +7668,7 @@ class TagPointsUpdate extends ACustomAnimate {
7786
7668
  lastMatchedIndex = i, lastMatchedPoint = tagMap.get(this.toPoints[i].context);
7787
7669
  break;
7788
7670
  }
7789
- "clip" === this.newPointAnimateType && 0 !== this.toPoints.length && (Number.isFinite(lastMatchedIndex) ? (this.clipRange = this.toPoints[lastMatchedIndex][this.clipRangeByDimension] / this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension], 1 === this.clipRange && (this.shrinkClipRange = this.toPoints[lastMatchedIndex][this.clipRangeByDimension] / this.fromPoints[this.fromPoints.length - 1][this.clipRangeByDimension]), isValidNumber$1(this.clipRange) ? this.clipRange = clamp$1(this.clipRange, 0, 1) : this.clipRange = 0) : this.clipRange = 0);
7671
+ "clip" === this.newPointAnimateType && 0 !== this.toPoints.length && (Number.isFinite(lastMatchedIndex) ? (this.clipRange = this.toPoints[lastMatchedIndex][this.clipRangeByDimension] / this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension], isValidNumber$1(this.clipRange) ? this.clipRange = clamp$1(this.clipRange, 0, 1) : this.clipRange = 0) : this.clipRange = 0);
7790
7672
  let prevMatchedPoint = this.toPoints[0];
7791
7673
  this.interpolatePoints = this.toPoints.map((point, index) => {
7792
7674
  const matchedPoint = tagMap.get(point.context);
@@ -7798,19 +7680,11 @@ class TagPointsUpdate extends ACustomAnimate {
7798
7680
  return newPoint.defined = toPoint.defined, newPoint.context = toPoint.context, newPoint;
7799
7681
  });
7800
7682
  }
7801
- onFirstRun() {
7802
- const lastClipRange = this.target.attribute.clipRange;
7803
- isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
7804
- }
7805
7683
  onUpdate(end, ratio, out) {
7806
7684
  if (this.points = this.points.map((point, index) => {
7807
7685
  const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
7808
7686
  return newPoint.context = point.context, newPoint;
7809
- }), this.clipRange) {
7810
- if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints, out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
7811
- out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
7812
- }
7813
- if (this.segmentsCache && this.to.segments) {
7687
+ }), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), this.segmentsCache && this.to.segments) {
7814
7688
  let start = 0;
7815
7689
  out.segments = this.to.segments.map((segment, index) => {
7816
7690
  const end = start + this.segmentsCache[index],
@@ -9226,7 +9100,7 @@ class ResourceLoader {
9226
9100
  }
9227
9101
  static GetFile(url, type) {
9228
9102
  let data = ResourceLoader.cache.get(url);
9229
- return data ? "init" === data.loadState || "fail" === data.loadState ? Promise.reject() : "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
9103
+ return data ? "fail" === data.loadState ? Promise.reject() : "init" === data.loadState || "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
9230
9104
  type: type,
9231
9105
  loadState: "init"
9232
9106
  }, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
@@ -12164,8 +12038,7 @@ class DefaultArcRenderContribution {
12164
12038
  x: originX = arcAttribute.x,
12165
12039
  y: originY = arcAttribute.y,
12166
12040
  scaleX = arcAttribute.scaleX,
12167
- scaleY = arcAttribute.scaleY,
12168
- keepStrokeScale = arcAttribute.keepStrokeScale
12041
+ scaleY = arcAttribute.scaleY
12169
12042
  } = arc.attribute;
12170
12043
  let {
12171
12044
  innerRadius = arcAttribute.innerRadius,
@@ -12177,7 +12050,7 @@ class DefaultArcRenderContribution {
12177
12050
  {
12178
12051
  distance = arcAttribute[key].distance
12179
12052
  } = borderStyle,
12180
- d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
12053
+ d = getScaledStroke(context, distance, context.dpr),
12181
12054
  deltaAngle = distance / outerRadius,
12182
12055
  sign = "outerBorder" === key ? 1 : -1;
12183
12056
  if (arc.setAttributes({
@@ -12222,15 +12095,14 @@ class DefaultCircleRenderContribution {
12222
12095
  x: originX = circleAttribute.x,
12223
12096
  y: originY = circleAttribute.y,
12224
12097
  scaleX = circleAttribute.scaleX,
12225
- scaleY = circleAttribute.scaleY,
12226
- keepStrokeScale = circleAttribute.keepStrokeScale
12098
+ scaleY = circleAttribute.scaleY
12227
12099
  } = circle.attribute,
12228
12100
  renderBorder = (borderStyle, key) => {
12229
12101
  const doStroke = !(!borderStyle || !borderStyle.stroke),
12230
12102
  {
12231
12103
  distance = circleAttribute[key].distance
12232
12104
  } = borderStyle,
12233
- d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
12105
+ d = getScaledStroke(context, distance, context.dpr),
12234
12106
  sign = "outerBorder" === key ? 1 : -1;
12235
12107
  if (context.beginPath(), context.arc(x, y, radius + sign * d, startAngle, endAngle), context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute), strokeCb) strokeCb(context, borderStyle, circleAttribute[key]);else if (doStroke) {
12236
12108
  const lastOpacity = circleAttribute[key].opacity;
@@ -12349,8 +12221,7 @@ class DefaultRectRenderContribution {
12349
12221
  scaleX = rectAttribute.scaleX,
12350
12222
  scaleY = rectAttribute.scaleY,
12351
12223
  x1: x1,
12352
- y1: y1,
12353
- keepStrokeScale = rectAttribute.keepStrokeScale
12224
+ y1: y1
12354
12225
  } = rect.attribute;
12355
12226
  let {
12356
12227
  width: width,
@@ -12363,7 +12234,7 @@ class DefaultRectRenderContribution {
12363
12234
  {
12364
12235
  distance = rectAttribute[key].distance
12365
12236
  } = borderStyle,
12366
- d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
12237
+ d = getScaledStroke(context, distance, context.dpr),
12367
12238
  nextX = x + sign * d,
12368
12239
  nextY = y + sign * d,
12369
12240
  dw = 2 * d;
@@ -12493,8 +12364,9 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
12493
12364
  constructor() {
12494
12365
  super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
12495
12366
  }
12496
- drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
12497
- return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
12367
+ drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
12368
+ if (!(image.isGifImage && image.renderFrame && image.playing)) return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
12369
+ image.renderFrame(context, x, y);
12498
12370
  }
12499
12371
  }
12500
12372
  const defaultImageRenderContribution = new DefaultImageRenderContribution();
@@ -12520,15 +12392,14 @@ class DefaultSymbolRenderContribution {
12520
12392
  x: originX = symbolAttribute.x,
12521
12393
  y: originY = symbolAttribute.y,
12522
12394
  scaleX = symbolAttribute.scaleX,
12523
- scaleY = symbolAttribute.scaleY,
12524
- keepStrokeScale = symbolAttribute.keepStrokeScale
12395
+ scaleY = symbolAttribute.scaleY
12525
12396
  } = symbol.attribute,
12526
12397
  renderBorder = (borderStyle, key) => {
12527
12398
  const doStroke = !(!borderStyle || !borderStyle.stroke),
12528
12399
  {
12529
12400
  distance = symbolAttribute[key].distance
12530
12401
  } = borderStyle,
12531
- d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
12402
+ d = getScaledStroke(context, distance, context.dpr),
12532
12403
  sign = "outerBorder" === key ? 1 : -1;
12533
12404
  if (context.beginPath(), !1 === parsedPath.drawOffset(context, size, x, y, sign * d) && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), strokeCb) strokeCb(context, borderStyle, symbolAttribute[key]);else if (doStroke) {
12534
12405
  const lastOpacity = symbolAttribute[key].opacity;
@@ -13806,8 +13677,16 @@ let DefaultCanvasTextRender = class extends BaseRender {
13806
13677
  verticalMode = textAttribute.verticalMode,
13807
13678
  x: originX = textAttribute.x,
13808
13679
  y: originY = textAttribute.y
13809
- } = text.attribute,
13810
- lineHeight = null !== (_a = calculateLineHeight(text.attribute.lineHeight, fontSize)) && void 0 !== _a ? _a : fontSize,
13680
+ } = text.attribute;
13681
+ let {
13682
+ textAlign = textAttribute.textAlign,
13683
+ textBaseline = textAttribute.textBaseline
13684
+ } = text.attribute;
13685
+ if (!verticalMode && "vertical" === direction) {
13686
+ const t = textAlign;
13687
+ textAlign = null !== (_a = text.getBaselineMapAlign()[textBaseline]) && void 0 !== _a ? _a : "left", textBaseline = null !== (_b = text.getAlignMapBaseline()[t]) && void 0 !== _b ? _b : "top";
13688
+ }
13689
+ const lineHeight = null !== (_c = calculateLineHeight(text.attribute.lineHeight, fontSize)) && void 0 !== _c ? _c : fontSize,
13811
13690
  data = this.valid(text, textAttribute, fillCb, strokeCb);
13812
13691
  if (!data) return;
13813
13692
  const {
@@ -13827,60 +13706,79 @@ let DefaultCanvasTextRender = class extends BaseRender {
13827
13706
  const matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
13828
13707
  matrix.rotateByCenter(Math.PI / 2, _x, _y), context.transformFromMatrix(matrix, !0), matrixAllocate.free(matrix);
13829
13708
  }
13830
- doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
13709
+ doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), this.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
13831
13710
  };
13832
- if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
13833
- const {
13834
- multilineLayout: multilineLayout
13835
- } = text;
13836
- if (!multilineLayout) return void context.highPerformanceRestore();
13837
- const {
13838
- xOffset: xOffset,
13839
- yOffset: yOffset
13840
- } = multilineLayout.bbox;
13841
- doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(line => {
13842
- context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
13843
- }))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(line => {
13844
- context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z), 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, {
13845
- width: line.width
13711
+ if (text.isMultiLine) {
13712
+ if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
13713
+ const {
13714
+ multilineLayout: multilineLayout
13715
+ } = text;
13716
+ if (!multilineLayout) return void context.highPerformanceRestore();
13717
+ const {
13718
+ xOffset: xOffset,
13719
+ yOffset: yOffset
13720
+ } = multilineLayout.bbox;
13721
+ doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(line => {
13722
+ context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
13723
+ }))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(line => {
13724
+ context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z), this.drawUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y - textDrawOffsetY("bottom", fontSize) - .05 * fontSize, z, textAttribute, context, {
13725
+ width: line.width
13726
+ });
13727
+ })));
13728
+ } else {
13729
+ text.tryUpdateAABBBounds();
13730
+ const cache = text.cache,
13731
+ {
13732
+ verticalList: verticalList
13733
+ } = cache;
13734
+ context.textAlign = "left", context.textBaseline = "top";
13735
+ const totalHeight = lineHeight * verticalList.length;
13736
+ let totalW = 0;
13737
+ verticalList.forEach(verticalData => {
13738
+ const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
13739
+ totalW = max(_w, totalW);
13740
+ });
13741
+ let offsetY = 0,
13742
+ offsetX = 0;
13743
+ "bottom" === textBaseline ? offsetX = -totalHeight : "middle" === textBaseline && (offsetX = -totalHeight / 2), "center" === textAlign ? offsetY -= totalW / 2 : "right" === textAlign && (offsetY -= totalW), verticalList.forEach((verticalData, i) => {
13744
+ const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0),
13745
+ dw = totalW - currentW;
13746
+ let currentOffsetY = offsetY;
13747
+ "center" === textAlign ? currentOffsetY += dw / 2 : "right" === textAlign && (currentOffsetY += dw), verticalData.forEach(item => {
13748
+ const {
13749
+ text: text,
13750
+ width: width,
13751
+ direction: direction
13752
+ } = item;
13753
+ drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction), currentOffsetY += width;
13754
+ });
13846
13755
  });
13847
- })));
13848
- } else {
13849
- let {
13850
- textAlign = textAttribute.textAlign,
13851
- textBaseline = textAttribute.textBaseline
13852
- } = text.attribute;
13853
- if (!verticalMode) {
13854
- const t = textAlign;
13855
- textAlign = null !== (_b = text.getBaselineMapAlign()[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = text.getAlignMapBaseline()[t]) && void 0 !== _c ? _c : "top";
13856
13756
  }
13757
+ } else if ("horizontal" === direction) {
13758
+ context.setTextStyle(text.attribute, textAttribute, z);
13759
+ const t = text.clipedText;
13760
+ let dy = 0;
13761
+ lineHeight !== fontSize && ("top" === textBaseline ? dy = (lineHeight - fontSize) / 2 : "middle" === textBaseline || "bottom" === textBaseline && (dy = -(lineHeight - fontSize) / 2)), drawText(t, 0, dy, 0);
13762
+ } else {
13857
13763
  text.tryUpdateAABBBounds();
13858
- const cache = text.cache,
13859
- {
13764
+ const cache = text.cache;
13765
+ if (cache) {
13766
+ context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
13767
+ const {
13860
13768
  verticalList: verticalList
13861
13769
  } = cache;
13862
- context.textAlign = "left", context.textBaseline = "top";
13863
- const totalHeight = lineHeight * verticalList.length;
13864
- let totalW = 0;
13865
- verticalList.forEach(verticalData => {
13866
- const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
13867
- totalW = max(_w, totalW);
13868
- });
13869
- let offsetY = 0,
13870
- offsetX = 0;
13871
- "bottom" === textBaseline ? offsetX = -totalHeight : "middle" === textBaseline && (offsetX = -totalHeight / 2), "center" === textAlign ? offsetY -= totalW / 2 : "right" === textAlign && (offsetY -= totalW), verticalList.forEach((verticalData, i) => {
13872
- const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0),
13873
- dw = totalW - currentW;
13874
- let currentOffsetY = offsetY;
13875
- "center" === textAlign ? currentOffsetY += dw / 2 : "right" === textAlign && (currentOffsetY += dw), verticalData.forEach(item => {
13770
+ let offsetY = 0;
13771
+ const totalW = verticalList[0].reduce((a, b) => a + (b.width || 0), 0);
13772
+ let offsetX = 0;
13773
+ "bottom" === textBaseline ? offsetX = -lineHeight : "middle" === textBaseline && (offsetX = -lineHeight / 2), "center" === textAlign ? offsetY -= totalW / 2 : "right" === textAlign && (offsetY -= totalW), context.textAlign = "left", context.textBaseline = "top", verticalList[0].forEach(item => {
13876
13774
  const {
13877
13775
  text: text,
13878
13776
  width: width,
13879
13777
  direction: direction
13880
13778
  } = item;
13881
- drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction), currentOffsetY += width;
13779
+ drawText(text, offsetX, offsetY, direction), offsetY += width;
13882
13780
  });
13883
- });
13781
+ }
13884
13782
  }
13885
13783
  transform3dMatrixToContextMatrix && this.restoreTransformUseContext2d(text, textAttribute, z, context), this.afterRenderStep(text, context, x, y, doFill, doStroke, fVisible, sVisible, textAttribute, drawContext, fillCb, strokeCb);
13886
13784
  }
@@ -13892,10 +13790,12 @@ let DefaultCanvasTextRender = class extends BaseRender {
13892
13790
  computed3dMatrix = !keepDirIn3d;
13893
13791
  this._draw(text, textAttribute, computed3dMatrix, drawContext, params);
13894
13792
  }
13895
- drawUnderLine(underline, lineThrough, text, anchorX, anchorY, offsetUnderLineY, offsetThroughLineY, z, textAttribute, context, multiOption) {
13793
+ drawUnderLine(underline, lineThrough, text, x, y, z, textAttribute, context, multiOption) {
13896
13794
  if (lineThrough + underline <= 0) return;
13897
13795
  const {
13898
13796
  textAlign = textAttribute.textAlign,
13797
+ textBaseline = textAttribute.textBaseline,
13798
+ fontSize = textAttribute.fontSize,
13899
13799
  fill = textAttribute.fill,
13900
13800
  opacity = textAttribute.opacity,
13901
13801
  underlineOffset = textAttribute.underlineOffset,
@@ -13905,21 +13805,23 @@ let DefaultCanvasTextRender = class extends BaseRender {
13905
13805
  isMulti = !isNil$1(multiOption),
13906
13806
  w = isMulti ? multiOption.width : text.clipedWidth,
13907
13807
  offsetX = isMulti ? 0 : textDrawOffsetX(textAlign, w),
13808
+ offsetY = textLayoutOffsetY(isMulti ? "alphabetic" : textBaseline, fontSize, fontSize),
13908
13809
  attribute = {
13909
13810
  lineWidth: 0,
13910
13811
  stroke: fill,
13911
13812
  opacity: opacity,
13912
13813
  strokeOpacity: fillOpacity
13913
13814
  };
13815
+ let deltaY = isMulti ? -3 : 0;
13914
13816
  if (underline) {
13915
- attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, anchorX, anchorY, textAttribute), underlineDash && context.setLineDash(underlineDash), context.beginPath();
13916
- const dy = anchorY + offsetUnderLineY + underlineOffset;
13917
- context.moveTo(anchorX + offsetX, dy, z), context.lineTo(anchorX + offsetX + w, dy, z), context.stroke();
13817
+ attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), underlineDash && context.setLineDash(underlineDash), context.beginPath();
13818
+ const dy = y + offsetY + fontSize + underlineOffset + deltaY;
13819
+ context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
13918
13820
  }
13919
- if (lineThrough) {
13920
- attribute.lineWidth = lineThrough, context.setStrokeStyle(text, attribute, anchorX, anchorY, textAttribute), context.beginPath();
13921
- const dy = anchorY + offsetThroughLineY;
13922
- context.moveTo(anchorX + offsetX, dy, z), context.lineTo(anchorX + offsetX + w, dy, z), context.stroke();
13821
+ if (isMulti && (deltaY = -1), lineThrough) {
13822
+ attribute.lineWidth = lineThrough, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
13823
+ const dy = y + offsetY + fontSize / 2 + deltaY;
13824
+ context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
13923
13825
  }
13924
13826
  }
13925
13827
  };
@@ -14214,10 +14116,12 @@ let DefaultCanvasImageRender = class extends BaseRender {
14214
14116
  const {
14215
14117
  image: url
14216
14118
  } = image.attribute;
14217
- if (!url || !image.resources) return;
14218
- const res = image.resources.get(url);
14219
- if ("loading" === res.state && isString$1(url)) return void ResourceLoader.improveImageLoading(url);
14220
- if ("success" !== res.state) return;
14119
+ if (!image.isGifImage) {
14120
+ if (!url || !image.resources) return;
14121
+ const res = image.resources.get(url);
14122
+ if ("loading" === res.state && isString$1(url)) return void ResourceLoader.improveImageLoading(url);
14123
+ if ("success" !== res.state) return;
14124
+ }
14221
14125
  const {
14222
14126
  context: context
14223
14127
  } = renderService.drawParams;
@@ -14602,59 +14506,58 @@ class CanvasTextLayout {
14602
14506
  constructor(fontFamily, options, textMeasure) {
14603
14507
  this.fontFamily = fontFamily, this.textOptions = options, this.textMeasure = textMeasure;
14604
14508
  }
14605
- LayoutBBox(bbox, textAlign, textBaseline, linesLayout) {
14606
- if (bbox.xOffset = "left" === textAlign || "start" === textAlign ? 0 : "center" === textAlign ? bbox.width / -2 : "right" === textAlign || "end" === textAlign ? -bbox.width : 0, "top" === textBaseline) bbox.yOffset = 0;else if ("middle" === textBaseline) bbox.yOffset = bbox.height / -2;else if ("alphabetic" === textBaseline) {
14607
- let percent = .79;
14608
- if (1 === linesLayout.length) {
14609
- const lineInfo = linesLayout[0];
14610
- percent = lineInfo.ascent / (lineInfo.ascent + lineInfo.descent);
14611
- }
14612
- bbox.yOffset = bbox.height * -percent;
14613
- } else bbox.yOffset = -bbox.height;
14614
- return bbox;
14509
+ LayoutBBox(bbox, textAlign, textBaseline) {
14510
+ if ("left" === textAlign || "start" === textAlign) bbox.xOffset = 0;else if ("center" === textAlign) bbox.xOffset = bbox.width / -2;else {
14511
+ if ("right" !== textAlign && "end" !== textAlign) throw new Error("非法的textAlign");
14512
+ bbox.xOffset = -bbox.width;
14513
+ }
14514
+ return bbox.yOffset = "top" === textBaseline ? 0 : "middle" === textBaseline ? bbox.height / -2 : "alphabetic" === textBaseline ? -.79 * bbox.height : -bbox.height, bbox;
14515
+ }
14516
+ GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, suffixPosition) {
14517
+ const linesLayout = [],
14518
+ bboxWH = [width, height],
14519
+ bboxOffset = [0, 0];
14520
+ for (; str.length > 0;) {
14521
+ const {
14522
+ str: clipText
14523
+ } = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak, suffixPosition);
14524
+ linesLayout.push({
14525
+ str: clipText,
14526
+ width: this.textMeasure.measureTextWidth(clipText, this.textOptions)
14527
+ }), str = str.substring(clipText.length);
14528
+ }
14529
+ "left" === textAlign || "start" === textAlign || ("center" === textAlign ? bboxOffset[0] = bboxWH[0] / -2 : "right" !== textAlign && "end" !== textAlign || (bboxOffset[0] = -bboxWH[0])), "top" === textBaseline || ("middle" === textBaseline ? bboxOffset[1] = bboxWH[1] / -2 : "bottom" === textBaseline && (bboxOffset[1] = -bboxWH[1]));
14530
+ const bbox = {
14531
+ xOffset: bboxOffset[0],
14532
+ yOffset: bboxOffset[1],
14533
+ width: bboxWH[0],
14534
+ height: bboxWH[1]
14535
+ };
14536
+ return this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
14615
14537
  }
14616
14538
  GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
14617
14539
  let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
14618
14540
  let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
14619
- let params = arguments.length > 6 ? arguments[6] : undefined;
14620
- const {
14621
- lineWidth: lineWidth,
14622
- suffixPosition = "end",
14623
- measureMode = MeasureModeEnum.actualBounding,
14624
- keepCenterInLine = !1
14625
- } = null != params ? params : {};
14541
+ let lineWidth = arguments.length > 6 ? arguments[6] : undefined;
14542
+ let suffixPosition = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "end";
14626
14543
  lines = lines.map(l => l.toString());
14627
14544
  const linesLayout = [],
14628
14545
  bboxWH = [0, 0];
14629
14546
  if ("number" == typeof lineWidth && lineWidth !== 1 / 0) {
14630
14547
  let width;
14631
- for (let i = 0, len = lines.length; i < len; i++) {
14632
- const metrics = this.textMeasure.measureTextPixelADscentAndWidth(lines[i], this.textOptions, measureMode);
14633
- width = Math.min(metrics.width, lineWidth), linesLayout.push({
14634
- str: metrics.width <= lineWidth ? lines[i].toString() : this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
14635
- width: width,
14636
- ascent: metrics.ascent,
14637
- descent: metrics.descent,
14638
- keepCenterInLine: keepCenterInLine
14639
- });
14640
- }
14548
+ for (let i = 0, len = lines.length; i < len; i++) width = Math.min(this.textMeasure.measureTextWidth(lines[i], this.textOptions), lineWidth), linesLayout.push({
14549
+ str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
14550
+ width: width
14551
+ });
14641
14552
  bboxWH[0] = lineWidth;
14642
14553
  } else {
14643
- let width,
14644
- text,
14645
- _lineWidth = 0;
14646
- for (let i = 0, len = lines.length; i < len; i++) {
14647
- text = lines[i];
14648
- const metrics = this.textMeasure.measureTextPixelADscentAndWidth(lines[i], this.textOptions, measureMode);
14649
- width = metrics.width, _lineWidth = Math.max(_lineWidth, width), linesLayout.push({
14650
- str: text,
14651
- width: width,
14652
- ascent: metrics.ascent,
14653
- descent: metrics.descent,
14654
- keepCenterInLine: keepCenterInLine
14655
- });
14656
- }
14657
- bboxWH[0] = _lineWidth;
14554
+ let width, text;
14555
+ lineWidth = 0;
14556
+ for (let i = 0, len = lines.length; i < len; i++) text = lines[i], width = this.textMeasure.measureTextWidth(text, this.textOptions), lineWidth = Math.max(lineWidth, width), linesLayout.push({
14557
+ str: text,
14558
+ width: width
14559
+ });
14560
+ bboxWH[0] = lineWidth;
14658
14561
  }
14659
14562
  bboxWH[1] = linesLayout.length * lineHeight, bboxWH[0] = linesLayout.reduce((a, b) => Math.max(a, b.width), 0);
14660
14563
  const bbox = {
@@ -14663,7 +14566,7 @@ class CanvasTextLayout {
14663
14566
  width: bboxWH[0],
14664
14567
  height: bboxWH[1]
14665
14568
  };
14666
- return this.LayoutBBox(bbox, textAlign, textBaseline, linesLayout), this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
14569
+ return this.LayoutBBox(bbox, textAlign, textBaseline), this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
14667
14570
  }
14668
14571
  layoutWithBBox(bbox, lines, textAlign, textBaseline, lineHeight) {
14669
14572
  const origin = [0, 0],
@@ -14682,19 +14585,11 @@ class CanvasTextLayout {
14682
14585
  };
14683
14586
  }
14684
14587
  lineOffset(bbox, line, textAlign, textBaseline, lineHeight, origin) {
14685
- if ("left" === textAlign || "start" === textAlign ? line.leftOffset = 0 : "center" === textAlign ? line.leftOffset = (bbox.width - line.width) / 2 : "right" !== textAlign && "end" !== textAlign || (line.leftOffset = bbox.width - line.width), line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 + origin[1], !line.keepCenterInLine) {
14686
- const buf = 0,
14687
- actualHeightWithBuf = line.ascent + line.descent + buf;
14688
- if (actualHeightWithBuf < lineHeight - buf && ("bottom" === textBaseline ? line.topOffset += (lineHeight - actualHeightWithBuf) / 2 : "top" === textBaseline && (line.topOffset -= (lineHeight - actualHeightWithBuf) / 2)), "alphabetic" === textBaseline) {
14689
- const ratio = lineHeight / (line.ascent + line.descent);
14690
- line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 * ratio + origin[1];
14691
- }
14692
- }
14693
- return origin[1] += lineHeight, line;
14588
+ return "left" === textAlign || "start" === textAlign ? line.leftOffset = 0 : "center" === textAlign ? line.leftOffset = (bbox.width - line.width) / 2 : "right" !== textAlign && "end" !== textAlign || (line.leftOffset = bbox.width - line.width), line.topOffset = (lineHeight - this.textOptions.fontSize) / 2 + .79 * this.textOptions.fontSize + origin[1], origin[1] += lineHeight, line;
14694
14589
  }
14695
14590
  }
14696
14591
 
14697
- const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "maxWidth", "textAlign", "textBaseline", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...GRAPHIC_UPDATE_TAG_KEY];
14592
+ const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "textAlign", "textBaseline", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...GRAPHIC_UPDATE_TAG_KEY];
14698
14593
  class Text extends Graphic {
14699
14594
  get font() {
14700
14595
  const textTheme = this.getGraphicTheme();
@@ -14703,22 +14598,26 @@ class Text extends Graphic {
14703
14598
  get clipedText() {
14704
14599
  var _a;
14705
14600
  const attribute = this.attribute,
14706
- textTheme = this.getGraphicTheme(),
14707
- maxWidth = this.getMaxWidth(textTheme);
14708
- return Number.isFinite(maxWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
14601
+ textTheme = this.getGraphicTheme();
14602
+ if (!this.isSimplify()) return;
14603
+ const {
14604
+ maxLineWidth = textTheme.maxLineWidth
14605
+ } = attribute;
14606
+ return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
14709
14607
  }
14710
14608
  get clipedWidth() {
14711
- return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
14609
+ if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
14712
14610
  }
14713
14611
  get cliped() {
14714
14612
  var _a, _b;
14715
14613
  const textTheme = this.getGraphicTheme(),
14716
14614
  attribute = this.attribute,
14717
- maxWidth = this.getMaxWidth(textTheme);
14718
- if (!Number.isFinite(maxWidth)) return !1;
14719
- const {
14720
- text: text
14721
- } = this.attribute;
14615
+ {
14616
+ maxLineWidth = textTheme.maxLineWidth,
14617
+ text: text,
14618
+ whiteSpace = textTheme.whiteSpace
14619
+ } = attribute;
14620
+ if (!Number.isFinite(maxLineWidth)) return !1;
14722
14621
  if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
14723
14622
  let mergedText = "";
14724
14623
  this.cache.layoutData.lines.forEach(item => {
@@ -14729,7 +14628,10 @@ class Text extends Graphic {
14729
14628
  return "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(item => item.text).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString();
14730
14629
  }
14731
14630
  get multilineLayout() {
14732
- return this.tryUpdateAABBBounds(), this.cache.layoutData;
14631
+ if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
14632
+ }
14633
+ isSimplify() {
14634
+ return !this.isMultiLine && "vertical" !== this.attribute.direction;
14733
14635
  }
14734
14636
  get isMultiLine() {
14735
14637
  return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
@@ -14802,74 +14704,8 @@ class Text extends Graphic {
14802
14704
  }
14803
14705
  return application.graphicService.combindShadowAABBBounds(aabbBounds, this), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds), transformBoundsWithMatrix(aabbBounds, aabbBounds, this.transMatrix), aabbBounds;
14804
14706
  }
14805
- updateSingallineAABBBounds(text) {
14806
- this.updateMultilineAABBBounds([text]);
14807
- const layoutData = this.cache.layoutData;
14808
- if (layoutData && layoutData.lines && layoutData.lines.length) {
14809
- const line = layoutData.lines[0];
14810
- this.cache.clipedText = line.str, this.cache.clipedWidth = line.width;
14811
- }
14812
- return this._AABBBounds;
14813
- }
14814
- updateMultilineAABBBounds(text) {
14815
- const textTheme = this.getGraphicTheme(),
14816
- {
14817
- direction = textTheme.direction,
14818
- underlineOffset = textTheme.underlineOffset
14819
- } = this.attribute,
14820
- b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
14821
- return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
14822
- }
14823
- guessLineHeightBuf(fontSize) {
14824
- return fontSize ? .1 * fontSize : 0;
14825
- }
14826
- updateHorizontalMultilineAABBBounds(text) {
14827
- var _a;
14828
- const textTheme = this.getGraphicTheme(),
14829
- attribute = this.attribute,
14830
- {
14831
- fontFamily = textTheme.fontFamily,
14832
- textAlign = textTheme.textAlign,
14833
- textBaseline = textTheme.textBaseline,
14834
- fontSize = textTheme.fontSize,
14835
- fontWeight = textTheme.fontWeight,
14836
- ellipsis = textTheme.ellipsis,
14837
- maxLineWidth: maxLineWidth,
14838
- stroke = textTheme.stroke,
14839
- wrap = textTheme.wrap,
14840
- measureMode = textTheme.measureMode,
14841
- lineWidth = textTheme.lineWidth,
14842
- whiteSpace = textTheme.whiteSpace,
14843
- suffixPosition = textTheme.suffixPosition,
14844
- ignoreBuf = textTheme.ignoreBuf,
14845
- keepCenterInLine = textTheme.keepCenterInLine
14846
- } = attribute,
14847
- buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize),
14848
- lineHeight = this.getLineHeight(attribute, textTheme, buf);
14849
- if ("normal" === whiteSpace || wrap) return this.updateWrapAABBBounds(text);
14850
- if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
14851
- const bbox = this.cache.layoutData.bbox;
14852
- return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14853
- }
14854
- const textMeasure = application.graphicUtil.textMeasure,
14855
- layoutData = new CanvasTextLayout(fontFamily, {
14856
- fontSize: fontSize,
14857
- fontWeight: fontWeight,
14858
- fontFamily: fontFamily,
14859
- lineHeight: lineHeight
14860
- }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, {
14861
- lineWidth: maxLineWidth,
14862
- suffixPosition: suffixPosition,
14863
- measureMode: measureMode,
14864
- keepCenterInLine: keepCenterInLine
14865
- }),
14866
- {
14867
- bbox: bbox
14868
- } = layoutData;
14869
- return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14870
- }
14871
14707
  updateWrapAABBBounds(text) {
14872
- var _a, _b, _c;
14708
+ var _a, _b, _c, _d;
14873
14709
  const textTheme = this.getGraphicTheme(),
14874
14710
  {
14875
14711
  fontFamily = textTheme.fontFamily,
@@ -14883,26 +14719,22 @@ class Text extends Graphic {
14883
14719
  wordBreak = textTheme.wordBreak,
14884
14720
  fontWeight = textTheme.fontWeight,
14885
14721
  ignoreBuf = textTheme.ignoreBuf,
14886
- measureMode = textTheme.measureMode,
14887
14722
  suffixPosition = textTheme.suffixPosition,
14888
14723
  heightLimit = 0,
14889
- lineClamp: lineClamp,
14890
- keepCenterInLine = textTheme.keepCenterInLine
14724
+ lineClamp: lineClamp
14891
14725
  } = this.attribute,
14892
- buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize),
14893
- lineHeight = this.getLineHeight(this.attribute, textTheme, buf);
14894
- if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
14726
+ lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
14727
+ buf = ignoreBuf ? 0 : 2;
14728
+ if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
14895
14729
  const bbox = this.cache.layoutData.bbox;
14896
14730
  return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14897
14731
  }
14898
14732
  const textMeasure = application.graphicUtil.textMeasure,
14899
- textOptions = {
14733
+ layoutObj = new CanvasTextLayout(fontFamily, {
14900
14734
  fontSize: fontSize,
14901
14735
  fontWeight: fontWeight,
14902
- fontFamily: fontFamily,
14903
- lineHeight: lineHeight
14904
- },
14905
- layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure),
14736
+ fontFamily: fontFamily
14737
+ }, textMeasure),
14906
14738
  lines = isArray$1(text) ? text.map(l => l.toString()) : [text.toString()],
14907
14739
  linesLayout = [],
14908
14740
  bboxWH = [0, 0];
@@ -14912,37 +14744,29 @@ class Text extends Graphic {
14912
14744
  const str = lines[i];
14913
14745
  let needCut = !0;
14914
14746
  if (i === lineCountLimit - 1) {
14915
- const clip = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1),
14916
- matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
14747
+ const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1);
14917
14748
  linesLayout.push({
14918
14749
  str: clip.str,
14919
- width: clip.width,
14920
- ascent: matrics.ascent,
14921
- descent: matrics.descent,
14922
- keepCenterInLine: keepCenterInLine
14750
+ width: clip.width
14923
14751
  });
14924
14752
  break;
14925
14753
  }
14926
- const clip = textMeasure.clipText(str, textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
14754
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
14927
14755
  if ("" !== str && "" === clip.str || clip.wordBreaked) {
14928
14756
  if (ellipsis) {
14929
- const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
14930
- clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
14757
+ const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
14758
+ clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
14931
14759
  } else clip.str = "", clip.width = 0;
14932
14760
  needCut = !1;
14933
14761
  }
14934
- const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
14935
14762
  linesLayout.push({
14936
14763
  str: clip.str,
14937
- width: clip.width,
14938
- ascent: matrics.ascent,
14939
- descent: matrics.descent,
14940
- keepCenterInLine: keepCenterInLine
14764
+ width: clip.width
14941
14765
  });
14942
14766
  let cutLength = clip.str.length;
14943
14767
  if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
14944
- const newStr = str.substring(cutLength);
14945
- lines.splice(i + 1, 0, newStr);
14768
+ let newStr = str.substring(cutLength);
14769
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
14946
14770
  }
14947
14771
  }
14948
14772
  let maxWidth = 0;
@@ -14955,46 +14779,235 @@ class Text extends Graphic {
14955
14779
  lineWidth = 0;
14956
14780
  for (let i = 0, len = lines.length; i < len; i++) {
14957
14781
  if (i === lineCountLimit - 1) {
14958
- const clip = textMeasure.clipTextWithSuffix(lines[i], textOptions, maxLineWidth, ellipsis, !1, suffixPosition),
14959
- matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
14782
+ const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
14960
14783
  linesLayout.push({
14961
14784
  str: clip.str,
14962
- width: clip.width,
14963
- ascent: matrics.ascent,
14964
- descent: matrics.descent,
14965
- keepCenterInLine: keepCenterInLine
14785
+ width: clip.width
14966
14786
  }), lineWidth = Math.max(lineWidth, clip.width);
14967
14787
  break;
14968
14788
  }
14969
- text = lines[i], width = textMeasure.measureTextWidth(text, textOptions), lineWidth = Math.max(lineWidth, width);
14970
- const matrics = textMeasure.measureTextPixelADscentAndWidth(text, textOptions, measureMode);
14971
- linesLayout.push({
14789
+ text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
14972
14790
  str: text,
14973
- width: width,
14974
- ascent: matrics.ascent,
14975
- descent: matrics.descent,
14976
- keepCenterInLine: keepCenterInLine
14791
+ width: width
14977
14792
  });
14978
14793
  }
14979
14794
  bboxWH[0] = lineWidth;
14980
14795
  }
14981
- bboxWH[1] = linesLayout.length * lineHeight;
14796
+ bboxWH[1] = linesLayout.length * (lineHeight + buf);
14982
14797
  const bbox = {
14983
14798
  xOffset: 0,
14984
14799
  yOffset: 0,
14985
14800
  width: bboxWH[0],
14986
14801
  height: bboxWH[1]
14987
14802
  };
14988
- layoutObj.LayoutBBox(bbox, textAlign, textBaseline, linesLayout);
14803
+ layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
14989
14804
  const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
14990
14805
  return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14991
14806
  }
14992
- updateVerticalMultilineAABBBounds(text) {
14807
+ updateSingallineAABBBounds(text) {
14808
+ const textTheme = this.getGraphicTheme(),
14809
+ {
14810
+ direction = textTheme.direction,
14811
+ underlineOffset = textTheme.underlineOffset
14812
+ } = this.attribute,
14813
+ b = "horizontal" === direction ? this.updateHorizontalSinglelineAABBBounds(text) : this.updateVerticalSinglelineAABBBounds(text);
14814
+ return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
14815
+ }
14816
+ updateMultilineAABBBounds(text) {
14817
+ const textTheme = this.getGraphicTheme(),
14818
+ {
14819
+ direction = textTheme.direction,
14820
+ underlineOffset = textTheme.underlineOffset
14821
+ } = this.attribute,
14822
+ b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
14823
+ return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
14824
+ }
14825
+ updateHorizontalSinglelineAABBBounds(text) {
14993
14826
  var _a, _b;
14827
+ const textTheme = this.getGraphicTheme(),
14828
+ {
14829
+ wrap = textTheme.wrap
14830
+ } = this.attribute;
14831
+ if (wrap) return this.updateWrapAABBBounds([text]);
14832
+ const textMeasure = application.graphicUtil.textMeasure;
14833
+ let width, str;
14834
+ const attribute = this.attribute,
14835
+ {
14836
+ maxLineWidth = textTheme.maxLineWidth,
14837
+ ellipsis = textTheme.ellipsis,
14838
+ textAlign = textTheme.textAlign,
14839
+ textBaseline = textTheme.textBaseline,
14840
+ fontFamily = textTheme.fontFamily,
14841
+ fontSize = textTheme.fontSize,
14842
+ fontWeight = textTheme.fontWeight,
14843
+ stroke = textTheme.stroke,
14844
+ lineWidth = textTheme.lineWidth,
14845
+ ignoreBuf = textTheme.ignoreBuf,
14846
+ whiteSpace = textTheme.whiteSpace,
14847
+ suffixPosition = textTheme.suffixPosition
14848
+ } = attribute;
14849
+ if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
14850
+ const buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
14851
+ textFontSize = attribute.fontSize || textTheme.fontSize,
14852
+ lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, textFontSize)) && void 0 !== _a ? _a : textFontSize + buf;
14853
+ if (!this.shouldUpdateShape() && this.cache) {
14854
+ width = null !== (_b = this.cache.clipedWidth) && void 0 !== _b ? _b : 0;
14855
+ const dx = textDrawOffsetX(textAlign, width),
14856
+ dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
14857
+ return this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14858
+ }
14859
+ if (Number.isFinite(maxLineWidth)) {
14860
+ if (ellipsis) {
14861
+ const strEllipsis = !0 === ellipsis ? textTheme.ellipsis : ellipsis,
14862
+ data = textMeasure.clipTextWithSuffix(text.toString(), {
14863
+ fontSize: fontSize,
14864
+ fontWeight: fontWeight,
14865
+ fontFamily: fontFamily
14866
+ }, maxLineWidth, strEllipsis, !1, suffixPosition);
14867
+ str = data.str, width = data.width;
14868
+ } else {
14869
+ const data = textMeasure.clipText(text.toString(), {
14870
+ fontSize: fontSize,
14871
+ fontWeight: fontWeight,
14872
+ fontFamily: fontFamily
14873
+ }, maxLineWidth, !1);
14874
+ str = data.str, width = data.width;
14875
+ }
14876
+ this.cache.clipedText = str, this.cache.clipedWidth = width;
14877
+ } else width = textMeasure.measureTextWidth(text.toString(), {
14878
+ fontSize: fontSize,
14879
+ fontWeight: fontWeight,
14880
+ fontFamily: fontFamily
14881
+ }), this.cache.clipedText = text.toString(), this.cache.clipedWidth = width;
14882
+ this.clearUpdateShapeTag();
14883
+ const dx = textDrawOffsetX(textAlign, width);
14884
+ let lh = lineHeight;
14885
+ application.global && application.global.isSafari() && (lh += .2 * fontSize);
14886
+ const dy = textLayoutOffsetY(textBaseline, lh, fontSize, buf);
14887
+ return this._AABBBounds.set(dx, dy, dx + width, dy + lh), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14888
+ }
14889
+ getBaselineMapAlign() {
14890
+ return Text.baselineMapAlign;
14891
+ }
14892
+ getAlignMapBaseline() {
14893
+ return Text.alignMapBaseline;
14894
+ }
14895
+ updateVerticalSinglelineAABBBounds(text) {
14896
+ var _a, _b, _c;
14994
14897
  const textTheme = this.getGraphicTheme(),
14995
14898
  textMeasure = application.graphicUtil.textMeasure;
14996
14899
  let width;
14997
14900
  const attribute = this.attribute,
14901
+ {
14902
+ ignoreBuf = textTheme.ignoreBuf
14903
+ } = attribute,
14904
+ buf = ignoreBuf ? 0 : 2,
14905
+ {
14906
+ maxLineWidth = textTheme.maxLineWidth,
14907
+ ellipsis = textTheme.ellipsis,
14908
+ fontSize = textTheme.fontSize,
14909
+ fontWeight = textTheme.fontWeight,
14910
+ fontFamily = textTheme.fontFamily,
14911
+ stroke = textTheme.stroke,
14912
+ lineWidth = textTheme.lineWidth,
14913
+ verticalMode = textTheme.verticalMode,
14914
+ suffixPosition = textTheme.suffixPosition
14915
+ } = attribute,
14916
+ lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
14917
+ let {
14918
+ textAlign = textTheme.textAlign,
14919
+ textBaseline = textTheme.textBaseline
14920
+ } = attribute;
14921
+ if (!verticalMode) {
14922
+ const t = textAlign;
14923
+ textAlign = null !== (_b = Text.baselineMapAlign[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = Text.alignMapBaseline[t]) && void 0 !== _c ? _c : "top";
14924
+ }
14925
+ if (!this.shouldUpdateShape() && this.cache) {
14926
+ width = this.cache.clipedWidth;
14927
+ const dx = textDrawOffsetX(textAlign, width),
14928
+ dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
14929
+ return this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14930
+ }
14931
+ let verticalList = [verticalLayout(text.toString())];
14932
+ if (Number.isFinite(maxLineWidth)) {
14933
+ if (ellipsis) {
14934
+ const strEllipsis = !0 === ellipsis ? textTheme.ellipsis : ellipsis,
14935
+ data = textMeasure.clipTextWithSuffixVertical(verticalList[0], {
14936
+ fontSize: fontSize,
14937
+ fontWeight: fontWeight,
14938
+ fontFamily: fontFamily
14939
+ }, maxLineWidth, strEllipsis, !1, suffixPosition);
14940
+ verticalList = [data.verticalList], width = data.width;
14941
+ } else {
14942
+ const data = textMeasure.clipTextVertical(verticalList[0], {
14943
+ fontSize: fontSize,
14944
+ fontWeight: fontWeight,
14945
+ fontFamily: fontFamily
14946
+ }, maxLineWidth, !1);
14947
+ verticalList = [data.verticalList], width = data.width;
14948
+ }
14949
+ this.cache.verticalList = verticalList, this.cache.clipedWidth = width;
14950
+ } else width = 0, verticalList[0].forEach(t => {
14951
+ const w = t.direction === TextDirection.HORIZONTAL ? fontSize : textMeasure.measureTextWidth(t.text, {
14952
+ fontSize: fontSize,
14953
+ fontWeight: fontWeight,
14954
+ fontFamily: fontFamily
14955
+ });
14956
+ width += w, t.width = w;
14957
+ }), this.cache.verticalList = verticalList, this.cache.clipedWidth = width;
14958
+ this.clearUpdateShapeTag();
14959
+ const dx = textDrawOffsetX(textAlign, width),
14960
+ dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
14961
+ return this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14962
+ }
14963
+ updateHorizontalMultilineAABBBounds(text) {
14964
+ var _a, _b;
14965
+ const textTheme = this.getGraphicTheme(),
14966
+ {
14967
+ wrap = textTheme.wrap
14968
+ } = this.attribute;
14969
+ if (wrap) return this.updateWrapAABBBounds(text);
14970
+ const attribute = this.attribute,
14971
+ {
14972
+ fontFamily = textTheme.fontFamily,
14973
+ textAlign = textTheme.textAlign,
14974
+ textBaseline = textTheme.textBaseline,
14975
+ fontSize = textTheme.fontSize,
14976
+ fontWeight = textTheme.fontWeight,
14977
+ ellipsis = textTheme.ellipsis,
14978
+ maxLineWidth: maxLineWidth,
14979
+ stroke = textTheme.stroke,
14980
+ lineWidth = textTheme.lineWidth,
14981
+ whiteSpace = textTheme.whiteSpace,
14982
+ suffixPosition = textTheme.suffixPosition
14983
+ } = attribute,
14984
+ lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
14985
+ if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
14986
+ if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
14987
+ const bbox = this.cache.layoutData.bbox;
14988
+ return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14989
+ }
14990
+ const textMeasure = application.graphicUtil.textMeasure,
14991
+ layoutData = new CanvasTextLayout(fontFamily, {
14992
+ fontSize: fontSize,
14993
+ fontWeight: fontWeight,
14994
+ fontFamily: fontFamily
14995
+ }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth, suffixPosition),
14996
+ {
14997
+ bbox: bbox
14998
+ } = layoutData;
14999
+ return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
15000
+ }
15001
+ updateVerticalMultilineAABBBounds(text) {
15002
+ var _a, _b, _c;
15003
+ const textTheme = this.getGraphicTheme(),
15004
+ textMeasure = application.graphicUtil.textMeasure;
15005
+ let width;
15006
+ const attribute = this.attribute,
15007
+ {
15008
+ ignoreBuf = textTheme.ignoreBuf
15009
+ } = attribute,
15010
+ buf = ignoreBuf ? 0 : 2,
14998
15011
  {
14999
15012
  maxLineWidth = textTheme.maxLineWidth,
15000
15013
  ellipsis = textTheme.ellipsis,
@@ -15006,14 +15019,14 @@ class Text extends Graphic {
15006
15019
  verticalMode = textTheme.verticalMode,
15007
15020
  suffixPosition = textTheme.suffixPosition
15008
15021
  } = attribute,
15009
- lineHeight = this.getLineHeight(attribute, textTheme, 0);
15022
+ lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
15010
15023
  let {
15011
15024
  textAlign = textTheme.textAlign,
15012
15025
  textBaseline = textTheme.textBaseline
15013
15026
  } = attribute;
15014
15027
  if (!verticalMode) {
15015
15028
  const t = textAlign;
15016
- textAlign = null !== (_a = Text.baselineMapAlign[textBaseline]) && void 0 !== _a ? _a : "left", textBaseline = null !== (_b = Text.alignMapBaseline[t]) && void 0 !== _b ? _b : "top";
15029
+ textAlign = null !== (_b = Text.baselineMapAlign[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = Text.alignMapBaseline[t]) && void 0 !== _c ? _c : "top";
15017
15030
  }
15018
15031
  if (width = 0, !this.shouldUpdateShape() && this.cache) {
15019
15032
  this.cache.verticalList.forEach(item => {
@@ -15061,15 +15074,6 @@ class Text extends Graphic {
15061
15074
  dy = textLayoutOffsetY(textBaseline, height, fontSize);
15062
15075
  return this._AABBBounds.set(dy, dx, dy + height, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
15063
15076
  }
15064
- getMaxWidth(theme) {
15065
- var _a, _b;
15066
- const attribute = this.attribute;
15067
- return null !== (_b = null !== (_a = attribute.maxLineWidth) && void 0 !== _a ? _a : attribute.maxWidth) && void 0 !== _b ? _b : theme.maxWidth;
15068
- }
15069
- getLineHeight(attribute, textTheme, buf) {
15070
- var _a;
15071
- return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
15072
- }
15073
15077
  needUpdateTags(keys) {
15074
15078
  let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
15075
15079
  return super.needUpdateTags(keys, k);
@@ -15084,12 +15088,6 @@ class Text extends Graphic {
15084
15088
  getNoWorkAnimateAttr() {
15085
15089
  return Text.NOWORK_ANIMATE_ATTR;
15086
15090
  }
15087
- getBaselineMapAlign() {
15088
- return Text.baselineMapAlign;
15089
- }
15090
- getAlignMapBaseline() {
15091
- return Text.alignMapBaseline;
15092
- }
15093
15091
  }
15094
15092
  Text.NOWORK_ANIMATE_ATTR = Object.assign({
15095
15093
  ellipsis: 1,
@@ -15168,10 +15166,7 @@ class WrapText extends Text {
15168
15166
  const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
15169
15167
  linesLayout.push({
15170
15168
  str: clip.str,
15171
- width: clip.width,
15172
- ascent: 0,
15173
- descent: 0,
15174
- keepCenterInLine: !1
15169
+ width: clip.width
15175
15170
  });
15176
15171
  break;
15177
15172
  }
@@ -15185,10 +15180,7 @@ class WrapText extends Text {
15185
15180
  }
15186
15181
  if (linesLayout.push({
15187
15182
  str: clip.str,
15188
- width: clip.width,
15189
- ascent: 0,
15190
- descent: 0,
15191
- keepCenterInLine: !1
15183
+ width: clip.width
15192
15184
  }), clip.str.length === str.length) ;else if (needCut) {
15193
15185
  const newStr = str.substring(clip.str.length);
15194
15186
  lines.splice(i + 1, 0, newStr);
@@ -15207,19 +15199,13 @@ class WrapText extends Text {
15207
15199
  const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
15208
15200
  linesLayout.push({
15209
15201
  str: clip.str,
15210
- width: clip.width,
15211
- ascent: 0,
15212
- descent: 0,
15213
- keepCenterInLine: !1
15202
+ width: clip.width
15214
15203
  }), lineWidth = Math.max(lineWidth, clip.width);
15215
15204
  break;
15216
15205
  }
15217
15206
  text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
15218
15207
  str: text,
15219
- width: width,
15220
- ascent: 0,
15221
- descent: 0,
15222
- keepCenterInLine: !1
15208
+ width: width
15223
15209
  });
15224
15210
  }
15225
15211
  bboxWH[0] = lineWidth;
@@ -15263,9 +15249,6 @@ class BaseSymbol {
15263
15249
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
15264
15250
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
15265
15251
  }
15266
- parseSize(size) {
15267
- return isNumber$1(size) ? size : Math.min(size[0], size[1]);
15268
- }
15269
15252
  }
15270
15253
 
15271
15254
  function circle(ctx, r, x, y, z) {
@@ -15276,13 +15259,13 @@ class CircleSymbol extends BaseSymbol {
15276
15259
  super(...arguments), this.type = "circle", this.pathStr = "M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0";
15277
15260
  }
15278
15261
  draw(ctx, size, x, y, z) {
15279
- return circle(ctx, this.parseSize(size) / 2, x, y, z);
15262
+ return circle(ctx, size / 2, x, y, z);
15280
15263
  }
15281
15264
  drawOffset(ctx, size, x, y, offset, z) {
15282
- return circle(ctx, this.parseSize(size) / 2 + offset, x, y, z);
15265
+ return circle(ctx, size / 2 + offset, x, y, z);
15283
15266
  }
15284
15267
  drawToSvgPath(size, x, y, z) {
15285
- const r = this.parseSize(size) / 2;
15268
+ const r = size / 2;
15286
15269
  return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${2 * r},0 a ${r},${r} 0 1,0 -${2 * r},0`;
15287
15270
  }
15288
15271
  }
@@ -15299,10 +15282,10 @@ class CrossSymbol extends BaseSymbol {
15299
15282
  super(...arguments), this.type = "cross", 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";
15300
15283
  }
15301
15284
  draw(ctx, size, x, y, z) {
15302
- return cross(ctx, this.parseSize(size) / 6, x, y, z);
15285
+ return cross(ctx, size / 6, x, y, z);
15303
15286
  }
15304
15287
  drawOffset(ctx, size, x, y, offset, z) {
15305
- return crossOffset(ctx, this.parseSize(size) / 6, x, y, offset, z);
15288
+ return crossOffset(ctx, size / 6, x, y, offset, z);
15306
15289
  }
15307
15290
  }
15308
15291
  var cross$1 = new CrossSymbol();
@@ -15315,13 +15298,13 @@ class DiamondSymbol extends BaseSymbol {
15315
15298
  super(...arguments), this.type = "diamond", this.pathStr = "M-0.5,0L0,-0.5L0.5,0L0,0.5Z";
15316
15299
  }
15317
15300
  draw(ctx, size, x, y, z) {
15318
- return diamond(ctx, this.parseSize(size) / 2, x, y, z);
15301
+ return diamond(ctx, size / 2, x, y, z);
15319
15302
  }
15320
15303
  drawFitDir(ctx, size, x, y, z) {
15321
- return diamond(ctx, this.parseSize(size) / 2, x, y, z);
15304
+ return diamond(ctx, size / 2, x, y, z);
15322
15305
  }
15323
15306
  drawOffset(ctx, size, x, y, offset, z) {
15324
- return diamond(ctx, this.parseSize(size) / 2 + offset, x, y, z);
15307
+ return diamond(ctx, size / 2 + offset, x, y, z);
15325
15308
  }
15326
15309
  }
15327
15310
  var diamond$1 = new DiamondSymbol();
@@ -15335,10 +15318,10 @@ class SquareSymbol extends BaseSymbol {
15335
15318
  super(...arguments), this.type = "square", this.pathStr = "M-0.5,-0.5h1v1h-1Z";
15336
15319
  }
15337
15320
  draw(ctx, size, x, y) {
15338
- return square(ctx, this.parseSize(size) / 2, x, y);
15321
+ return square(ctx, size / 2, x, y);
15339
15322
  }
15340
15323
  drawOffset(ctx, size, x, y, offset) {
15341
- return square(ctx, this.parseSize(size) / 2 + offset, x, y);
15324
+ return square(ctx, size / 2 + offset, x, y);
15342
15325
  }
15343
15326
  }
15344
15327
  var square$1 = new SquareSymbol();
@@ -15352,10 +15335,10 @@ class TriangleUpSymbol extends BaseSymbol {
15352
15335
  super(...arguments), this.type = "triangleUp", this.pathStr = "M0.5,0.5 L-0.5,0.5 L0,-0.5 Z";
15353
15336
  }
15354
15337
  draw(ctx, size, x, y) {
15355
- return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y);
15338
+ return trianglUpOffset(ctx, size / 2, x, y);
15356
15339
  }
15357
15340
  drawOffset(ctx, size, x, y, offset) {
15358
- return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y, offset);
15341
+ return trianglUpOffset(ctx, size / 2, x, y, offset);
15359
15342
  }
15360
15343
  }
15361
15344
  var triangleUp = new TriangleUpSymbol();
@@ -15387,10 +15370,10 @@ class StarSymbol extends BaseSymbol {
15387
15370
  super(...arguments), this.type = "star", 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";
15388
15371
  }
15389
15372
  draw(ctx, size, transX, transY) {
15390
- return star(ctx, this.parseSize(size) / 2, transX, transY);
15373
+ return star(ctx, size / 2, transX, transY);
15391
15374
  }
15392
15375
  drawOffset(ctx, size, transX, transY, offset) {
15393
- return star(ctx, this.parseSize(size) / 2 + offset, transX, transY);
15376
+ return star(ctx, size / 2 + offset, transX, transY);
15394
15377
  }
15395
15378
  }
15396
15379
  var star$1 = new StarSymbol();
@@ -15408,10 +15391,10 @@ class ArrowSymbol extends BaseSymbol {
15408
15391
  super(...arguments), this.type = "arrow", 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";
15409
15392
  }
15410
15393
  draw(ctx, size, transX, transY) {
15411
- return arrow(ctx, this.parseSize(size) / 2, transX, transY);
15394
+ return arrow(ctx, size / 2, transX, transY);
15412
15395
  }
15413
15396
  drawOffset(ctx, size, transX, transY, offset) {
15414
- return arrow(ctx, this.parseSize(size) / 2 + offset, transX, transY);
15397
+ return arrow(ctx, size / 2 + offset, transX, transY);
15415
15398
  }
15416
15399
  }
15417
15400
  var arrow$1 = new ArrowSymbol();
@@ -15425,10 +15408,10 @@ class WedgeSymbol extends BaseSymbol {
15425
15408
  super(...arguments), this.type = "wedge", this.pathStr = "M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z";
15426
15409
  }
15427
15410
  draw(ctx, size, transX, transY) {
15428
- return wedge(ctx, this.parseSize(size) / 2, transX, transY);
15411
+ return wedge(ctx, size / 2, transX, transY);
15429
15412
  }
15430
15413
  drawOffset(ctx, size, transX, transY, offset) {
15431
- return wedge(ctx, this.parseSize(size) / 2 + offset, transX, transY);
15414
+ return wedge(ctx, size / 2 + offset, transX, transY);
15432
15415
  }
15433
15416
  }
15434
15417
  var wedge$1 = new WedgeSymbol();
@@ -15441,10 +15424,10 @@ class StrokeSymbol extends BaseSymbol {
15441
15424
  super(...arguments), this.type = "stroke", this.pathStr = "";
15442
15425
  }
15443
15426
  draw(ctx, size, transX, transY) {
15444
- return stroke(ctx, this.parseSize(size) / 2, transX, transY);
15427
+ return stroke(ctx, size / 2, transX, transY);
15445
15428
  }
15446
15429
  drawOffset(ctx, size, transX, transY, offset) {
15447
- return stroke(ctx, this.parseSize(size) / 2 + offset, transX, transY);
15430
+ return stroke(ctx, size / 2 + offset, transX, transY);
15448
15431
  }
15449
15432
  }
15450
15433
  var stroke$1 = new StrokeSymbol();
@@ -15466,10 +15449,10 @@ class WyeSymbol extends BaseSymbol {
15466
15449
  super(...arguments), this.type = "wye", 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";
15467
15450
  }
15468
15451
  draw(ctx, size, transX, transY) {
15469
- return wye(ctx, this.parseSize(size) / 2, transX, transY);
15452
+ return wye(ctx, size / 2, transX, transY);
15470
15453
  }
15471
15454
  drawOffset(ctx, size, transX, transY, offset) {
15472
- return wye(ctx, this.parseSize(size) / 2 + offset, transX, transY);
15455
+ return wye(ctx, size / 2 + offset, transX, transY);
15473
15456
  }
15474
15457
  }
15475
15458
  var wye$1 = new WyeSymbol();
@@ -15482,10 +15465,10 @@ class TriangleLeftSymbol extends BaseSymbol {
15482
15465
  super(...arguments), this.type = "triangleLeft", this.pathStr = "M-0.5,0 L0.5,0.5 L0.5,-0.5 Z";
15483
15466
  }
15484
15467
  draw(ctx, size, x, y) {
15485
- return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, 0);
15468
+ return trianglLeftOffset(ctx, size / 2, x, y, 0);
15486
15469
  }
15487
15470
  drawOffset(ctx, size, x, y, offset) {
15488
- return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, offset);
15471
+ return trianglLeftOffset(ctx, size / 2, x, y, offset);
15489
15472
  }
15490
15473
  }
15491
15474
  var triangleLeft = new TriangleLeftSymbol();
@@ -15499,10 +15482,10 @@ class TriangleRightSymbol extends BaseSymbol {
15499
15482
  super(...arguments), this.type = "triangleRight", this.pathStr = "M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z";
15500
15483
  }
15501
15484
  draw(ctx, size, x, y) {
15502
- return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y);
15485
+ return trianglRightOffset(ctx, size / 2, x, y);
15503
15486
  }
15504
15487
  drawOffset(ctx, size, x, y, offset) {
15505
- return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y, offset);
15488
+ return trianglRightOffset(ctx, size / 2, x, y, offset);
15506
15489
  }
15507
15490
  }
15508
15491
  var triangleRight = new TriangleRightSymbol();
@@ -15516,10 +15499,10 @@ class TriangleDownSymbol extends BaseSymbol {
15516
15499
  super(...arguments), this.type = "triangleDown", this.pathStr = "M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z";
15517
15500
  }
15518
15501
  draw(ctx, size, x, y) {
15519
- return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y);
15502
+ return trianglDownOffset(ctx, size / 2, x, y);
15520
15503
  }
15521
15504
  drawOffset(ctx, size, x, y, offset) {
15522
- return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y, offset);
15505
+ return trianglDownOffset(ctx, size / 2, x, y, offset);
15523
15506
  }
15524
15507
  }
15525
15508
  var triangleDown = new TriangleDownSymbol();
@@ -15534,10 +15517,10 @@ class ThinTriangleSymbol extends BaseSymbol {
15534
15517
  super(...arguments), this.type = "thinTriangle", this.pathStr = "M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z";
15535
15518
  }
15536
15519
  draw(ctx, size, x, y) {
15537
- return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3, x, y);
15520
+ return thinTriangle(ctx, size / 2 / sqrt3, x, y);
15538
15521
  }
15539
15522
  drawOffset(ctx, size, x, y, offset) {
15540
- return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3 + offset, x, y);
15523
+ return thinTriangle(ctx, size / 2 / sqrt3 + offset, x, y);
15541
15524
  }
15542
15525
  }
15543
15526
  var thinTriangle$1 = new ThinTriangleSymbol();
@@ -15551,10 +15534,10 @@ class Arrow2LeftSymbol extends BaseSymbol {
15551
15534
  super(...arguments), this.type = "arrow2Left", this.pathStr = "M 0.25 -0.5 L -0.25 0 l 0.25 0.5";
15552
15535
  }
15553
15536
  draw(ctx, size, transX, transY) {
15554
- return arrow2Left(ctx, this.parseSize(size) / 4, transX, transY);
15537
+ return arrow2Left(ctx, size / 4, transX, transY);
15555
15538
  }
15556
15539
  drawOffset(ctx, size, transX, transY, offset) {
15557
- return arrow2Left(ctx, this.parseSize(size) / 4 + offset, transX, transY);
15540
+ return arrow2Left(ctx, size / 4 + offset, transX, transY);
15558
15541
  }
15559
15542
  }
15560
15543
  var arrow2Left$1 = new Arrow2LeftSymbol();
@@ -15568,10 +15551,10 @@ class Arrow2RightSymbol extends BaseSymbol {
15568
15551
  super(...arguments), this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
15569
15552
  }
15570
15553
  draw(ctx, size, transX, transY) {
15571
- return arrow2Right(ctx, this.parseSize(size) / 4, transX, transY);
15554
+ return arrow2Right(ctx, size / 4, transX, transY);
15572
15555
  }
15573
15556
  drawOffset(ctx, size, transX, transY, offset) {
15574
- return arrow2Right(ctx, this.parseSize(size) / 4 + offset, transX, transY);
15557
+ return arrow2Right(ctx, size / 4 + offset, transX, transY);
15575
15558
  }
15576
15559
  }
15577
15560
  var arrow2Right$1 = new Arrow2RightSymbol();
@@ -15585,10 +15568,10 @@ class Arrow2UpSymbol extends BaseSymbol {
15585
15568
  super(...arguments), this.type = "arrow2Up", this.pathStr = "M -0.5 0.25 L 0 -0.25 l 0.5 0.25";
15586
15569
  }
15587
15570
  draw(ctx, size, transX, transY) {
15588
- return arrow2Up(ctx, this.parseSize(size) / 4, transX, transY);
15571
+ return arrow2Up(ctx, size / 4, transX, transY);
15589
15572
  }
15590
15573
  drawOffset(ctx, size, transX, transY, offset) {
15591
- return arrow2Up(ctx, this.parseSize(size) / 4 + offset, transX, transY);
15574
+ return arrow2Up(ctx, size / 4 + offset, transX, transY);
15592
15575
  }
15593
15576
  }
15594
15577
  var arrow2Up$1 = new Arrow2UpSymbol();
@@ -15602,10 +15585,10 @@ class Arrow2DownSymbol extends BaseSymbol {
15602
15585
  super(...arguments), this.type = "arrow2Down", this.pathStr = "M -0.5 -0.25 L 0 0.25 l 0.5 -0.25";
15603
15586
  }
15604
15587
  draw(ctx, size, transX, transY) {
15605
- return arrow2Down(ctx, this.parseSize(size) / 4, transX, transY);
15588
+ return arrow2Down(ctx, size / 4, transX, transY);
15606
15589
  }
15607
15590
  drawOffset(ctx, size, transX, transY, offset) {
15608
- return arrow2Down(ctx, this.parseSize(size) / 4 + offset, transX, transY);
15591
+ return arrow2Down(ctx, size / 4 + offset, transX, transY);
15609
15592
  }
15610
15593
  }
15611
15594
  var arrow2Down$1 = new Arrow2DownSymbol();
@@ -15618,13 +15601,13 @@ class LineVSymbol extends BaseSymbol {
15618
15601
  super(...arguments), this.type = "lineV", this.pathStr = "M0,-0.5L0,0.5";
15619
15602
  }
15620
15603
  draw(ctx, size, x, y, z) {
15621
- return lineV(ctx, this.parseSize(size) / 2, x, y);
15604
+ return lineV(ctx, size / 2, x, y);
15622
15605
  }
15623
15606
  drawOffset(ctx, size, x, y, offset, z) {
15624
- return lineV(ctx, this.parseSize(size) / 2 + offset, x, y);
15607
+ return lineV(ctx, size / 2 + offset, x, y);
15625
15608
  }
15626
15609
  drawToSvgPath(size, x, y, z) {
15627
- const r = this.parseSize(size) / 2;
15610
+ const r = size / 2;
15628
15611
  return `M ${x}, ${y - r} L ${x},${y + r}`;
15629
15612
  }
15630
15613
  }
@@ -15638,13 +15621,13 @@ class LineHSymbol extends BaseSymbol {
15638
15621
  super(...arguments), this.type = "lineH", this.pathStr = "M-0.5,0L0.5,0";
15639
15622
  }
15640
15623
  draw(ctx, size, x, y, z) {
15641
- return lineH(ctx, this.parseSize(size) / 2, x, y);
15624
+ return lineH(ctx, size / 2, x, y);
15642
15625
  }
15643
15626
  drawOffset(ctx, size, x, y, offset, z) {
15644
- return lineH(ctx, this.parseSize(size) / 2 + offset, x, y);
15627
+ return lineH(ctx, size / 2 + offset, x, y);
15645
15628
  }
15646
15629
  drawToSvgPath(size, x, y, z) {
15647
- const r = this.parseSize(size) / 2;
15630
+ const r = size / 2;
15648
15631
  return `M ${x - r}, ${y} L ${x + r},${y}`;
15649
15632
  }
15650
15633
  }
@@ -15658,13 +15641,13 @@ class CloseSymbol extends BaseSymbol {
15658
15641
  super(...arguments), this.type = "close", this.pathStr = "M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5";
15659
15642
  }
15660
15643
  draw(ctx, size, x, y, z) {
15661
- return close(ctx, this.parseSize(size) / 2, x, y);
15644
+ return close(ctx, size / 2, x, y);
15662
15645
  }
15663
15646
  drawOffset(ctx, size, x, y, offset, z) {
15664
- return close(ctx, this.parseSize(size) / 2 + offset, x, y);
15647
+ return close(ctx, size / 2 + offset, x, y);
15665
15648
  }
15666
15649
  drawToSvgPath(size, x, y, z) {
15667
- const r = this.parseSize(size) / 2;
15650
+ const r = size / 2;
15668
15651
  return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
15669
15652
  }
15670
15653
  }
@@ -15698,18 +15681,15 @@ class CustomSymbolClass {
15698
15681
  this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
15699
15682
  }
15700
15683
  drawOffset(ctx, size, x, y, offset, z, cb) {
15701
- return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
15684
+ return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
15702
15685
  ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size), cb && cb(item.path, item.attribute);
15703
15686
  }), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset), !1);
15704
15687
  }
15705
15688
  draw(ctx, size, x, y, z, cb) {
15706
- return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
15707
- }
15708
- parseSize(size) {
15709
- return isNumber$1(size) ? size : Math.min(size[0], size[1]);
15689
+ return this.drawOffset(ctx, size, x, y, 0, z, cb);
15710
15690
  }
15711
15691
  bounds(size, bounds) {
15712
- if (size = this.parseSize(size), this.isSvg) {
15692
+ if (this.isSvg) {
15713
15693
  if (!this.svgCache) return;
15714
15694
  return bounds.clear(), void this.svgCache.forEach(_ref => {
15715
15695
  let {
@@ -16392,11 +16372,7 @@ class Paragraph {
16392
16372
  case "sub":
16393
16373
  baseline += this.descent / 2;
16394
16374
  }
16395
- "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0);
16396
- const {
16397
- lineWidth = 1
16398
- } = this.character;
16399
- this.character.stroke && lineWidth && (applyStrokeStyle(ctx, this.character), ctx.strokeText(text, left, baseline)), applyFillStyle(ctx, this.character), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
16375
+ "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0), this.character.stroke && (applyStrokeStyle(ctx, this.character), ctx.strokeText(text, left, baseline)), applyFillStyle(ctx, this.character), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
16400
16376
  }
16401
16377
  getWidthWithEllips(direction) {
16402
16378
  let text = this.text;
@@ -18613,7 +18589,7 @@ class Stage extends Group {
18613
18589
  constructor() {
18614
18590
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18615
18591
  var _a;
18616
- super({}), this.tickedBeforeRender = !0, this._onVisibleChange = visible => {
18592
+ super({}), this._onVisibleChange = visible => {
18617
18593
  if (!(this._skipRender < 0)) if (visible) {
18618
18594
  if (this.dirtyBounds) {
18619
18595
  const b = this.window.getViewBox();
@@ -18624,10 +18600,7 @@ class Stage extends Group {
18624
18600
  }, this.beforeRender = stage => {
18625
18601
  this._beforeRender && this._beforeRender(stage);
18626
18602
  }, this.afterRender = stage => {
18627
- this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
18628
- }, this.afterTickCb = () => {
18629
- var _a;
18630
- this.tickedBeforeRender = !0, "performance" === (null === (_a = this.params.optimize) || void 0 === _a ? void 0 : _a.tickRenderMode) || "rendering" !== this.state && this.render();
18603
+ this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null;
18631
18604
  }, this.params = params, this.theme = new Theme(), this.hooks = {
18632
18605
  beforeRender: new SyncHook(["stage"]),
18633
18606
  afterRender: new SyncHook(["stage"])
@@ -18644,7 +18617,7 @@ class Stage extends Group {
18644
18617
  main: !0
18645
18618
  })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
18646
18619
  background: this._background
18647
- }), this.ticker.on("afterTick", this.afterTickCb);
18620
+ });
18648
18621
  }
18649
18622
  pauseRender() {
18650
18623
  let sr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
@@ -18873,7 +18846,7 @@ class Stage extends Group {
18873
18846
  if ("released" === this.releaseStatus) return;
18874
18847
  this.ticker.start(), this.timeline.resume();
18875
18848
  const state = this.state;
18876
- this.state = "rendering", this.tickedBeforeRender || this.ticker.trySyncTickStatus(), this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this._skipRender || (this.renderLayerList(this.children), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear()), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
18849
+ this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this._skipRender || (this.renderLayerList(this.children), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear()), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
18877
18850
  }
18878
18851
  combineLayersToWindow() {
18879
18852
  if ("harmony" === this.global.env) {
@@ -18979,7 +18952,7 @@ class Stage extends Group {
18979
18952
  layer.release();
18980
18953
  }), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
18981
18954
  item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
18982
- }), this.interactiveLayer.release()), this.window.release(), this.ticker.remTimeline(this.timeline), this.ticker.removeListener("afterTick", this.afterTickCb), this.renderService.renderTreeRoots = [];
18955
+ }), this.interactiveLayer.release()), this.window.release(), this.ticker.remTimeline(this.timeline), this.renderService.renderTreeRoots = [];
18983
18956
  }
18984
18957
  setStage(stage) {}
18985
18958
  dirty(b, matrix) {
@@ -19057,6 +19030,8 @@ function createStage(params) {
19057
19030
  return new Stage(params);
19058
19031
  }
19059
19032
 
19033
+ const strCommandMap = ["arc", "arcTo", "bezierCurveTo", "closePath", "ellipse", "lineTo", "moveTo", "quadraticCurveTo", "rect"];
19034
+
19060
19035
  var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19061
19036
  var d,
19062
19037
  c = arguments.length,
@@ -23677,9 +23652,11 @@ function jsx(type, config) {
23677
23652
  name: name,
23678
23653
  id: id,
23679
23654
  attribute: attribute,
23680
- stateProxy: stateProxy
23655
+ stateProxy: stateProxy,
23656
+ animation: animation,
23657
+ timeline: timeline
23681
23658
  } = _a,
23682
- props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy"]);
23659
+ props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy", "animation", "timeline"]);
23683
23660
  let c = type;
23684
23661
  isString$1(type) && (c = graphicCreator[type]);
23685
23662
  const childrenList = [];
@@ -23688,7 +23665,13 @@ function jsx(type, config) {
23688
23665
  }
23689
23666
  children.length && flatten(1 === children.length ? children[0] : children, childrenList);
23690
23667
  const g = "Group" === c.name ? new c(attribute) : c(config);
23691
- return parseToGraphic$1(g, childrenList, props), stateProxy && (g.stateProxy = stateProxy), g;
23668
+ if (parseToGraphic$1(g, childrenList, props), stateProxy && (g.stateProxy = stateProxy), name && (g.name = name), isArray$1(animation)) {
23669
+ const animate = g.animate();
23670
+ timeline && animate.setTimeline(timeline), animation.forEach(item => {
23671
+ animate[item[0]](...item.slice(1));
23672
+ });
23673
+ }
23674
+ return g;
23692
23675
  }
23693
23676
  function parseToGraphic$1(g, childrenList, props) {
23694
23677
  let out,
@@ -23956,7 +23939,7 @@ class Gesture extends EventEmitter {
23956
23939
  startTime: startTime,
23957
23940
  startPoints: startPoints
23958
23941
  } = this;
23959
- if ("press" === eventType) return eventType;
23942
+ if (eventType) return eventType;
23960
23943
  let type;
23961
23944
  return type = clock.now() - startTime > this.config.press.time && calcDistance(startPoints[0], point) < this.config.press.threshold ? "press" : "pan", this.eventType = type, type;
23962
23945
  }
@@ -24488,10 +24471,9 @@ let BrowserContext2d = class {
24488
24471
  lineJoin = defaultParams.lineJoin,
24489
24472
  lineDash = defaultParams.lineDash,
24490
24473
  lineCap = defaultParams.lineCap,
24491
- miterLimit = defaultParams.miterLimit,
24492
- keepStrokeScale = defaultParams.keepStrokeScale
24474
+ miterLimit = defaultParams.miterLimit
24493
24475
  } = attribute;
24494
- _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
24476
+ _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
24495
24477
  }
24496
24478
  }
24497
24479
  setTextStyleWithoutAlignBaseline(params, defaultParams, z) {
@@ -24915,7 +24897,7 @@ class DynamicB {
24915
24897
  function createImageElement$1(src) {
24916
24898
  let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
24917
24899
  const img = document.createElement("img");
24918
- if (img.crossOrigin = "anonymous", isSvg) {
24900
+ if (application.global.isImageAnonymous && (img.crossOrigin = "anonymous"), isSvg) {
24919
24901
  const data = new Blob([src], {
24920
24902
  type: "image/svg+xml"
24921
24903
  });
@@ -25391,9 +25373,8 @@ class PickerBase {
25391
25373
  return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
25392
25374
  if (picked) return !0;
25393
25375
  const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
25394
- pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
25395
- keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
25396
- return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
25376
+ pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
25377
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
25397
25378
  }), pickContext.highPerformanceRestore(), picked;
25398
25379
  }
25399
25380
  }
@@ -25666,9 +25647,8 @@ class RectPickerBase {
25666
25647
  if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
25667
25648
  if (picked) return !0;
25668
25649
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
25669
- pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
25670
- keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
25671
- return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
25650
+ pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
25651
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
25672
25652
  });else {
25673
25653
  const {
25674
25654
  fill = rectAttribute.fill,
@@ -25982,10 +25962,9 @@ let LynxContext2d = class extends BrowserContext2d {
25982
25962
  lineJoin = defaultParams.lineJoin,
25983
25963
  lineDash = defaultParams.lineDash,
25984
25964
  lineCap = defaultParams.lineCap,
25985
- miterLimit = defaultParams.miterLimit,
25986
- keepStrokeScale = defaultParams.keepStrokeScale
25965
+ miterLimit = defaultParams.miterLimit
25987
25966
  } = attribute;
25988
- _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
25967
+ _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
25989
25968
  }
25990
25969
  }
25991
25970
  measureText(text) {
@@ -26613,10 +26592,9 @@ let TaroContext2d = class extends BrowserContext2d {
26613
26592
  lineJoin = defaultParams.lineJoin,
26614
26593
  lineDash = defaultParams.lineDash,
26615
26594
  lineCap = defaultParams.lineCap,
26616
- miterLimit = defaultParams.miterLimit,
26617
- keepStrokeScale = defaultParams.keepStrokeScale
26595
+ miterLimit = defaultParams.miterLimit
26618
26596
  } = attribute;
26619
- _context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params, offsetX, offsetY)), _context.setLineJoin(lineJoin), lineDash && _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
26597
+ _context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params, offsetX, offsetY)), _context.setLineJoin(lineJoin), lineDash && _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
26620
26598
  }
26621
26599
  }
26622
26600
  setTextStyleWithoutAlignBaseline(params, defaultParams) {
@@ -27656,10 +27634,9 @@ let HarmonyContext2d = class extends BrowserContext2d {
27656
27634
  lineJoin = defaultParams.lineJoin,
27657
27635
  lineDash = defaultParams.lineDash,
27658
27636
  lineCap = defaultParams.lineCap,
27659
- miterLimit = defaultParams.miterLimit,
27660
- keepStrokeScale = defaultParams.keepStrokeScale
27637
+ miterLimit = defaultParams.miterLimit
27661
27638
  } = attribute;
27662
- _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
27639
+ _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
27663
27640
  }
27664
27641
  }
27665
27642
  measureText(text) {
@@ -28066,9 +28043,8 @@ class BaseLinePicker extends BaseRender {
28066
28043
  return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
28067
28044
  if (picked) return !0;
28068
28045
  const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
28069
- pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
28070
- keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
28071
- return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
28046
+ pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
28047
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
28072
28048
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
28073
28049
  }
28074
28050
  }
@@ -28203,9 +28179,8 @@ let DefaultCanvasSymbolPicker = class extends Base3dPicker {
28203
28179
  return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
28204
28180
  if (picked) return !0;
28205
28181
  const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
28206
- pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
28207
- keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
28208
- return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
28182
+ pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
28183
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
28209
28184
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
28210
28185
  }
28211
28186
  };
@@ -28642,7 +28617,7 @@ const registerWrapText = _registerWrapText;
28642
28617
 
28643
28618
  const roughModule = _roughModule;
28644
28619
 
28645
- const version = "0.21.0-alpha.12";
28620
+ const version = "0.21.0-alpha.13";
28646
28621
  preLoadAllModule();
28647
28622
  if (isBrowserEnv()) {
28648
28623
  loadBrowserEnv(container);
@@ -28675,4 +28650,4 @@ registerReactAttributePlugin();
28675
28650
  registerDirectionalLight();
28676
28651
  registerOrthoCamera();
28677
28652
 
28678
- 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, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, 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, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, Gesture, 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, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, 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, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, 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, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, 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, feishuEnvModule, 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, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, identityMat4, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lynxEnvModule, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pyramid3dCanvasPickModule, pyramid3dModule, rafBasedSto, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWrapText, registerWrapTextGraphic, renderCommandList, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rotateX, rotateY, rotateZ, roughModule, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformKeys, transformMat4, transformUtil, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };
28653
+ 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, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, 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, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, Gesture, 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, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, 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, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, 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, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, 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, feishuEnvModule, 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, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, identityMat4, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lynxEnvModule, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pyramid3dCanvasPickModule, pyramid3dModule, rafBasedSto, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWrapText, registerWrapTextGraphic, renderCommandList, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rotateX, rotateY, rotateZ, roughModule, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformKeys, transformMat4, transformUtil, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };