@visactor/vrender 0.21.0-alpha.11 → 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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +507 -529
- package/dist/index.js +506 -528
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
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)
|
|
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
|
-
|
|
4274
|
+
measureTextWidth(text, options) {
|
|
4275
|
+
if (!this.context) return this.estimate(text, options).width;
|
|
4286
4276
|
this.context.setTextStyleWithoutAlignBaseline(options);
|
|
4287
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
return
|
|
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
|
-
|
|
4298
|
+
measureTextBoundHieght(text, options) {
|
|
4365
4299
|
var _a;
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
})
|
|
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 {
|
|
@@ -7782,7 +7668,7 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
7782
7668
|
lastMatchedIndex = i, lastMatchedPoint = tagMap.get(this.toPoints[i].context);
|
|
7783
7669
|
break;
|
|
7784
7670
|
}
|
|
7785
|
-
"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],
|
|
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);
|
|
7786
7672
|
let prevMatchedPoint = this.toPoints[0];
|
|
7787
7673
|
this.interpolatePoints = this.toPoints.map((point, index) => {
|
|
7788
7674
|
const matchedPoint = tagMap.get(point.context);
|
|
@@ -7794,19 +7680,11 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
7794
7680
|
return newPoint.defined = toPoint.defined, newPoint.context = toPoint.context, newPoint;
|
|
7795
7681
|
});
|
|
7796
7682
|
}
|
|
7797
|
-
onFirstRun() {
|
|
7798
|
-
const lastClipRange = this.target.attribute.clipRange;
|
|
7799
|
-
isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
|
|
7800
|
-
}
|
|
7801
7683
|
onUpdate(end, ratio, out) {
|
|
7802
7684
|
if (this.points = this.points.map((point, index) => {
|
|
7803
7685
|
const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
|
|
7804
7686
|
return newPoint.context = point.context, newPoint;
|
|
7805
|
-
}), this.clipRange) {
|
|
7806
|
-
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));
|
|
7807
|
-
out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
|
|
7808
|
-
}
|
|
7809
|
-
if (this.segmentsCache && this.to.segments) {
|
|
7687
|
+
}), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), this.segmentsCache && this.to.segments) {
|
|
7810
7688
|
let start = 0;
|
|
7811
7689
|
out.segments = this.to.segments.map((segment, index) => {
|
|
7812
7690
|
const end = start + this.segmentsCache[index],
|
|
@@ -9222,7 +9100,7 @@ class ResourceLoader {
|
|
|
9222
9100
|
}
|
|
9223
9101
|
static GetFile(url, type) {
|
|
9224
9102
|
let data = ResourceLoader.cache.get(url);
|
|
9225
|
-
return 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 = {
|
|
9226
9104
|
type: type,
|
|
9227
9105
|
loadState: "init"
|
|
9228
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));
|
|
@@ -12160,8 +12038,7 @@ class DefaultArcRenderContribution {
|
|
|
12160
12038
|
x: originX = arcAttribute.x,
|
|
12161
12039
|
y: originY = arcAttribute.y,
|
|
12162
12040
|
scaleX = arcAttribute.scaleX,
|
|
12163
|
-
scaleY = arcAttribute.scaleY
|
|
12164
|
-
keepStrokeScale = arcAttribute.keepStrokeScale
|
|
12041
|
+
scaleY = arcAttribute.scaleY
|
|
12165
12042
|
} = arc.attribute;
|
|
12166
12043
|
let {
|
|
12167
12044
|
innerRadius = arcAttribute.innerRadius,
|
|
@@ -12173,7 +12050,7 @@ class DefaultArcRenderContribution {
|
|
|
12173
12050
|
{
|
|
12174
12051
|
distance = arcAttribute[key].distance
|
|
12175
12052
|
} = borderStyle,
|
|
12176
|
-
d =
|
|
12053
|
+
d = getScaledStroke(context, distance, context.dpr),
|
|
12177
12054
|
deltaAngle = distance / outerRadius,
|
|
12178
12055
|
sign = "outerBorder" === key ? 1 : -1;
|
|
12179
12056
|
if (arc.setAttributes({
|
|
@@ -12218,15 +12095,14 @@ class DefaultCircleRenderContribution {
|
|
|
12218
12095
|
x: originX = circleAttribute.x,
|
|
12219
12096
|
y: originY = circleAttribute.y,
|
|
12220
12097
|
scaleX = circleAttribute.scaleX,
|
|
12221
|
-
scaleY = circleAttribute.scaleY
|
|
12222
|
-
keepStrokeScale = circleAttribute.keepStrokeScale
|
|
12098
|
+
scaleY = circleAttribute.scaleY
|
|
12223
12099
|
} = circle.attribute,
|
|
12224
12100
|
renderBorder = (borderStyle, key) => {
|
|
12225
12101
|
const doStroke = !(!borderStyle || !borderStyle.stroke),
|
|
12226
12102
|
{
|
|
12227
12103
|
distance = circleAttribute[key].distance
|
|
12228
12104
|
} = borderStyle,
|
|
12229
|
-
d =
|
|
12105
|
+
d = getScaledStroke(context, distance, context.dpr),
|
|
12230
12106
|
sign = "outerBorder" === key ? 1 : -1;
|
|
12231
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) {
|
|
12232
12108
|
const lastOpacity = circleAttribute[key].opacity;
|
|
@@ -12345,8 +12221,7 @@ class DefaultRectRenderContribution {
|
|
|
12345
12221
|
scaleX = rectAttribute.scaleX,
|
|
12346
12222
|
scaleY = rectAttribute.scaleY,
|
|
12347
12223
|
x1: x1,
|
|
12348
|
-
y1: y1
|
|
12349
|
-
keepStrokeScale = rectAttribute.keepStrokeScale
|
|
12224
|
+
y1: y1
|
|
12350
12225
|
} = rect.attribute;
|
|
12351
12226
|
let {
|
|
12352
12227
|
width: width,
|
|
@@ -12359,7 +12234,7 @@ class DefaultRectRenderContribution {
|
|
|
12359
12234
|
{
|
|
12360
12235
|
distance = rectAttribute[key].distance
|
|
12361
12236
|
} = borderStyle,
|
|
12362
|
-
d =
|
|
12237
|
+
d = getScaledStroke(context, distance, context.dpr),
|
|
12363
12238
|
nextX = x + sign * d,
|
|
12364
12239
|
nextY = y + sign * d,
|
|
12365
12240
|
dw = 2 * d;
|
|
@@ -12489,8 +12364,9 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
|
|
|
12489
12364
|
constructor() {
|
|
12490
12365
|
super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
12491
12366
|
}
|
|
12492
|
-
drawShape(
|
|
12493
|
-
return super.drawShape(
|
|
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);
|
|
12494
12370
|
}
|
|
12495
12371
|
}
|
|
12496
12372
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
@@ -12516,15 +12392,14 @@ class DefaultSymbolRenderContribution {
|
|
|
12516
12392
|
x: originX = symbolAttribute.x,
|
|
12517
12393
|
y: originY = symbolAttribute.y,
|
|
12518
12394
|
scaleX = symbolAttribute.scaleX,
|
|
12519
|
-
scaleY = symbolAttribute.scaleY
|
|
12520
|
-
keepStrokeScale = symbolAttribute.keepStrokeScale
|
|
12395
|
+
scaleY = symbolAttribute.scaleY
|
|
12521
12396
|
} = symbol.attribute,
|
|
12522
12397
|
renderBorder = (borderStyle, key) => {
|
|
12523
12398
|
const doStroke = !(!borderStyle || !borderStyle.stroke),
|
|
12524
12399
|
{
|
|
12525
12400
|
distance = symbolAttribute[key].distance
|
|
12526
12401
|
} = borderStyle,
|
|
12527
|
-
d =
|
|
12402
|
+
d = getScaledStroke(context, distance, context.dpr),
|
|
12528
12403
|
sign = "outerBorder" === key ? 1 : -1;
|
|
12529
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) {
|
|
12530
12405
|
const lastOpacity = symbolAttribute[key].opacity;
|
|
@@ -13802,8 +13677,16 @@ let DefaultCanvasTextRender = class extends BaseRender {
|
|
|
13802
13677
|
verticalMode = textAttribute.verticalMode,
|
|
13803
13678
|
x: originX = textAttribute.x,
|
|
13804
13679
|
y: originY = textAttribute.y
|
|
13805
|
-
} = text.attribute
|
|
13806
|
-
|
|
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,
|
|
13807
13690
|
data = this.valid(text, textAttribute, fillCb, strokeCb);
|
|
13808
13691
|
if (!data) return;
|
|
13809
13692
|
const {
|
|
@@ -13823,60 +13706,79 @@ let DefaultCanvasTextRender = class extends BaseRender {
|
|
|
13823
13706
|
const matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
|
|
13824
13707
|
matrix.rotateByCenter(Math.PI / 2, _x, _y), context.transformFromMatrix(matrix, !0), matrixAllocate.free(matrix);
|
|
13825
13708
|
}
|
|
13826
|
-
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());
|
|
13827
13710
|
};
|
|
13828
|
-
if (
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
context
|
|
13839
|
-
|
|
13840
|
-
|
|
13841
|
-
|
|
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
|
+
});
|
|
13842
13755
|
});
|
|
13843
|
-
})));
|
|
13844
|
-
} else {
|
|
13845
|
-
let {
|
|
13846
|
-
textAlign = textAttribute.textAlign,
|
|
13847
|
-
textBaseline = textAttribute.textBaseline
|
|
13848
|
-
} = text.attribute;
|
|
13849
|
-
if (!verticalMode) {
|
|
13850
|
-
const t = textAlign;
|
|
13851
|
-
textAlign = null !== (_b = text.getBaselineMapAlign()[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = text.getAlignMapBaseline()[t]) && void 0 !== _c ? _c : "top";
|
|
13852
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 {
|
|
13853
13763
|
text.tryUpdateAABBBounds();
|
|
13854
|
-
const cache = text.cache
|
|
13855
|
-
|
|
13764
|
+
const cache = text.cache;
|
|
13765
|
+
if (cache) {
|
|
13766
|
+
context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
|
|
13767
|
+
const {
|
|
13856
13768
|
verticalList: verticalList
|
|
13857
13769
|
} = cache;
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
|
|
13863
|
-
totalW = max(_w, totalW);
|
|
13864
|
-
});
|
|
13865
|
-
let offsetY = 0,
|
|
13866
|
-
offsetX = 0;
|
|
13867
|
-
"bottom" === textBaseline ? offsetX = -totalHeight : "middle" === textBaseline && (offsetX = -totalHeight / 2), "center" === textAlign ? offsetY -= totalW / 2 : "right" === textAlign && (offsetY -= totalW), verticalList.forEach((verticalData, i) => {
|
|
13868
|
-
const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0),
|
|
13869
|
-
dw = totalW - currentW;
|
|
13870
|
-
let currentOffsetY = offsetY;
|
|
13871
|
-
"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 => {
|
|
13872
13774
|
const {
|
|
13873
13775
|
text: text,
|
|
13874
13776
|
width: width,
|
|
13875
13777
|
direction: direction
|
|
13876
13778
|
} = item;
|
|
13877
|
-
drawText(text,
|
|
13779
|
+
drawText(text, offsetX, offsetY, direction), offsetY += width;
|
|
13878
13780
|
});
|
|
13879
|
-
}
|
|
13781
|
+
}
|
|
13880
13782
|
}
|
|
13881
13783
|
transform3dMatrixToContextMatrix && this.restoreTransformUseContext2d(text, textAttribute, z, context), this.afterRenderStep(text, context, x, y, doFill, doStroke, fVisible, sVisible, textAttribute, drawContext, fillCb, strokeCb);
|
|
13882
13784
|
}
|
|
@@ -13888,10 +13790,12 @@ let DefaultCanvasTextRender = class extends BaseRender {
|
|
|
13888
13790
|
computed3dMatrix = !keepDirIn3d;
|
|
13889
13791
|
this._draw(text, textAttribute, computed3dMatrix, drawContext, params);
|
|
13890
13792
|
}
|
|
13891
|
-
drawUnderLine(underline, lineThrough, text,
|
|
13793
|
+
drawUnderLine(underline, lineThrough, text, x, y, z, textAttribute, context, multiOption) {
|
|
13892
13794
|
if (lineThrough + underline <= 0) return;
|
|
13893
13795
|
const {
|
|
13894
13796
|
textAlign = textAttribute.textAlign,
|
|
13797
|
+
textBaseline = textAttribute.textBaseline,
|
|
13798
|
+
fontSize = textAttribute.fontSize,
|
|
13895
13799
|
fill = textAttribute.fill,
|
|
13896
13800
|
opacity = textAttribute.opacity,
|
|
13897
13801
|
underlineOffset = textAttribute.underlineOffset,
|
|
@@ -13901,21 +13805,23 @@ let DefaultCanvasTextRender = class extends BaseRender {
|
|
|
13901
13805
|
isMulti = !isNil$1(multiOption),
|
|
13902
13806
|
w = isMulti ? multiOption.width : text.clipedWidth,
|
|
13903
13807
|
offsetX = isMulti ? 0 : textDrawOffsetX(textAlign, w),
|
|
13808
|
+
offsetY = textLayoutOffsetY(isMulti ? "alphabetic" : textBaseline, fontSize, fontSize),
|
|
13904
13809
|
attribute = {
|
|
13905
13810
|
lineWidth: 0,
|
|
13906
13811
|
stroke: fill,
|
|
13907
13812
|
opacity: opacity,
|
|
13908
13813
|
strokeOpacity: fillOpacity
|
|
13909
13814
|
};
|
|
13815
|
+
let deltaY = isMulti ? -3 : 0;
|
|
13910
13816
|
if (underline) {
|
|
13911
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute,
|
|
13912
|
-
const dy =
|
|
13913
|
-
context.moveTo(
|
|
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();
|
|
13914
13820
|
}
|
|
13915
|
-
if (lineThrough) {
|
|
13916
|
-
attribute.lineWidth = lineThrough, context.setStrokeStyle(text, attribute,
|
|
13917
|
-
const dy =
|
|
13918
|
-
context.moveTo(
|
|
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();
|
|
13919
13825
|
}
|
|
13920
13826
|
}
|
|
13921
13827
|
};
|
|
@@ -14210,10 +14116,12 @@ let DefaultCanvasImageRender = class extends BaseRender {
|
|
|
14210
14116
|
const {
|
|
14211
14117
|
image: url
|
|
14212
14118
|
} = image.attribute;
|
|
14213
|
-
if (!
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
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
|
+
}
|
|
14217
14125
|
const {
|
|
14218
14126
|
context: context
|
|
14219
14127
|
} = renderService.drawParams;
|
|
@@ -14598,63 +14506,58 @@ class CanvasTextLayout {
|
|
|
14598
14506
|
constructor(fontFamily, options, textMeasure) {
|
|
14599
14507
|
this.fontFamily = fontFamily, this.textOptions = options, this.textMeasure = textMeasure;
|
|
14600
14508
|
}
|
|
14601
|
-
LayoutBBox(bbox, textAlign, textBaseline
|
|
14509
|
+
LayoutBBox(bbox, textAlign, textBaseline) {
|
|
14602
14510
|
if ("left" === textAlign || "start" === textAlign) bbox.xOffset = 0;else if ("center" === textAlign) bbox.xOffset = bbox.width / -2;else {
|
|
14603
14511
|
if ("right" !== textAlign && "end" !== textAlign) throw new Error("非法的textAlign");
|
|
14604
14512
|
bbox.xOffset = -bbox.width;
|
|
14605
14513
|
}
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
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
|
|
14620
|
-
|
|
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
|
-
|
|
14633
|
-
width
|
|
14634
|
-
|
|
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
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
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
|
|
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,16 +14585,11 @@ class CanvasTextLayout {
|
|
|
14682
14585
|
};
|
|
14683
14586
|
}
|
|
14684
14587
|
lineOffset(bbox, line, textAlign, textBaseline, lineHeight, origin) {
|
|
14685
|
-
|
|
14686
|
-
const buf = 0,
|
|
14687
|
-
actualHeightWithBuf = line.ascent + line.descent + buf;
|
|
14688
|
-
actualHeightWithBuf < lineHeight - buf && ("bottom" === textBaseline ? line.topOffset += (lineHeight - actualHeightWithBuf) / 2 : "top" === textBaseline && (line.topOffset -= (lineHeight - actualHeightWithBuf) / 2));
|
|
14689
|
-
}
|
|
14690
|
-
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;
|
|
14691
14589
|
}
|
|
14692
14590
|
}
|
|
14693
14591
|
|
|
14694
|
-
const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "
|
|
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];
|
|
14695
14593
|
class Text extends Graphic {
|
|
14696
14594
|
get font() {
|
|
14697
14595
|
const textTheme = this.getGraphicTheme();
|
|
@@ -14700,22 +14598,26 @@ class Text extends Graphic {
|
|
|
14700
14598
|
get clipedText() {
|
|
14701
14599
|
var _a;
|
|
14702
14600
|
const attribute = this.attribute,
|
|
14703
|
-
textTheme = this.getGraphicTheme()
|
|
14704
|
-
|
|
14705
|
-
|
|
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();
|
|
14706
14607
|
}
|
|
14707
14608
|
get clipedWidth() {
|
|
14708
|
-
return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14609
|
+
if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14709
14610
|
}
|
|
14710
14611
|
get cliped() {
|
|
14711
14612
|
var _a, _b;
|
|
14712
14613
|
const textTheme = this.getGraphicTheme(),
|
|
14713
14614
|
attribute = this.attribute,
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14615
|
+
{
|
|
14616
|
+
maxLineWidth = textTheme.maxLineWidth,
|
|
14617
|
+
text: text,
|
|
14618
|
+
whiteSpace = textTheme.whiteSpace
|
|
14619
|
+
} = attribute;
|
|
14620
|
+
if (!Number.isFinite(maxLineWidth)) return !1;
|
|
14719
14621
|
if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
|
|
14720
14622
|
let mergedText = "";
|
|
14721
14623
|
this.cache.layoutData.lines.forEach(item => {
|
|
@@ -14726,7 +14628,10 @@ class Text extends Graphic {
|
|
|
14726
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();
|
|
14727
14629
|
}
|
|
14728
14630
|
get multilineLayout() {
|
|
14729
|
-
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;
|
|
14730
14635
|
}
|
|
14731
14636
|
get isMultiLine() {
|
|
14732
14637
|
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
@@ -14799,74 +14704,8 @@ class Text extends Graphic {
|
|
|
14799
14704
|
}
|
|
14800
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;
|
|
14801
14706
|
}
|
|
14802
|
-
updateSingallineAABBBounds(text) {
|
|
14803
|
-
this.updateMultilineAABBBounds([text]);
|
|
14804
|
-
const layoutData = this.cache.layoutData;
|
|
14805
|
-
if (layoutData) {
|
|
14806
|
-
const line = layoutData.lines[0];
|
|
14807
|
-
this.cache.clipedText = line.str, this.cache.clipedWidth = line.width;
|
|
14808
|
-
}
|
|
14809
|
-
return this._AABBBounds;
|
|
14810
|
-
}
|
|
14811
|
-
updateMultilineAABBBounds(text) {
|
|
14812
|
-
const textTheme = this.getGraphicTheme(),
|
|
14813
|
-
{
|
|
14814
|
-
direction = textTheme.direction,
|
|
14815
|
-
underlineOffset = textTheme.underlineOffset
|
|
14816
|
-
} = this.attribute,
|
|
14817
|
-
b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
|
|
14818
|
-
return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
|
|
14819
|
-
}
|
|
14820
|
-
guessLineHeightBuf(fontSize) {
|
|
14821
|
-
return fontSize ? .1 * fontSize : 0;
|
|
14822
|
-
}
|
|
14823
|
-
updateHorizontalMultilineAABBBounds(text) {
|
|
14824
|
-
var _a;
|
|
14825
|
-
const textTheme = this.getGraphicTheme(),
|
|
14826
|
-
attribute = this.attribute,
|
|
14827
|
-
{
|
|
14828
|
-
fontFamily = textTheme.fontFamily,
|
|
14829
|
-
textAlign = textTheme.textAlign,
|
|
14830
|
-
textBaseline = textTheme.textBaseline,
|
|
14831
|
-
fontSize = textTheme.fontSize,
|
|
14832
|
-
fontWeight = textTheme.fontWeight,
|
|
14833
|
-
ellipsis = textTheme.ellipsis,
|
|
14834
|
-
maxLineWidth: maxLineWidth,
|
|
14835
|
-
stroke = textTheme.stroke,
|
|
14836
|
-
wrap = textTheme.wrap,
|
|
14837
|
-
measureMode = textTheme.measureMode,
|
|
14838
|
-
lineWidth = textTheme.lineWidth,
|
|
14839
|
-
whiteSpace = textTheme.whiteSpace,
|
|
14840
|
-
suffixPosition = textTheme.suffixPosition,
|
|
14841
|
-
ignoreBuf = textTheme.ignoreBuf,
|
|
14842
|
-
keepCenterInLine = textTheme.keepCenterInLine
|
|
14843
|
-
} = attribute,
|
|
14844
|
-
buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize),
|
|
14845
|
-
lineHeight = this.getLineHeight(attribute, textTheme) + buf;
|
|
14846
|
-
if ("normal" === whiteSpace || wrap) return this.updateWrapAABBBounds(text);
|
|
14847
|
-
if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
|
|
14848
|
-
const bbox = this.cache.layoutData.bbox;
|
|
14849
|
-
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
14850
|
-
}
|
|
14851
|
-
const textMeasure = application.graphicUtil.textMeasure,
|
|
14852
|
-
layoutData = new CanvasTextLayout(fontFamily, {
|
|
14853
|
-
fontSize: fontSize,
|
|
14854
|
-
fontWeight: fontWeight,
|
|
14855
|
-
fontFamily: fontFamily,
|
|
14856
|
-
lineHeight: lineHeight
|
|
14857
|
-
}, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, {
|
|
14858
|
-
lineWidth: maxLineWidth,
|
|
14859
|
-
suffixPosition: suffixPosition,
|
|
14860
|
-
measureMode: measureMode,
|
|
14861
|
-
keepCenterInLine: keepCenterInLine
|
|
14862
|
-
}),
|
|
14863
|
-
{
|
|
14864
|
-
bbox: bbox
|
|
14865
|
-
} = layoutData;
|
|
14866
|
-
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;
|
|
14867
|
-
}
|
|
14868
14707
|
updateWrapAABBBounds(text) {
|
|
14869
|
-
var _a, _b, _c;
|
|
14708
|
+
var _a, _b, _c, _d;
|
|
14870
14709
|
const textTheme = this.getGraphicTheme(),
|
|
14871
14710
|
{
|
|
14872
14711
|
fontFamily = textTheme.fontFamily,
|
|
@@ -14880,26 +14719,22 @@ class Text extends Graphic {
|
|
|
14880
14719
|
wordBreak = textTheme.wordBreak,
|
|
14881
14720
|
fontWeight = textTheme.fontWeight,
|
|
14882
14721
|
ignoreBuf = textTheme.ignoreBuf,
|
|
14883
|
-
measureMode = textTheme.measureMode,
|
|
14884
14722
|
suffixPosition = textTheme.suffixPosition,
|
|
14885
14723
|
heightLimit = 0,
|
|
14886
|
-
lineClamp: lineClamp
|
|
14887
|
-
keepCenterInLine = textTheme.keepCenterInLine
|
|
14724
|
+
lineClamp: lineClamp
|
|
14888
14725
|
} = this.attribute,
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
if (!this.shouldUpdateShape() && (null === (
|
|
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)) {
|
|
14892
14729
|
const bbox = this.cache.layoutData.bbox;
|
|
14893
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;
|
|
14894
14731
|
}
|
|
14895
14732
|
const textMeasure = application.graphicUtil.textMeasure,
|
|
14896
|
-
|
|
14733
|
+
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
14897
14734
|
fontSize: fontSize,
|
|
14898
14735
|
fontWeight: fontWeight,
|
|
14899
|
-
fontFamily: fontFamily
|
|
14900
|
-
|
|
14901
|
-
},
|
|
14902
|
-
layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure),
|
|
14736
|
+
fontFamily: fontFamily
|
|
14737
|
+
}, textMeasure),
|
|
14903
14738
|
lines = isArray$1(text) ? text.map(l => l.toString()) : [text.toString()],
|
|
14904
14739
|
linesLayout = [],
|
|
14905
14740
|
bboxWH = [0, 0];
|
|
@@ -14909,37 +14744,29 @@ class Text extends Graphic {
|
|
|
14909
14744
|
const str = lines[i];
|
|
14910
14745
|
let needCut = !0;
|
|
14911
14746
|
if (i === lineCountLimit - 1) {
|
|
14912
|
-
const clip = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1)
|
|
14913
|
-
matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
14747
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1);
|
|
14914
14748
|
linesLayout.push({
|
|
14915
14749
|
str: clip.str,
|
|
14916
|
-
width: clip.width
|
|
14917
|
-
ascent: matrics.ascent,
|
|
14918
|
-
descent: matrics.descent,
|
|
14919
|
-
keepCenterInLine: keepCenterInLine
|
|
14750
|
+
width: clip.width
|
|
14920
14751
|
});
|
|
14921
14752
|
break;
|
|
14922
14753
|
}
|
|
14923
|
-
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);
|
|
14924
14755
|
if ("" !== str && "" === clip.str || clip.wordBreaked) {
|
|
14925
14756
|
if (ellipsis) {
|
|
14926
|
-
const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
14927
|
-
clip.str = null !== (
|
|
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;
|
|
14928
14759
|
} else clip.str = "", clip.width = 0;
|
|
14929
14760
|
needCut = !1;
|
|
14930
14761
|
}
|
|
14931
|
-
const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
14932
14762
|
linesLayout.push({
|
|
14933
14763
|
str: clip.str,
|
|
14934
|
-
width: clip.width
|
|
14935
|
-
ascent: matrics.ascent,
|
|
14936
|
-
descent: matrics.descent,
|
|
14937
|
-
keepCenterInLine: keepCenterInLine
|
|
14764
|
+
width: clip.width
|
|
14938
14765
|
});
|
|
14939
14766
|
let cutLength = clip.str.length;
|
|
14940
14767
|
if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
|
|
14941
|
-
|
|
14942
|
-
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);
|
|
14943
14770
|
}
|
|
14944
14771
|
}
|
|
14945
14772
|
let maxWidth = 0;
|
|
@@ -14952,46 +14779,235 @@ class Text extends Graphic {
|
|
|
14952
14779
|
lineWidth = 0;
|
|
14953
14780
|
for (let i = 0, len = lines.length; i < len; i++) {
|
|
14954
14781
|
if (i === lineCountLimit - 1) {
|
|
14955
|
-
const clip = textMeasure.clipTextWithSuffix(lines[i], textOptions, maxLineWidth, ellipsis, !1, suffixPosition)
|
|
14956
|
-
matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
14782
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
14957
14783
|
linesLayout.push({
|
|
14958
14784
|
str: clip.str,
|
|
14959
|
-
width: clip.width
|
|
14960
|
-
ascent: matrics.ascent,
|
|
14961
|
-
descent: matrics.descent,
|
|
14962
|
-
keepCenterInLine: keepCenterInLine
|
|
14785
|
+
width: clip.width
|
|
14963
14786
|
}), lineWidth = Math.max(lineWidth, clip.width);
|
|
14964
14787
|
break;
|
|
14965
14788
|
}
|
|
14966
|
-
text = lines[i], width = textMeasure.measureTextWidth(text, textOptions), lineWidth = Math.max(lineWidth, width)
|
|
14967
|
-
const matrics = textMeasure.measureTextPixelADscentAndWidth(text, textOptions, measureMode);
|
|
14968
|
-
linesLayout.push({
|
|
14789
|
+
text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
|
|
14969
14790
|
str: text,
|
|
14970
|
-
width: width
|
|
14971
|
-
ascent: matrics.ascent,
|
|
14972
|
-
descent: matrics.descent,
|
|
14973
|
-
keepCenterInLine: keepCenterInLine
|
|
14791
|
+
width: width
|
|
14974
14792
|
});
|
|
14975
14793
|
}
|
|
14976
14794
|
bboxWH[0] = lineWidth;
|
|
14977
14795
|
}
|
|
14978
|
-
bboxWH[1] = linesLayout.length * lineHeight;
|
|
14796
|
+
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
14979
14797
|
const bbox = {
|
|
14980
14798
|
xOffset: 0,
|
|
14981
14799
|
yOffset: 0,
|
|
14982
14800
|
width: bboxWH[0],
|
|
14983
14801
|
height: bboxWH[1]
|
|
14984
14802
|
};
|
|
14985
|
-
layoutObj.LayoutBBox(bbox, textAlign, textBaseline
|
|
14803
|
+
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
14986
14804
|
const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
14987
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;
|
|
14988
14806
|
}
|
|
14989
|
-
|
|
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) {
|
|
14990
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;
|
|
14991
14897
|
const textTheme = this.getGraphicTheme(),
|
|
14992
14898
|
textMeasure = application.graphicUtil.textMeasure;
|
|
14993
14899
|
let width;
|
|
14994
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,
|
|
14995
15011
|
{
|
|
14996
15012
|
maxLineWidth = textTheme.maxLineWidth,
|
|
14997
15013
|
ellipsis = textTheme.ellipsis,
|
|
@@ -15003,14 +15019,14 @@ class Text extends Graphic {
|
|
|
15003
15019
|
verticalMode = textTheme.verticalMode,
|
|
15004
15020
|
suffixPosition = textTheme.suffixPosition
|
|
15005
15021
|
} = attribute,
|
|
15006
|
-
lineHeight =
|
|
15022
|
+
lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
15007
15023
|
let {
|
|
15008
15024
|
textAlign = textTheme.textAlign,
|
|
15009
15025
|
textBaseline = textTheme.textBaseline
|
|
15010
15026
|
} = attribute;
|
|
15011
15027
|
if (!verticalMode) {
|
|
15012
15028
|
const t = textAlign;
|
|
15013
|
-
textAlign = null !== (
|
|
15029
|
+
textAlign = null !== (_b = Text.baselineMapAlign[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = Text.alignMapBaseline[t]) && void 0 !== _c ? _c : "top";
|
|
15014
15030
|
}
|
|
15015
15031
|
if (width = 0, !this.shouldUpdateShape() && this.cache) {
|
|
15016
15032
|
this.cache.verticalList.forEach(item => {
|
|
@@ -15058,15 +15074,6 @@ class Text extends Graphic {
|
|
|
15058
15074
|
dy = textLayoutOffsetY(textBaseline, height, fontSize);
|
|
15059
15075
|
return this._AABBBounds.set(dy, dx, dy + height, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
15060
15076
|
}
|
|
15061
|
-
getMaxWidth(theme) {
|
|
15062
|
-
var _a, _b;
|
|
15063
|
-
const attribute = this.attribute;
|
|
15064
|
-
return null !== (_b = null !== (_a = attribute.maxLineWidth) && void 0 !== _a ? _a : attribute.maxWidth) && void 0 !== _b ? _b : theme.maxWidth;
|
|
15065
|
-
}
|
|
15066
|
-
getLineHeight(attribute, textTheme) {
|
|
15067
|
-
var _a;
|
|
15068
|
-
return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
|
|
15069
|
-
}
|
|
15070
15077
|
needUpdateTags(keys) {
|
|
15071
15078
|
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
|
|
15072
15079
|
return super.needUpdateTags(keys, k);
|
|
@@ -15081,12 +15088,6 @@ class Text extends Graphic {
|
|
|
15081
15088
|
getNoWorkAnimateAttr() {
|
|
15082
15089
|
return Text.NOWORK_ANIMATE_ATTR;
|
|
15083
15090
|
}
|
|
15084
|
-
getBaselineMapAlign() {
|
|
15085
|
-
return Text.baselineMapAlign;
|
|
15086
|
-
}
|
|
15087
|
-
getAlignMapBaseline() {
|
|
15088
|
-
return Text.alignMapBaseline;
|
|
15089
|
-
}
|
|
15090
15091
|
}
|
|
15091
15092
|
Text.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
15092
15093
|
ellipsis: 1,
|
|
@@ -15165,10 +15166,7 @@ class WrapText extends Text {
|
|
|
15165
15166
|
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15166
15167
|
linesLayout.push({
|
|
15167
15168
|
str: clip.str,
|
|
15168
|
-
width: clip.width
|
|
15169
|
-
ascent: 0,
|
|
15170
|
-
descent: 0,
|
|
15171
|
-
keepCenterInLine: !1
|
|
15169
|
+
width: clip.width
|
|
15172
15170
|
});
|
|
15173
15171
|
break;
|
|
15174
15172
|
}
|
|
@@ -15182,10 +15180,7 @@ class WrapText extends Text {
|
|
|
15182
15180
|
}
|
|
15183
15181
|
if (linesLayout.push({
|
|
15184
15182
|
str: clip.str,
|
|
15185
|
-
width: clip.width
|
|
15186
|
-
ascent: 0,
|
|
15187
|
-
descent: 0,
|
|
15188
|
-
keepCenterInLine: !1
|
|
15183
|
+
width: clip.width
|
|
15189
15184
|
}), clip.str.length === str.length) ;else if (needCut) {
|
|
15190
15185
|
const newStr = str.substring(clip.str.length);
|
|
15191
15186
|
lines.splice(i + 1, 0, newStr);
|
|
@@ -15204,19 +15199,13 @@ class WrapText extends Text {
|
|
|
15204
15199
|
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15205
15200
|
linesLayout.push({
|
|
15206
15201
|
str: clip.str,
|
|
15207
|
-
width: clip.width
|
|
15208
|
-
ascent: 0,
|
|
15209
|
-
descent: 0,
|
|
15210
|
-
keepCenterInLine: !1
|
|
15202
|
+
width: clip.width
|
|
15211
15203
|
}), lineWidth = Math.max(lineWidth, clip.width);
|
|
15212
15204
|
break;
|
|
15213
15205
|
}
|
|
15214
15206
|
text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
|
|
15215
15207
|
str: text,
|
|
15216
|
-
width: width
|
|
15217
|
-
ascent: 0,
|
|
15218
|
-
descent: 0,
|
|
15219
|
-
keepCenterInLine: !1
|
|
15208
|
+
width: width
|
|
15220
15209
|
});
|
|
15221
15210
|
}
|
|
15222
15211
|
bboxWH[0] = lineWidth;
|
|
@@ -15260,9 +15249,6 @@ class BaseSymbol {
|
|
|
15260
15249
|
bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
|
|
15261
15250
|
} else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
|
|
15262
15251
|
}
|
|
15263
|
-
parseSize(size) {
|
|
15264
|
-
return isNumber$1(size) ? size : Math.min(size[0], size[1]);
|
|
15265
|
-
}
|
|
15266
15252
|
}
|
|
15267
15253
|
|
|
15268
15254
|
function circle(ctx, r, x, y, z) {
|
|
@@ -15273,13 +15259,13 @@ class CircleSymbol extends BaseSymbol {
|
|
|
15273
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";
|
|
15274
15260
|
}
|
|
15275
15261
|
draw(ctx, size, x, y, z) {
|
|
15276
|
-
return circle(ctx,
|
|
15262
|
+
return circle(ctx, size / 2, x, y, z);
|
|
15277
15263
|
}
|
|
15278
15264
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15279
|
-
return circle(ctx,
|
|
15265
|
+
return circle(ctx, size / 2 + offset, x, y, z);
|
|
15280
15266
|
}
|
|
15281
15267
|
drawToSvgPath(size, x, y, z) {
|
|
15282
|
-
const r =
|
|
15268
|
+
const r = size / 2;
|
|
15283
15269
|
return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${2 * r},0 a ${r},${r} 0 1,0 -${2 * r},0`;
|
|
15284
15270
|
}
|
|
15285
15271
|
}
|
|
@@ -15296,10 +15282,10 @@ class CrossSymbol extends BaseSymbol {
|
|
|
15296
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";
|
|
15297
15283
|
}
|
|
15298
15284
|
draw(ctx, size, x, y, z) {
|
|
15299
|
-
return cross(ctx,
|
|
15285
|
+
return cross(ctx, size / 6, x, y, z);
|
|
15300
15286
|
}
|
|
15301
15287
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15302
|
-
return crossOffset(ctx,
|
|
15288
|
+
return crossOffset(ctx, size / 6, x, y, offset, z);
|
|
15303
15289
|
}
|
|
15304
15290
|
}
|
|
15305
15291
|
var cross$1 = new CrossSymbol();
|
|
@@ -15312,13 +15298,13 @@ class DiamondSymbol extends BaseSymbol {
|
|
|
15312
15298
|
super(...arguments), this.type = "diamond", this.pathStr = "M-0.5,0L0,-0.5L0.5,0L0,0.5Z";
|
|
15313
15299
|
}
|
|
15314
15300
|
draw(ctx, size, x, y, z) {
|
|
15315
|
-
return diamond(ctx,
|
|
15301
|
+
return diamond(ctx, size / 2, x, y, z);
|
|
15316
15302
|
}
|
|
15317
15303
|
drawFitDir(ctx, size, x, y, z) {
|
|
15318
|
-
return diamond(ctx,
|
|
15304
|
+
return diamond(ctx, size / 2, x, y, z);
|
|
15319
15305
|
}
|
|
15320
15306
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15321
|
-
return diamond(ctx,
|
|
15307
|
+
return diamond(ctx, size / 2 + offset, x, y, z);
|
|
15322
15308
|
}
|
|
15323
15309
|
}
|
|
15324
15310
|
var diamond$1 = new DiamondSymbol();
|
|
@@ -15332,10 +15318,10 @@ class SquareSymbol extends BaseSymbol {
|
|
|
15332
15318
|
super(...arguments), this.type = "square", this.pathStr = "M-0.5,-0.5h1v1h-1Z";
|
|
15333
15319
|
}
|
|
15334
15320
|
draw(ctx, size, x, y) {
|
|
15335
|
-
return square(ctx,
|
|
15321
|
+
return square(ctx, size / 2, x, y);
|
|
15336
15322
|
}
|
|
15337
15323
|
drawOffset(ctx, size, x, y, offset) {
|
|
15338
|
-
return square(ctx,
|
|
15324
|
+
return square(ctx, size / 2 + offset, x, y);
|
|
15339
15325
|
}
|
|
15340
15326
|
}
|
|
15341
15327
|
var square$1 = new SquareSymbol();
|
|
@@ -15349,10 +15335,10 @@ class TriangleUpSymbol extends BaseSymbol {
|
|
|
15349
15335
|
super(...arguments), this.type = "triangleUp", this.pathStr = "M0.5,0.5 L-0.5,0.5 L0,-0.5 Z";
|
|
15350
15336
|
}
|
|
15351
15337
|
draw(ctx, size, x, y) {
|
|
15352
|
-
return trianglUpOffset(ctx,
|
|
15338
|
+
return trianglUpOffset(ctx, size / 2, x, y);
|
|
15353
15339
|
}
|
|
15354
15340
|
drawOffset(ctx, size, x, y, offset) {
|
|
15355
|
-
return trianglUpOffset(ctx,
|
|
15341
|
+
return trianglUpOffset(ctx, size / 2, x, y, offset);
|
|
15356
15342
|
}
|
|
15357
15343
|
}
|
|
15358
15344
|
var triangleUp = new TriangleUpSymbol();
|
|
@@ -15384,10 +15370,10 @@ class StarSymbol extends BaseSymbol {
|
|
|
15384
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";
|
|
15385
15371
|
}
|
|
15386
15372
|
draw(ctx, size, transX, transY) {
|
|
15387
|
-
return star(ctx,
|
|
15373
|
+
return star(ctx, size / 2, transX, transY);
|
|
15388
15374
|
}
|
|
15389
15375
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15390
|
-
return star(ctx,
|
|
15376
|
+
return star(ctx, size / 2 + offset, transX, transY);
|
|
15391
15377
|
}
|
|
15392
15378
|
}
|
|
15393
15379
|
var star$1 = new StarSymbol();
|
|
@@ -15405,10 +15391,10 @@ class ArrowSymbol extends BaseSymbol {
|
|
|
15405
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";
|
|
15406
15392
|
}
|
|
15407
15393
|
draw(ctx, size, transX, transY) {
|
|
15408
|
-
return arrow(ctx,
|
|
15394
|
+
return arrow(ctx, size / 2, transX, transY);
|
|
15409
15395
|
}
|
|
15410
15396
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15411
|
-
return arrow(ctx,
|
|
15397
|
+
return arrow(ctx, size / 2 + offset, transX, transY);
|
|
15412
15398
|
}
|
|
15413
15399
|
}
|
|
15414
15400
|
var arrow$1 = new ArrowSymbol();
|
|
@@ -15422,10 +15408,10 @@ class WedgeSymbol extends BaseSymbol {
|
|
|
15422
15408
|
super(...arguments), this.type = "wedge", this.pathStr = "M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z";
|
|
15423
15409
|
}
|
|
15424
15410
|
draw(ctx, size, transX, transY) {
|
|
15425
|
-
return wedge(ctx,
|
|
15411
|
+
return wedge(ctx, size / 2, transX, transY);
|
|
15426
15412
|
}
|
|
15427
15413
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15428
|
-
return wedge(ctx,
|
|
15414
|
+
return wedge(ctx, size / 2 + offset, transX, transY);
|
|
15429
15415
|
}
|
|
15430
15416
|
}
|
|
15431
15417
|
var wedge$1 = new WedgeSymbol();
|
|
@@ -15438,10 +15424,10 @@ class StrokeSymbol extends BaseSymbol {
|
|
|
15438
15424
|
super(...arguments), this.type = "stroke", this.pathStr = "";
|
|
15439
15425
|
}
|
|
15440
15426
|
draw(ctx, size, transX, transY) {
|
|
15441
|
-
return stroke(ctx,
|
|
15427
|
+
return stroke(ctx, size / 2, transX, transY);
|
|
15442
15428
|
}
|
|
15443
15429
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15444
|
-
return stroke(ctx,
|
|
15430
|
+
return stroke(ctx, size / 2 + offset, transX, transY);
|
|
15445
15431
|
}
|
|
15446
15432
|
}
|
|
15447
15433
|
var stroke$1 = new StrokeSymbol();
|
|
@@ -15463,10 +15449,10 @@ class WyeSymbol extends BaseSymbol {
|
|
|
15463
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";
|
|
15464
15450
|
}
|
|
15465
15451
|
draw(ctx, size, transX, transY) {
|
|
15466
|
-
return wye(ctx,
|
|
15452
|
+
return wye(ctx, size / 2, transX, transY);
|
|
15467
15453
|
}
|
|
15468
15454
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15469
|
-
return wye(ctx,
|
|
15455
|
+
return wye(ctx, size / 2 + offset, transX, transY);
|
|
15470
15456
|
}
|
|
15471
15457
|
}
|
|
15472
15458
|
var wye$1 = new WyeSymbol();
|
|
@@ -15479,10 +15465,10 @@ class TriangleLeftSymbol extends BaseSymbol {
|
|
|
15479
15465
|
super(...arguments), this.type = "triangleLeft", this.pathStr = "M-0.5,0 L0.5,0.5 L0.5,-0.5 Z";
|
|
15480
15466
|
}
|
|
15481
15467
|
draw(ctx, size, x, y) {
|
|
15482
|
-
return trianglLeftOffset(ctx,
|
|
15468
|
+
return trianglLeftOffset(ctx, size / 2, x, y, 0);
|
|
15483
15469
|
}
|
|
15484
15470
|
drawOffset(ctx, size, x, y, offset) {
|
|
15485
|
-
return trianglLeftOffset(ctx,
|
|
15471
|
+
return trianglLeftOffset(ctx, size / 2, x, y, offset);
|
|
15486
15472
|
}
|
|
15487
15473
|
}
|
|
15488
15474
|
var triangleLeft = new TriangleLeftSymbol();
|
|
@@ -15496,10 +15482,10 @@ class TriangleRightSymbol extends BaseSymbol {
|
|
|
15496
15482
|
super(...arguments), this.type = "triangleRight", this.pathStr = "M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z";
|
|
15497
15483
|
}
|
|
15498
15484
|
draw(ctx, size, x, y) {
|
|
15499
|
-
return trianglRightOffset(ctx,
|
|
15485
|
+
return trianglRightOffset(ctx, size / 2, x, y);
|
|
15500
15486
|
}
|
|
15501
15487
|
drawOffset(ctx, size, x, y, offset) {
|
|
15502
|
-
return trianglRightOffset(ctx,
|
|
15488
|
+
return trianglRightOffset(ctx, size / 2, x, y, offset);
|
|
15503
15489
|
}
|
|
15504
15490
|
}
|
|
15505
15491
|
var triangleRight = new TriangleRightSymbol();
|
|
@@ -15513,10 +15499,10 @@ class TriangleDownSymbol extends BaseSymbol {
|
|
|
15513
15499
|
super(...arguments), this.type = "triangleDown", this.pathStr = "M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z";
|
|
15514
15500
|
}
|
|
15515
15501
|
draw(ctx, size, x, y) {
|
|
15516
|
-
return trianglDownOffset(ctx,
|
|
15502
|
+
return trianglDownOffset(ctx, size / 2, x, y);
|
|
15517
15503
|
}
|
|
15518
15504
|
drawOffset(ctx, size, x, y, offset) {
|
|
15519
|
-
return trianglDownOffset(ctx,
|
|
15505
|
+
return trianglDownOffset(ctx, size / 2, x, y, offset);
|
|
15520
15506
|
}
|
|
15521
15507
|
}
|
|
15522
15508
|
var triangleDown = new TriangleDownSymbol();
|
|
@@ -15531,10 +15517,10 @@ class ThinTriangleSymbol extends BaseSymbol {
|
|
|
15531
15517
|
super(...arguments), this.type = "thinTriangle", this.pathStr = "M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z";
|
|
15532
15518
|
}
|
|
15533
15519
|
draw(ctx, size, x, y) {
|
|
15534
|
-
return thinTriangle(ctx,
|
|
15520
|
+
return thinTriangle(ctx, size / 2 / sqrt3, x, y);
|
|
15535
15521
|
}
|
|
15536
15522
|
drawOffset(ctx, size, x, y, offset) {
|
|
15537
|
-
return thinTriangle(ctx,
|
|
15523
|
+
return thinTriangle(ctx, size / 2 / sqrt3 + offset, x, y);
|
|
15538
15524
|
}
|
|
15539
15525
|
}
|
|
15540
15526
|
var thinTriangle$1 = new ThinTriangleSymbol();
|
|
@@ -15548,10 +15534,10 @@ class Arrow2LeftSymbol extends BaseSymbol {
|
|
|
15548
15534
|
super(...arguments), this.type = "arrow2Left", this.pathStr = "M 0.25 -0.5 L -0.25 0 l 0.25 0.5";
|
|
15549
15535
|
}
|
|
15550
15536
|
draw(ctx, size, transX, transY) {
|
|
15551
|
-
return arrow2Left(ctx,
|
|
15537
|
+
return arrow2Left(ctx, size / 4, transX, transY);
|
|
15552
15538
|
}
|
|
15553
15539
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15554
|
-
return arrow2Left(ctx,
|
|
15540
|
+
return arrow2Left(ctx, size / 4 + offset, transX, transY);
|
|
15555
15541
|
}
|
|
15556
15542
|
}
|
|
15557
15543
|
var arrow2Left$1 = new Arrow2LeftSymbol();
|
|
@@ -15565,10 +15551,10 @@ class Arrow2RightSymbol extends BaseSymbol {
|
|
|
15565
15551
|
super(...arguments), this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
|
|
15566
15552
|
}
|
|
15567
15553
|
draw(ctx, size, transX, transY) {
|
|
15568
|
-
return arrow2Right(ctx,
|
|
15554
|
+
return arrow2Right(ctx, size / 4, transX, transY);
|
|
15569
15555
|
}
|
|
15570
15556
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15571
|
-
return arrow2Right(ctx,
|
|
15557
|
+
return arrow2Right(ctx, size / 4 + offset, transX, transY);
|
|
15572
15558
|
}
|
|
15573
15559
|
}
|
|
15574
15560
|
var arrow2Right$1 = new Arrow2RightSymbol();
|
|
@@ -15582,10 +15568,10 @@ class Arrow2UpSymbol extends BaseSymbol {
|
|
|
15582
15568
|
super(...arguments), this.type = "arrow2Up", this.pathStr = "M -0.5 0.25 L 0 -0.25 l 0.5 0.25";
|
|
15583
15569
|
}
|
|
15584
15570
|
draw(ctx, size, transX, transY) {
|
|
15585
|
-
return arrow2Up(ctx,
|
|
15571
|
+
return arrow2Up(ctx, size / 4, transX, transY);
|
|
15586
15572
|
}
|
|
15587
15573
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15588
|
-
return arrow2Up(ctx,
|
|
15574
|
+
return arrow2Up(ctx, size / 4 + offset, transX, transY);
|
|
15589
15575
|
}
|
|
15590
15576
|
}
|
|
15591
15577
|
var arrow2Up$1 = new Arrow2UpSymbol();
|
|
@@ -15599,10 +15585,10 @@ class Arrow2DownSymbol extends BaseSymbol {
|
|
|
15599
15585
|
super(...arguments), this.type = "arrow2Down", this.pathStr = "M -0.5 -0.25 L 0 0.25 l 0.5 -0.25";
|
|
15600
15586
|
}
|
|
15601
15587
|
draw(ctx, size, transX, transY) {
|
|
15602
|
-
return arrow2Down(ctx,
|
|
15588
|
+
return arrow2Down(ctx, size / 4, transX, transY);
|
|
15603
15589
|
}
|
|
15604
15590
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
15605
|
-
return arrow2Down(ctx,
|
|
15591
|
+
return arrow2Down(ctx, size / 4 + offset, transX, transY);
|
|
15606
15592
|
}
|
|
15607
15593
|
}
|
|
15608
15594
|
var arrow2Down$1 = new Arrow2DownSymbol();
|
|
@@ -15615,13 +15601,13 @@ class LineVSymbol extends BaseSymbol {
|
|
|
15615
15601
|
super(...arguments), this.type = "lineV", this.pathStr = "M0,-0.5L0,0.5";
|
|
15616
15602
|
}
|
|
15617
15603
|
draw(ctx, size, x, y, z) {
|
|
15618
|
-
return lineV(ctx,
|
|
15604
|
+
return lineV(ctx, size / 2, x, y);
|
|
15619
15605
|
}
|
|
15620
15606
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15621
|
-
return lineV(ctx,
|
|
15607
|
+
return lineV(ctx, size / 2 + offset, x, y);
|
|
15622
15608
|
}
|
|
15623
15609
|
drawToSvgPath(size, x, y, z) {
|
|
15624
|
-
const r =
|
|
15610
|
+
const r = size / 2;
|
|
15625
15611
|
return `M ${x}, ${y - r} L ${x},${y + r}`;
|
|
15626
15612
|
}
|
|
15627
15613
|
}
|
|
@@ -15635,13 +15621,13 @@ class LineHSymbol extends BaseSymbol {
|
|
|
15635
15621
|
super(...arguments), this.type = "lineH", this.pathStr = "M-0.5,0L0.5,0";
|
|
15636
15622
|
}
|
|
15637
15623
|
draw(ctx, size, x, y, z) {
|
|
15638
|
-
return lineH(ctx,
|
|
15624
|
+
return lineH(ctx, size / 2, x, y);
|
|
15639
15625
|
}
|
|
15640
15626
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15641
|
-
return lineH(ctx,
|
|
15627
|
+
return lineH(ctx, size / 2 + offset, x, y);
|
|
15642
15628
|
}
|
|
15643
15629
|
drawToSvgPath(size, x, y, z) {
|
|
15644
|
-
const r =
|
|
15630
|
+
const r = size / 2;
|
|
15645
15631
|
return `M ${x - r}, ${y} L ${x + r},${y}`;
|
|
15646
15632
|
}
|
|
15647
15633
|
}
|
|
@@ -15655,13 +15641,13 @@ class CloseSymbol extends BaseSymbol {
|
|
|
15655
15641
|
super(...arguments), this.type = "close", this.pathStr = "M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5";
|
|
15656
15642
|
}
|
|
15657
15643
|
draw(ctx, size, x, y, z) {
|
|
15658
|
-
return close(ctx,
|
|
15644
|
+
return close(ctx, size / 2, x, y);
|
|
15659
15645
|
}
|
|
15660
15646
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
15661
|
-
return close(ctx,
|
|
15647
|
+
return close(ctx, size / 2 + offset, x, y);
|
|
15662
15648
|
}
|
|
15663
15649
|
drawToSvgPath(size, x, y, z) {
|
|
15664
|
-
const r =
|
|
15650
|
+
const r = size / 2;
|
|
15665
15651
|
return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
|
|
15666
15652
|
}
|
|
15667
15653
|
}
|
|
@@ -15695,18 +15681,15 @@ class CustomSymbolClass {
|
|
|
15695
15681
|
this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
|
|
15696
15682
|
}
|
|
15697
15683
|
drawOffset(ctx, size, x, y, offset, z, cb) {
|
|
15698
|
-
return
|
|
15684
|
+
return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
|
|
15699
15685
|
ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size), cb && cb(item.path, item.attribute);
|
|
15700
15686
|
}), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset), !1);
|
|
15701
15687
|
}
|
|
15702
15688
|
draw(ctx, size, x, y, z, cb) {
|
|
15703
|
-
return
|
|
15704
|
-
}
|
|
15705
|
-
parseSize(size) {
|
|
15706
|
-
return isNumber$1(size) ? size : Math.min(size[0], size[1]);
|
|
15689
|
+
return this.drawOffset(ctx, size, x, y, 0, z, cb);
|
|
15707
15690
|
}
|
|
15708
15691
|
bounds(size, bounds) {
|
|
15709
|
-
if (
|
|
15692
|
+
if (this.isSvg) {
|
|
15710
15693
|
if (!this.svgCache) return;
|
|
15711
15694
|
return bounds.clear(), void this.svgCache.forEach(_ref => {
|
|
15712
15695
|
let {
|
|
@@ -16389,11 +16372,7 @@ class Paragraph {
|
|
|
16389
16372
|
case "sub":
|
|
16390
16373
|
baseline += this.descent / 2;
|
|
16391
16374
|
}
|
|
16392
|
-
"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);
|
|
16393
|
-
const {
|
|
16394
|
-
lineWidth = 1
|
|
16395
|
-
} = this.character;
|
|
16396
|
-
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();
|
|
16397
16376
|
}
|
|
16398
16377
|
getWidthWithEllips(direction) {
|
|
16399
16378
|
let text = this.text;
|
|
@@ -18610,7 +18589,7 @@ class Stage extends Group {
|
|
|
18610
18589
|
constructor() {
|
|
18611
18590
|
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18612
18591
|
var _a;
|
|
18613
|
-
super({}), this.
|
|
18592
|
+
super({}), this._onVisibleChange = visible => {
|
|
18614
18593
|
if (!(this._skipRender < 0)) if (visible) {
|
|
18615
18594
|
if (this.dirtyBounds) {
|
|
18616
18595
|
const b = this.window.getViewBox();
|
|
@@ -18621,10 +18600,7 @@ class Stage extends Group {
|
|
|
18621
18600
|
}, this.beforeRender = stage => {
|
|
18622
18601
|
this._beforeRender && this._beforeRender(stage);
|
|
18623
18602
|
}, this.afterRender = stage => {
|
|
18624
|
-
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null
|
|
18625
|
-
}, this.afterTickCb = () => {
|
|
18626
|
-
var _a;
|
|
18627
|
-
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;
|
|
18628
18604
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
18629
18605
|
beforeRender: new SyncHook(["stage"]),
|
|
18630
18606
|
afterRender: new SyncHook(["stage"])
|
|
@@ -18641,7 +18617,7 @@ class Stage extends Group {
|
|
|
18641
18617
|
main: !0
|
|
18642
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({
|
|
18643
18619
|
background: this._background
|
|
18644
|
-
})
|
|
18620
|
+
});
|
|
18645
18621
|
}
|
|
18646
18622
|
pauseRender() {
|
|
18647
18623
|
let sr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
@@ -18870,7 +18846,7 @@ class Stage extends Group {
|
|
|
18870
18846
|
if ("released" === this.releaseStatus) return;
|
|
18871
18847
|
this.ticker.start(), this.timeline.resume();
|
|
18872
18848
|
const state = this.state;
|
|
18873
|
-
this.state = "rendering", this.
|
|
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++;
|
|
18874
18850
|
}
|
|
18875
18851
|
combineLayersToWindow() {
|
|
18876
18852
|
if ("harmony" === this.global.env) {
|
|
@@ -18976,7 +18952,7 @@ class Stage extends Group {
|
|
|
18976
18952
|
layer.release();
|
|
18977
18953
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
18978
18954
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
18979
|
-
}), this.interactiveLayer.release()), this.window.release(), this.ticker.remTimeline(this.timeline), this.
|
|
18955
|
+
}), this.interactiveLayer.release()), this.window.release(), this.ticker.remTimeline(this.timeline), this.renderService.renderTreeRoots = [];
|
|
18980
18956
|
}
|
|
18981
18957
|
setStage(stage) {}
|
|
18982
18958
|
dirty(b, matrix) {
|
|
@@ -19054,6 +19030,8 @@ function createStage(params) {
|
|
|
19054
19030
|
return new Stage(params);
|
|
19055
19031
|
}
|
|
19056
19032
|
|
|
19033
|
+
const strCommandMap = ["arc", "arcTo", "bezierCurveTo", "closePath", "ellipse", "lineTo", "moveTo", "quadraticCurveTo", "rect"];
|
|
19034
|
+
|
|
19057
19035
|
var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
19058
19036
|
var d,
|
|
19059
19037
|
c = arguments.length,
|
|
@@ -23674,9 +23652,11 @@ function jsx(type, config) {
|
|
|
23674
23652
|
name: name,
|
|
23675
23653
|
id: id,
|
|
23676
23654
|
attribute: attribute,
|
|
23677
|
-
stateProxy: stateProxy
|
|
23655
|
+
stateProxy: stateProxy,
|
|
23656
|
+
animation: animation,
|
|
23657
|
+
timeline: timeline
|
|
23678
23658
|
} = _a,
|
|
23679
|
-
props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy"]);
|
|
23659
|
+
props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy", "animation", "timeline"]);
|
|
23680
23660
|
let c = type;
|
|
23681
23661
|
isString$1(type) && (c = graphicCreator[type]);
|
|
23682
23662
|
const childrenList = [];
|
|
@@ -23685,7 +23665,13 @@ function jsx(type, config) {
|
|
|
23685
23665
|
}
|
|
23686
23666
|
children.length && flatten(1 === children.length ? children[0] : children, childrenList);
|
|
23687
23667
|
const g = "Group" === c.name ? new c(attribute) : c(config);
|
|
23688
|
-
|
|
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;
|
|
23689
23675
|
}
|
|
23690
23676
|
function parseToGraphic$1(g, childrenList, props) {
|
|
23691
23677
|
let out,
|
|
@@ -23953,7 +23939,7 @@ class Gesture extends EventEmitter {
|
|
|
23953
23939
|
startTime: startTime,
|
|
23954
23940
|
startPoints: startPoints
|
|
23955
23941
|
} = this;
|
|
23956
|
-
if (
|
|
23942
|
+
if (eventType) return eventType;
|
|
23957
23943
|
let type;
|
|
23958
23944
|
return type = clock.now() - startTime > this.config.press.time && calcDistance(startPoints[0], point) < this.config.press.threshold ? "press" : "pan", this.eventType = type, type;
|
|
23959
23945
|
}
|
|
@@ -24485,10 +24471,9 @@ let BrowserContext2d = class {
|
|
|
24485
24471
|
lineJoin = defaultParams.lineJoin,
|
|
24486
24472
|
lineDash = defaultParams.lineDash,
|
|
24487
24473
|
lineCap = defaultParams.lineCap,
|
|
24488
|
-
miterLimit = defaultParams.miterLimit
|
|
24489
|
-
keepStrokeScale = defaultParams.keepStrokeScale
|
|
24474
|
+
miterLimit = defaultParams.miterLimit
|
|
24490
24475
|
} = attribute;
|
|
24491
|
-
_context.lineWidth =
|
|
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;
|
|
24492
24477
|
}
|
|
24493
24478
|
}
|
|
24494
24479
|
setTextStyleWithoutAlignBaseline(params, defaultParams, z) {
|
|
@@ -24912,7 +24897,7 @@ class DynamicB {
|
|
|
24912
24897
|
function createImageElement$1(src) {
|
|
24913
24898
|
let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
24914
24899
|
const img = document.createElement("img");
|
|
24915
|
-
if (img.crossOrigin = "anonymous", isSvg) {
|
|
24900
|
+
if (application.global.isImageAnonymous && (img.crossOrigin = "anonymous"), isSvg) {
|
|
24916
24901
|
const data = new Blob([src], {
|
|
24917
24902
|
type: "image/svg+xml"
|
|
24918
24903
|
});
|
|
@@ -25388,9 +25373,8 @@ class PickerBase {
|
|
|
25388
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) => {
|
|
25389
25374
|
if (picked) return !0;
|
|
25390
25375
|
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
25391
|
-
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
25392
|
-
|
|
25393
|
-
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;
|
|
25394
25378
|
}), pickContext.highPerformanceRestore(), picked;
|
|
25395
25379
|
}
|
|
25396
25380
|
}
|
|
@@ -25663,9 +25647,8 @@ class RectPickerBase {
|
|
|
25663
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) => {
|
|
25664
25648
|
if (picked) return !0;
|
|
25665
25649
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
25666
|
-
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
25667
|
-
|
|
25668
|
-
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;
|
|
25669
25652
|
});else {
|
|
25670
25653
|
const {
|
|
25671
25654
|
fill = rectAttribute.fill,
|
|
@@ -25979,10 +25962,9 @@ let LynxContext2d = class extends BrowserContext2d {
|
|
|
25979
25962
|
lineJoin = defaultParams.lineJoin,
|
|
25980
25963
|
lineDash = defaultParams.lineDash,
|
|
25981
25964
|
lineCap = defaultParams.lineCap,
|
|
25982
|
-
miterLimit = defaultParams.miterLimit
|
|
25983
|
-
keepStrokeScale = defaultParams.keepStrokeScale
|
|
25965
|
+
miterLimit = defaultParams.miterLimit
|
|
25984
25966
|
} = attribute;
|
|
25985
|
-
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth =
|
|
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;
|
|
25986
25968
|
}
|
|
25987
25969
|
}
|
|
25988
25970
|
measureText(text) {
|
|
@@ -26610,10 +26592,9 @@ let TaroContext2d = class extends BrowserContext2d {
|
|
|
26610
26592
|
lineJoin = defaultParams.lineJoin,
|
|
26611
26593
|
lineDash = defaultParams.lineDash,
|
|
26612
26594
|
lineCap = defaultParams.lineCap,
|
|
26613
|
-
miterLimit = defaultParams.miterLimit
|
|
26614
|
-
keepStrokeScale = defaultParams.keepStrokeScale
|
|
26595
|
+
miterLimit = defaultParams.miterLimit
|
|
26615
26596
|
} = attribute;
|
|
26616
|
-
_context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(
|
|
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);
|
|
26617
26598
|
}
|
|
26618
26599
|
}
|
|
26619
26600
|
setTextStyleWithoutAlignBaseline(params, defaultParams) {
|
|
@@ -27653,10 +27634,9 @@ let HarmonyContext2d = class extends BrowserContext2d {
|
|
|
27653
27634
|
lineJoin = defaultParams.lineJoin,
|
|
27654
27635
|
lineDash = defaultParams.lineDash,
|
|
27655
27636
|
lineCap = defaultParams.lineCap,
|
|
27656
|
-
miterLimit = defaultParams.miterLimit
|
|
27657
|
-
keepStrokeScale = defaultParams.keepStrokeScale
|
|
27637
|
+
miterLimit = defaultParams.miterLimit
|
|
27658
27638
|
} = attribute;
|
|
27659
|
-
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth =
|
|
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;
|
|
27660
27640
|
}
|
|
27661
27641
|
}
|
|
27662
27642
|
measureText(text) {
|
|
@@ -28063,9 +28043,8 @@ class BaseLinePicker extends BaseRender {
|
|
|
28063
28043
|
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
28064
28044
|
if (picked) return !0;
|
|
28065
28045
|
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
28066
|
-
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
28067
|
-
|
|
28068
|
-
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;
|
|
28069
28048
|
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
28070
28049
|
}
|
|
28071
28050
|
}
|
|
@@ -28200,9 +28179,8 @@ let DefaultCanvasSymbolPicker = class extends Base3dPicker {
|
|
|
28200
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) => {
|
|
28201
28180
|
if (picked) return !0;
|
|
28202
28181
|
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
28203
|
-
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
28204
|
-
|
|
28205
|
-
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;
|
|
28206
28184
|
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
28207
28185
|
}
|
|
28208
28186
|
};
|
|
@@ -28639,7 +28617,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28639
28617
|
|
|
28640
28618
|
const roughModule = _roughModule;
|
|
28641
28619
|
|
|
28642
|
-
const version = "0.21.0-alpha.
|
|
28620
|
+
const version = "0.21.0-alpha.13";
|
|
28643
28621
|
preLoadAllModule();
|
|
28644
28622
|
if (isBrowserEnv()) {
|
|
28645
28623
|
loadBrowserEnv(container);
|
|
@@ -28672,4 +28650,4 @@ registerReactAttributePlugin();
|
|
|
28672
28650
|
registerDirectionalLight();
|
|
28673
28651
|
registerOrthoCamera();
|
|
28674
28652
|
|
|
28675
|
-
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, _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 };
|