@visactor/vrender-core 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/animate/Ticker/default-ticker.d.ts +2 -4
- package/cjs/animate/Ticker/default-ticker.js +5 -8
- package/cjs/animate/Ticker/default-ticker.js.map +1 -1
- package/cjs/animate/custom-animate.d.ts +0 -2
- package/cjs/animate/custom-animate.js +2 -11
- package/cjs/animate/custom-animate.js.map +1 -1
- package/cjs/core/contributions/textMeasure/AtextMeasure.d.ts +4 -56
- package/cjs/core/contributions/textMeasure/AtextMeasure.js +14 -107
- package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/cjs/core/contributions/textMeasure/layout.d.ts +3 -8
- package/cjs/core/contributions/textMeasure/layout.js +40 -45
- package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
- package/cjs/core/global.d.ts +3 -0
- package/cjs/core/global.js +7 -1
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/stage.d.ts +0 -2
- package/cjs/core/stage.js +5 -9
- package/cjs/core/stage.js.map +1 -1
- package/cjs/graphic/builtin-symbol/arrow.js +2 -2
- package/cjs/graphic/builtin-symbol/arrow.js.map +1 -1
- package/cjs/graphic/builtin-symbol/arrow2-down.js +2 -2
- package/cjs/graphic/builtin-symbol/arrow2-down.js.map +1 -1
- package/cjs/graphic/builtin-symbol/arrow2-left.js +2 -2
- package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
- package/cjs/graphic/builtin-symbol/arrow2-right.js +2 -2
- package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
- package/cjs/graphic/builtin-symbol/arrow2-up.js +2 -2
- package/cjs/graphic/builtin-symbol/arrow2-up.js.map +1 -1
- package/cjs/graphic/builtin-symbol/base.d.ts +0 -1
- package/cjs/graphic/builtin-symbol/base.js +0 -3
- package/cjs/graphic/builtin-symbol/base.js.map +1 -1
- package/cjs/graphic/builtin-symbol/circle.js +3 -3
- package/cjs/graphic/builtin-symbol/circle.js.map +1 -1
- package/cjs/graphic/builtin-symbol/close.js +3 -3
- package/cjs/graphic/builtin-symbol/close.js.map +1 -1
- package/cjs/graphic/builtin-symbol/cross.js +2 -2
- package/cjs/graphic/builtin-symbol/cross.js.map +1 -1
- package/cjs/graphic/builtin-symbol/diamond.js +3 -3
- package/cjs/graphic/builtin-symbol/diamond.js.map +1 -1
- package/cjs/graphic/builtin-symbol/line-h.js +3 -3
- package/cjs/graphic/builtin-symbol/line-h.js.map +1 -1
- package/cjs/graphic/builtin-symbol/line-v.js +3 -3
- package/cjs/graphic/builtin-symbol/line-v.js.map +1 -1
- package/cjs/graphic/builtin-symbol/square.js +2 -2
- package/cjs/graphic/builtin-symbol/square.js.map +1 -1
- package/cjs/graphic/builtin-symbol/star.js +2 -2
- package/cjs/graphic/builtin-symbol/star.js.map +1 -1
- package/cjs/graphic/builtin-symbol/stroke.js +2 -2
- package/cjs/graphic/builtin-symbol/stroke.js.map +1 -1
- package/cjs/graphic/builtin-symbol/thin-triangle.js +2 -2
- package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-down.js +2 -2
- package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-left.js +2 -2
- package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-right.js +2 -2
- package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-up.js +2 -2
- package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
- package/cjs/graphic/builtin-symbol/utils.d.ts +0 -1
- package/cjs/graphic/builtin-symbol/utils.js +3 -6
- package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
- package/cjs/graphic/builtin-symbol/wedge.js +2 -2
- package/cjs/graphic/builtin-symbol/wedge.js.map +1 -1
- package/cjs/graphic/builtin-symbol/wye.js +2 -2
- package/cjs/graphic/builtin-symbol/wye.js.map +1 -1
- package/cjs/graphic/config.d.ts +1 -1
- package/cjs/graphic/config.js +3 -7
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.js +1 -3
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/text.d.ts +11 -11
- package/cjs/graphic/text.js +170 -104
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/wrap-text.js +4 -16
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/interface/animate.d.ts +1 -3
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/context.d.ts +0 -1
- package/cjs/interface/context.js.map +1 -1
- package/cjs/interface/global.d.ts +1 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/text.d.ts +3 -11
- package/cjs/interface/graphic/text.js +1 -6
- package/cjs/interface/graphic/text.js.map +1 -1
- package/cjs/interface/graphic.d.ts +0 -1
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/stage.d.ts +0 -1
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/interface/text.d.ts +1 -9
- package/cjs/interface/text.js.map +1 -1
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js +2 -2
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js +2 -2
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.js +3 -2
- package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +2 -2
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +2 -2
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/image-render.js +6 -4
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/text-render.d.ts +1 -1
- package/cjs/render/contributions/render/text-render.js +46 -24
- package/cjs/render/contributions/render/text-render.js.map +1 -1
- package/cjs/resource-loader/loader.js +1 -1
- package/cjs/resource-loader/loader.js.map +1 -1
- package/dist/index.es.js +547 -557
- package/es/animate/Ticker/default-ticker.d.ts +2 -4
- package/es/animate/Ticker/default-ticker.js +6 -9
- package/es/animate/Ticker/default-ticker.js.map +1 -1
- package/es/animate/custom-animate.d.ts +0 -2
- package/es/animate/custom-animate.js +2 -11
- package/es/animate/custom-animate.js.map +1 -1
- package/es/core/contributions/textMeasure/AtextMeasure.d.ts +4 -56
- package/es/core/contributions/textMeasure/AtextMeasure.js +13 -108
- package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/es/core/contributions/textMeasure/layout.d.ts +3 -8
- package/es/core/contributions/textMeasure/layout.js +40 -45
- package/es/core/contributions/textMeasure/layout.js.map +1 -1
- package/es/core/global.d.ts +3 -0
- package/es/core/global.js +8 -1
- package/es/core/global.js.map +1 -1
- package/es/core/stage.d.ts +0 -2
- package/es/core/stage.js +5 -9
- package/es/core/stage.js.map +1 -1
- package/es/graphic/builtin-symbol/arrow.js +2 -2
- package/es/graphic/builtin-symbol/arrow.js.map +1 -1
- package/es/graphic/builtin-symbol/arrow2-down.js +2 -2
- package/es/graphic/builtin-symbol/arrow2-down.js.map +1 -1
- package/es/graphic/builtin-symbol/arrow2-left.js +2 -2
- package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
- package/es/graphic/builtin-symbol/arrow2-right.js +2 -2
- package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
- package/es/graphic/builtin-symbol/arrow2-up.js +2 -2
- package/es/graphic/builtin-symbol/arrow2-up.js.map +1 -1
- package/es/graphic/builtin-symbol/base.d.ts +0 -1
- package/es/graphic/builtin-symbol/base.js +0 -3
- package/es/graphic/builtin-symbol/base.js.map +1 -1
- package/es/graphic/builtin-symbol/circle.js +3 -3
- package/es/graphic/builtin-symbol/circle.js.map +1 -1
- package/es/graphic/builtin-symbol/close.js +3 -3
- package/es/graphic/builtin-symbol/close.js.map +1 -1
- package/es/graphic/builtin-symbol/cross.js +2 -2
- package/es/graphic/builtin-symbol/cross.js.map +1 -1
- package/es/graphic/builtin-symbol/diamond.js +3 -3
- package/es/graphic/builtin-symbol/diamond.js.map +1 -1
- package/es/graphic/builtin-symbol/line-h.js +3 -3
- package/es/graphic/builtin-symbol/line-h.js.map +1 -1
- package/es/graphic/builtin-symbol/line-v.js +3 -3
- package/es/graphic/builtin-symbol/line-v.js.map +1 -1
- package/es/graphic/builtin-symbol/square.js +2 -2
- package/es/graphic/builtin-symbol/square.js.map +1 -1
- package/es/graphic/builtin-symbol/star.js +2 -2
- package/es/graphic/builtin-symbol/star.js.map +1 -1
- package/es/graphic/builtin-symbol/stroke.js +2 -2
- package/es/graphic/builtin-symbol/stroke.js.map +1 -1
- package/es/graphic/builtin-symbol/thin-triangle.js +2 -2
- package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-down.js +2 -2
- package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-left.js +2 -2
- package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-right.js +2 -2
- package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-up.js +2 -2
- package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
- package/es/graphic/builtin-symbol/utils.d.ts +0 -1
- package/es/graphic/builtin-symbol/utils.js +4 -7
- package/es/graphic/builtin-symbol/utils.js.map +1 -1
- package/es/graphic/builtin-symbol/wedge.js +2 -2
- package/es/graphic/builtin-symbol/wedge.js.map +1 -1
- package/es/graphic/builtin-symbol/wye.js +2 -2
- package/es/graphic/builtin-symbol/wye.js.map +1 -1
- package/es/graphic/config.d.ts +1 -1
- package/es/graphic/config.js +2 -8
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/richtext/paragraph.js +2 -4
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/text.d.ts +11 -11
- package/es/graphic/text.js +165 -103
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/wrap-text.js +4 -16
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/interface/animate.d.ts +1 -3
- package/es/interface/animate.js.map +1 -1
- package/es/interface/context.d.ts +0 -1
- package/es/interface/context.js.map +1 -1
- package/es/interface/global.d.ts +1 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/text.d.ts +3 -11
- package/es/interface/graphic/text.js +1 -6
- package/es/interface/graphic/text.js.map +1 -1
- package/es/interface/graphic.d.ts +0 -1
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/stage.d.ts +0 -1
- package/es/interface/stage.js.map +1 -1
- package/es/interface/text.d.ts +1 -9
- package/es/interface/text.js.map +1 -1
- package/es/render/contributions/render/contributions/arc-contribution-render.js +2 -2
- package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/circle-contribution-render.js +2 -2
- package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.js +3 -2
- package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +2 -2
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/symbol-contribution-render.js +2 -2
- package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/es/render/contributions/render/image-render.js +6 -4
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/text-render.d.ts +1 -1
- package/es/render/contributions/render/text-render.js +45 -23
- package/es/render/contributions/render/text-render.js.map +1 -1
- package/es/resource-loader/loader.js +1 -1
- package/es/resource-loader/loader.js.map +1 -1
- package/package.json +3 -4
package/dist/index.es.js
CHANGED
|
@@ -846,6 +846,12 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
846
846
|
get env() {
|
|
847
847
|
return this._env;
|
|
848
848
|
}
|
|
849
|
+
get isImageAnonymous() {
|
|
850
|
+
return this._isImageAnonymous;
|
|
851
|
+
}
|
|
852
|
+
set isImageAnonymous(isImageAnonymous) {
|
|
853
|
+
this._isImageAnonymous = isImageAnonymous;
|
|
854
|
+
}
|
|
849
855
|
get devicePixelRatio() {
|
|
850
856
|
if (!this._env) {
|
|
851
857
|
this.setEnv(defaultEnv);
|
|
@@ -914,6 +920,7 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
914
920
|
}
|
|
915
921
|
constructor(contributions) {
|
|
916
922
|
this.contributions = contributions;
|
|
923
|
+
this._isImageAnonymous = true;
|
|
917
924
|
this.id = Generator.GenAutoIncrementId();
|
|
918
925
|
this.hooks = {
|
|
919
926
|
onSetEnv: new SyncHook(['lastEnv', 'env', 'global'])
|
|
@@ -1156,32 +1163,6 @@ DefaultGlobal = __decorate([
|
|
|
1156
1163
|
__metadata("design:paramtypes", [Object])
|
|
1157
1164
|
], DefaultGlobal);
|
|
1158
1165
|
|
|
1159
|
-
var params;
|
|
1160
|
-
(function (params) {
|
|
1161
|
-
params[params["W"] = 1] = "W";
|
|
1162
|
-
params[params["H"] = 2] = "H";
|
|
1163
|
-
params[params["WH"] = 3] = "WH";
|
|
1164
|
-
})(params || (params = {}));
|
|
1165
|
-
|
|
1166
|
-
var MeasureModeEnum;
|
|
1167
|
-
(function (MeasureModeEnum) {
|
|
1168
|
-
MeasureModeEnum[MeasureModeEnum["estimate"] = 0] = "estimate";
|
|
1169
|
-
MeasureModeEnum[MeasureModeEnum["actualBounding"] = 1] = "actualBounding";
|
|
1170
|
-
MeasureModeEnum[MeasureModeEnum["fontBounding"] = 2] = "fontBounding";
|
|
1171
|
-
})(MeasureModeEnum || (MeasureModeEnum = {}));
|
|
1172
|
-
|
|
1173
|
-
const strCommandMap = [
|
|
1174
|
-
'arc',
|
|
1175
|
-
'arcTo',
|
|
1176
|
-
'bezierCurveTo',
|
|
1177
|
-
'closePath',
|
|
1178
|
-
'ellipse',
|
|
1179
|
-
'lineTo',
|
|
1180
|
-
'moveTo',
|
|
1181
|
-
'quadraticCurveTo',
|
|
1182
|
-
'rect'
|
|
1183
|
-
];
|
|
1184
|
-
|
|
1185
1166
|
const circleThreshold = tau - 1e-8;
|
|
1186
1167
|
class BoundsContext {
|
|
1187
1168
|
constructor(bounds) {
|
|
@@ -3042,7 +3023,6 @@ const DefaultStrokeStyle = Object.assign({ outerBorder: Object.assign(Object.ass
|
|
|
3042
3023
|
const DefaultTextStyle = {
|
|
3043
3024
|
text: '',
|
|
3044
3025
|
maxLineWidth: Infinity,
|
|
3045
|
-
maxWidth: Infinity,
|
|
3046
3026
|
textAlign: 'left',
|
|
3047
3027
|
textBaseline: 'alphabetic',
|
|
3048
3028
|
fontSize: 16,
|
|
@@ -3067,9 +3047,7 @@ const DefaultTextStyle = {
|
|
|
3067
3047
|
suffixPosition: 'end',
|
|
3068
3048
|
underlineDash: [],
|
|
3069
3049
|
underlineOffset: 0,
|
|
3070
|
-
disableAutoClipedPoptip: undefined
|
|
3071
|
-
measureMode: MeasureModeEnum.fontBounding,
|
|
3072
|
-
keepCenterInLine: false
|
|
3050
|
+
disableAutoClipedPoptip: undefined
|
|
3073
3051
|
};
|
|
3074
3052
|
const DefaultPickStyle = {
|
|
3075
3053
|
pickStrokeBuffer: 0
|
|
@@ -3084,7 +3062,7 @@ const DefaultConnectAttribute = {
|
|
|
3084
3062
|
const DefaultDebugAttribute = {
|
|
3085
3063
|
_debug_bounds: false
|
|
3086
3064
|
};
|
|
3087
|
-
const DefaultAttribute = Object.assign(Object.assign(Object.assign({ strokeSeg: null, renderable: true, pickable: true, shadowGraphic: undefined, childrenPickable: true, fillPickable: true, strokePickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, fillStrokeOrder: 0, renderStyle: 'default', pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1, globalZIndex: 1, globalCompositeOperation: '', overflow: 'hidden', shadowPickMode: 'graphic'
|
|
3065
|
+
const DefaultAttribute = Object.assign(Object.assign(Object.assign({ strokeSeg: null, renderable: true, pickable: true, shadowGraphic: undefined, childrenPickable: true, fillPickable: true, strokePickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, fillStrokeOrder: 0, renderStyle: 'default', pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1, globalZIndex: 1, globalCompositeOperation: '', overflow: 'hidden', shadowPickMode: 'graphic' }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
|
|
3088
3066
|
function addAttributeToPrototype(obj, c, keys) {
|
|
3089
3067
|
keys.forEach(key => {
|
|
3090
3068
|
c.prototype[key] = obj[key];
|
|
@@ -3278,33 +3256,13 @@ let ATextMeasure = class ATextMeasure {
|
|
|
3278
3256
|
this.context = service.context;
|
|
3279
3257
|
service.bindTextMeasure(this);
|
|
3280
3258
|
}
|
|
3281
|
-
|
|
3259
|
+
measureTextWidth(text, options) {
|
|
3260
|
+
if (!this.context) {
|
|
3261
|
+
return this.estimate(text, options).width;
|
|
3262
|
+
}
|
|
3282
3263
|
this.context.setTextStyleWithoutAlignBaseline(options);
|
|
3283
|
-
const
|
|
3284
|
-
return
|
|
3285
|
-
}
|
|
3286
|
-
_measureTextWithAlignBaseline(text, options, compatible) {
|
|
3287
|
-
this.context.setTextStyle(options);
|
|
3288
|
-
const metrics = this.context.measureText(text);
|
|
3289
|
-
return compatible ? this.compatibleMetrics(metrics, options) : metrics;
|
|
3290
|
-
}
|
|
3291
|
-
compatibleMetrics(metrics, options) {
|
|
3292
|
-
if (metrics.actualBoundingBoxAscent == null ||
|
|
3293
|
-
metrics.actualBoundingBoxDescent == null ||
|
|
3294
|
-
metrics.fontBoundingBoxAscent == null ||
|
|
3295
|
-
metrics.fontBoundingBoxDescent == null) {
|
|
3296
|
-
const { ascent, descent } = this.measureTextBoundADscentEstimate(options);
|
|
3297
|
-
metrics.actualBoundingBoxAscent = ascent;
|
|
3298
|
-
metrics.actualBoundingBoxDescent = descent;
|
|
3299
|
-
metrics.fontBoundingBoxAscent = ascent;
|
|
3300
|
-
metrics.fontBoundingBoxDescent = descent;
|
|
3301
|
-
}
|
|
3302
|
-
if (metrics.actualBoundingBoxLeft == null || metrics.actualBoundingBoxRight == null) {
|
|
3303
|
-
const { left, right } = this.measureTextBoundLeftRightEstimate(options);
|
|
3304
|
-
metrics.actualBoundingBoxLeft = left;
|
|
3305
|
-
metrics.actualBoundingBoxRight = right;
|
|
3306
|
-
}
|
|
3307
|
-
return metrics;
|
|
3264
|
+
const textMeasure = this.context.measureText(text);
|
|
3265
|
+
return textMeasure.width;
|
|
3308
3266
|
}
|
|
3309
3267
|
estimate(text, { fontSize = DefaultTextAttribute.fontSize }) {
|
|
3310
3268
|
let eCharLen = 0;
|
|
@@ -3317,135 +3275,24 @@ let ATextMeasure = class ATextMeasure {
|
|
|
3317
3275
|
height: fontSize
|
|
3318
3276
|
};
|
|
3319
3277
|
}
|
|
3320
|
-
|
|
3321
|
-
if (!this.context) {
|
|
3322
|
-
return this.estimate(text, options).width;
|
|
3323
|
-
}
|
|
3324
|
-
textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options);
|
|
3325
|
-
return textMeasure.width;
|
|
3326
|
-
}
|
|
3327
|
-
measureTextBoundsWidth(text, options, textMeasure) {
|
|
3328
|
-
if (!this.context) {
|
|
3329
|
-
return this.estimate(text, options).width;
|
|
3330
|
-
}
|
|
3331
|
-
textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithoutAlignBaseline(text, options);
|
|
3332
|
-
return textMeasure.width;
|
|
3333
|
-
}
|
|
3334
|
-
measureTextBoundsLeftRight(text, options, textMeasure) {
|
|
3335
|
-
if (!this.context) {
|
|
3336
|
-
return this.measureTextBoundLeftRightEstimate(options);
|
|
3337
|
-
}
|
|
3338
|
-
textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
|
|
3339
|
-
return {
|
|
3340
|
-
left: textMeasure.actualBoundingBoxLeft,
|
|
3341
|
-
right: textMeasure.actualBoundingBoxRight
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
measureTextPixelHeight(text, options, textMeasure) {
|
|
3278
|
+
measureTextPixelHeight(text, options) {
|
|
3345
3279
|
var _a;
|
|
3346
3280
|
if (!this.context) {
|
|
3347
3281
|
return (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
|
|
3348
3282
|
}
|
|
3349
|
-
|
|
3283
|
+
this.context.setTextStyleWithoutAlignBaseline(options);
|
|
3284
|
+
const textMeasure = this.context.measureText(text);
|
|
3350
3285
|
return Math.abs(textMeasure.actualBoundingBoxAscent - textMeasure.actualBoundingBoxDescent);
|
|
3351
3286
|
}
|
|
3352
|
-
|
|
3353
|
-
if (!this.context) {
|
|
3354
|
-
return this.measureTextBoundADscentEstimate(options);
|
|
3355
|
-
}
|
|
3356
|
-
textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
|
|
3357
|
-
return {
|
|
3358
|
-
ascent: textMeasure.actualBoundingBoxAscent,
|
|
3359
|
-
descent: textMeasure.actualBoundingBoxDescent
|
|
3360
|
-
};
|
|
3361
|
-
}
|
|
3362
|
-
measureTextBoundHieght(text, options, textMeasure) {
|
|
3287
|
+
measureTextBoundHieght(text, options) {
|
|
3363
3288
|
var _a;
|
|
3364
3289
|
if (!this.context) {
|
|
3365
3290
|
return (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
|
|
3366
3291
|
}
|
|
3367
|
-
|
|
3292
|
+
this.context.setTextStyleWithoutAlignBaseline(options);
|
|
3293
|
+
const textMeasure = this.context.measureText(text);
|
|
3368
3294
|
return Math.abs(textMeasure.fontBoundingBoxAscent - textMeasure.fontBoundingBoxDescent);
|
|
3369
3295
|
}
|
|
3370
|
-
measureTextBoundADscent(text, options, textMeasure) {
|
|
3371
|
-
if (!this.context) {
|
|
3372
|
-
return this.measureTextBoundADscentEstimate(options);
|
|
3373
|
-
}
|
|
3374
|
-
textMeasure = textMeasure !== null && textMeasure !== void 0 ? textMeasure : this._measureTextWithAlignBaseline(text, options, true);
|
|
3375
|
-
return {
|
|
3376
|
-
ascent: textMeasure.fontBoundingBoxAscent,
|
|
3377
|
-
descent: textMeasure.fontBoundingBoxDescent
|
|
3378
|
-
};
|
|
3379
|
-
}
|
|
3380
|
-
measureTextBoundADscentEstimate(options) {
|
|
3381
|
-
var _a;
|
|
3382
|
-
const fontSize = (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
|
|
3383
|
-
return {
|
|
3384
|
-
ascent: 0.79 * fontSize,
|
|
3385
|
-
descent: 0.21 * fontSize
|
|
3386
|
-
};
|
|
3387
|
-
}
|
|
3388
|
-
measureTextBoundLeftRightEstimate(options) {
|
|
3389
|
-
var _a;
|
|
3390
|
-
const fontSize = (_a = options.fontSize) !== null && _a !== void 0 ? _a : DefaultTextStyle.fontSize;
|
|
3391
|
-
const { textAlign } = options;
|
|
3392
|
-
if (textAlign === 'center') {
|
|
3393
|
-
return {
|
|
3394
|
-
left: fontSize / 2,
|
|
3395
|
-
right: fontSize / 2
|
|
3396
|
-
};
|
|
3397
|
-
}
|
|
3398
|
-
else if (textAlign === 'right' || textAlign === 'end') {
|
|
3399
|
-
return {
|
|
3400
|
-
left: fontSize,
|
|
3401
|
-
right: 0
|
|
3402
|
-
};
|
|
3403
|
-
}
|
|
3404
|
-
return {
|
|
3405
|
-
left: 0,
|
|
3406
|
-
right: fontSize
|
|
3407
|
-
};
|
|
3408
|
-
}
|
|
3409
|
-
measureTextPixelADscentAndWidth(text, options, mode) {
|
|
3410
|
-
if (!this.context) {
|
|
3411
|
-
return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), { width: this.estimate(text, options).width });
|
|
3412
|
-
}
|
|
3413
|
-
const out = this._measureTextWithoutAlignBaseline(text, options, true);
|
|
3414
|
-
if (mode === MeasureModeEnum.actualBounding) {
|
|
3415
|
-
return {
|
|
3416
|
-
ascent: out.actualBoundingBoxAscent,
|
|
3417
|
-
descent: out.actualBoundingBoxDescent,
|
|
3418
|
-
width: out.width
|
|
3419
|
-
};
|
|
3420
|
-
}
|
|
3421
|
-
else if (mode === MeasureModeEnum.estimate) {
|
|
3422
|
-
return Object.assign(Object.assign({}, this.measureTextBoundADscentEstimate(options)), { width: out.width });
|
|
3423
|
-
}
|
|
3424
|
-
else if (mode === MeasureModeEnum.fontBounding) {
|
|
3425
|
-
let ascent = out.fontBoundingBoxAscent;
|
|
3426
|
-
let descent = out.fontBoundingBoxDescent;
|
|
3427
|
-
if (out.actualBoundingBoxDescent && descent < out.actualBoundingBoxDescent) {
|
|
3428
|
-
const delta = out.actualBoundingBoxDescent - descent;
|
|
3429
|
-
descent += delta;
|
|
3430
|
-
ascent -= delta;
|
|
3431
|
-
}
|
|
3432
|
-
else if (out.actualBoundingBoxAscent && ascent < out.actualBoundingBoxAscent) {
|
|
3433
|
-
const delta = out.actualBoundingBoxAscent - ascent;
|
|
3434
|
-
ascent += delta;
|
|
3435
|
-
descent -= delta;
|
|
3436
|
-
}
|
|
3437
|
-
return {
|
|
3438
|
-
ascent,
|
|
3439
|
-
descent,
|
|
3440
|
-
width: out.width
|
|
3441
|
-
};
|
|
3442
|
-
}
|
|
3443
|
-
return {
|
|
3444
|
-
ascent: out.actualBoundingBoxAscent,
|
|
3445
|
-
descent: out.actualBoundingBoxDescent,
|
|
3446
|
-
width: out.width
|
|
3447
|
-
};
|
|
3448
|
-
}
|
|
3449
3296
|
measureText(text, options) {
|
|
3450
3297
|
if (!this.context) {
|
|
3451
3298
|
return this.estimate(text, options);
|
|
@@ -7001,7 +6848,7 @@ class TimeOutTickHandler {
|
|
|
7001
6848
|
}
|
|
7002
6849
|
}
|
|
7003
6850
|
|
|
7004
|
-
class DefaultTicker
|
|
6851
|
+
class DefaultTicker {
|
|
7005
6852
|
set mode(m) {
|
|
7006
6853
|
if (this._mode === m) {
|
|
7007
6854
|
return;
|
|
@@ -7013,19 +6860,18 @@ class DefaultTicker extends EventEmitter {
|
|
|
7013
6860
|
return this._mode;
|
|
7014
6861
|
}
|
|
7015
6862
|
constructor(timelines = []) {
|
|
7016
|
-
super();
|
|
7017
6863
|
this.handleTick = (handler, params) => {
|
|
7018
6864
|
const { once = false } = params !== null && params !== void 0 ? params : {};
|
|
7019
6865
|
if (this.ifCanStop()) {
|
|
7020
6866
|
this.stop();
|
|
7021
6867
|
return;
|
|
7022
6868
|
}
|
|
7023
|
-
this._handlerTick();
|
|
6869
|
+
this._handlerTick(handler);
|
|
7024
6870
|
if (!once) {
|
|
7025
6871
|
handler.tick(this.interval, this.handleTick);
|
|
7026
6872
|
}
|
|
7027
6873
|
};
|
|
7028
|
-
this._handlerTick = () => {
|
|
6874
|
+
this._handlerTick = (handler) => {
|
|
7029
6875
|
const tickerHandler = this.tickerHandler;
|
|
7030
6876
|
const time = tickerHandler.getTime();
|
|
7031
6877
|
let delta = 0;
|
|
@@ -7040,7 +6886,6 @@ class DefaultTicker extends EventEmitter {
|
|
|
7040
6886
|
this.timelines.forEach(t => {
|
|
7041
6887
|
t.tick(delta);
|
|
7042
6888
|
});
|
|
7043
|
-
this.emit('afterTick');
|
|
7044
6889
|
};
|
|
7045
6890
|
this.init();
|
|
7046
6891
|
this.lastFrameTime = -1;
|
|
@@ -7180,11 +7025,6 @@ class DefaultTicker extends EventEmitter {
|
|
|
7180
7025
|
this.setupTickHandler();
|
|
7181
7026
|
this.lastFrameTime = -1;
|
|
7182
7027
|
}
|
|
7183
|
-
trySyncTickStatus() {
|
|
7184
|
-
if (this.status === STATUS$1.RUNNING) {
|
|
7185
|
-
this._handlerTick();
|
|
7186
|
-
}
|
|
7187
|
-
}
|
|
7188
7028
|
}
|
|
7189
7029
|
|
|
7190
7030
|
class ManualTickHandler {
|
|
@@ -9005,11 +8845,6 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
9005
8845
|
this.clipRange =
|
|
9006
8846
|
this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /
|
|
9007
8847
|
this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension];
|
|
9008
|
-
if (this.clipRange === 1) {
|
|
9009
|
-
this.shrinkClipRange =
|
|
9010
|
-
this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /
|
|
9011
|
-
this.fromPoints[this.fromPoints.length - 1][this.clipRangeByDimension];
|
|
9012
|
-
}
|
|
9013
8848
|
if (!isValidNumber(this.clipRange)) {
|
|
9014
8849
|
this.clipRange = 0;
|
|
9015
8850
|
}
|
|
@@ -9049,12 +8884,6 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
9049
8884
|
return newPoint;
|
|
9050
8885
|
});
|
|
9051
8886
|
}
|
|
9052
|
-
onFirstRun() {
|
|
9053
|
-
const lastClipRange = this.target.attribute.clipRange;
|
|
9054
|
-
if (isValidNumber(lastClipRange * this.clipRange)) {
|
|
9055
|
-
this.clipRange *= lastClipRange;
|
|
9056
|
-
}
|
|
9057
|
-
}
|
|
9058
8887
|
onUpdate(end, ratio, out) {
|
|
9059
8888
|
this.points = this.points.map((point, index) => {
|
|
9060
8889
|
const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
|
|
@@ -9062,17 +8891,6 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
9062
8891
|
return newPoint;
|
|
9063
8892
|
});
|
|
9064
8893
|
if (this.clipRange) {
|
|
9065
|
-
if (this.shrinkClipRange) {
|
|
9066
|
-
if (!end) {
|
|
9067
|
-
out.points = this.fromPoints;
|
|
9068
|
-
out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio;
|
|
9069
|
-
}
|
|
9070
|
-
else {
|
|
9071
|
-
out.points = this.toPoints;
|
|
9072
|
-
out.clipRange = 1;
|
|
9073
|
-
}
|
|
9074
|
-
return;
|
|
9075
|
-
}
|
|
9076
8894
|
out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
|
|
9077
8895
|
}
|
|
9078
8896
|
if (this.segmentsCache && this.to.segments) {
|
|
@@ -10999,10 +10817,10 @@ class ResourceLoader {
|
|
|
10999
10817
|
static GetFile(url, type) {
|
|
11000
10818
|
let data = ResourceLoader.cache.get(url);
|
|
11001
10819
|
if (data) {
|
|
11002
|
-
if (data.loadState === '
|
|
10820
|
+
if (data.loadState === 'fail') {
|
|
11003
10821
|
return Promise.reject();
|
|
11004
10822
|
}
|
|
11005
|
-
else if (data.loadState === 'loading') {
|
|
10823
|
+
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
11006
10824
|
return data.dataPromise.then(data => data.data);
|
|
11007
10825
|
}
|
|
11008
10826
|
return Promise.resolve(data.data);
|
|
@@ -15598,14 +15416,14 @@ class DefaultArcRenderContribution {
|
|
|
15598
15416
|
if (!(doOuterBorder || doInnerBorder)) {
|
|
15599
15417
|
return;
|
|
15600
15418
|
}
|
|
15601
|
-
const { innerPadding = arcAttribute.innerPadding, outerPadding = arcAttribute.outerPadding, startAngle = arcAttribute.startAngle, endAngle = arcAttribute.endAngle, opacity = arcAttribute.opacity, x: originX = arcAttribute.x, y: originY = arcAttribute.y, scaleX = arcAttribute.scaleX, scaleY = arcAttribute.scaleY
|
|
15419
|
+
const { innerPadding = arcAttribute.innerPadding, outerPadding = arcAttribute.outerPadding, startAngle = arcAttribute.startAngle, endAngle = arcAttribute.endAngle, opacity = arcAttribute.opacity, x: originX = arcAttribute.x, y: originY = arcAttribute.y, scaleX = arcAttribute.scaleX, scaleY = arcAttribute.scaleY } = arc.attribute;
|
|
15602
15420
|
let { innerRadius = arcAttribute.innerRadius, outerRadius = arcAttribute.outerRadius } = arc.attribute;
|
|
15603
15421
|
outerRadius += outerPadding;
|
|
15604
15422
|
innerRadius -= innerPadding;
|
|
15605
15423
|
const renderBorder = (borderStyle, key) => {
|
|
15606
15424
|
const doStroke = !!(borderStyle && borderStyle.stroke);
|
|
15607
15425
|
const { distance = arcAttribute[key].distance } = borderStyle;
|
|
15608
|
-
const d =
|
|
15426
|
+
const d = getScaledStroke(context, distance, context.dpr);
|
|
15609
15427
|
const deltaAngle = distance / outerRadius;
|
|
15610
15428
|
const sign = key === 'outerBorder' ? 1 : -1;
|
|
15611
15429
|
arc.setAttributes({
|
|
@@ -15650,11 +15468,11 @@ class DefaultCircleRenderContribution {
|
|
|
15650
15468
|
if (!(doOuterBorder || doInnerBorder)) {
|
|
15651
15469
|
return;
|
|
15652
15470
|
}
|
|
15653
|
-
const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, opacity = circleAttribute.opacity, x: originX = circleAttribute.x, y: originY = circleAttribute.y, scaleX = circleAttribute.scaleX, scaleY = circleAttribute.scaleY
|
|
15471
|
+
const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, opacity = circleAttribute.opacity, x: originX = circleAttribute.x, y: originY = circleAttribute.y, scaleX = circleAttribute.scaleX, scaleY = circleAttribute.scaleY } = circle.attribute;
|
|
15654
15472
|
const renderBorder = (borderStyle, key) => {
|
|
15655
15473
|
const doStroke = !!(borderStyle && borderStyle.stroke);
|
|
15656
15474
|
const { distance = circleAttribute[key].distance } = borderStyle;
|
|
15657
|
-
const d =
|
|
15475
|
+
const d = getScaledStroke(context, distance, context.dpr);
|
|
15658
15476
|
const sign = key === 'outerBorder' ? 1 : -1;
|
|
15659
15477
|
context.beginPath();
|
|
15660
15478
|
context.arc(x, y, radius + sign * d, startAngle, endAngle);
|
|
@@ -15839,7 +15657,7 @@ class DefaultRectRenderContribution {
|
|
|
15839
15657
|
if (!(doOuterBorder || doInnerBorder)) {
|
|
15840
15658
|
return;
|
|
15841
15659
|
}
|
|
15842
|
-
const { cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY, x1, y1
|
|
15660
|
+
const { cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY, x1, y1 } = rect.attribute;
|
|
15843
15661
|
let { width, height } = rect.attribute;
|
|
15844
15662
|
width = (width !== null && width !== void 0 ? width : x1 - x) || 0;
|
|
15845
15663
|
height = (height !== null && height !== void 0 ? height : y1 - y) || 0;
|
|
@@ -15847,7 +15665,7 @@ class DefaultRectRenderContribution {
|
|
|
15847
15665
|
const doStroke = !!(borderStyle && borderStyle.stroke);
|
|
15848
15666
|
const sign = key === 'outerBorder' ? -1 : 1;
|
|
15849
15667
|
const { distance = rectAttribute[key].distance } = borderStyle;
|
|
15850
|
-
const d =
|
|
15668
|
+
const d = getScaledStroke(context, distance, context.dpr);
|
|
15851
15669
|
const nextX = x + sign * d;
|
|
15852
15670
|
const nextY = y + sign * d;
|
|
15853
15671
|
const dw = d * 2;
|
|
@@ -16063,8 +15881,13 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
|
|
|
16063
15881
|
this.useStyle = true;
|
|
16064
15882
|
this.order = 0;
|
|
16065
15883
|
}
|
|
16066
|
-
drawShape(
|
|
16067
|
-
|
|
15884
|
+
drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
15885
|
+
if (image.isGifImage && image.renderFrame && image.playing) {
|
|
15886
|
+
image.renderFrame(context, x, y);
|
|
15887
|
+
}
|
|
15888
|
+
else {
|
|
15889
|
+
return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
15890
|
+
}
|
|
16068
15891
|
}
|
|
16069
15892
|
}
|
|
16070
15893
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
@@ -16087,11 +15910,11 @@ class DefaultSymbolRenderContribution {
|
|
|
16087
15910
|
if (!(doOuterBorder || doInnerBorder)) {
|
|
16088
15911
|
return;
|
|
16089
15912
|
}
|
|
16090
|
-
const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY
|
|
15913
|
+
const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY } = symbol.attribute;
|
|
16091
15914
|
const renderBorder = (borderStyle, key) => {
|
|
16092
15915
|
const doStroke = !!(borderStyle && borderStyle.stroke);
|
|
16093
15916
|
const { distance = symbolAttribute[key].distance } = borderStyle;
|
|
16094
|
-
const d =
|
|
15917
|
+
const d = getScaledStroke(context, distance, context.dpr);
|
|
16095
15918
|
const sign = key === 'outerBorder' ? 1 : -1;
|
|
16096
15919
|
context.beginPath();
|
|
16097
15920
|
if (parsedPath.drawOffset(context, size, x, y, sign * d) === false) {
|
|
@@ -17980,7 +17803,13 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
|
|
|
17980
17803
|
var _a, _b, _c;
|
|
17981
17804
|
const textAttribute = getTheme(text, params === null || params === void 0 ? void 0 : params.theme).text;
|
|
17982
17805
|
const { text: str, underline = textAttribute.underline, lineThrough = textAttribute.lineThrough, keepDirIn3d = textAttribute.keepDirIn3d, direction = textAttribute.direction, fontSize = textAttribute.fontSize, verticalMode = textAttribute.verticalMode, x: originX = textAttribute.x, y: originY = textAttribute.y } = text.attribute;
|
|
17983
|
-
|
|
17806
|
+
let { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline } = text.attribute;
|
|
17807
|
+
if (!verticalMode && direction === 'vertical') {
|
|
17808
|
+
const t = textAlign;
|
|
17809
|
+
textAlign = (_a = text.getBaselineMapAlign()[textBaseline]) !== null && _a !== void 0 ? _a : 'left';
|
|
17810
|
+
textBaseline = (_b = text.getAlignMapBaseline()[t]) !== null && _b !== void 0 ? _b : 'top';
|
|
17811
|
+
}
|
|
17812
|
+
const lineHeight = (_c = calculateLineHeight(text.attribute.lineHeight, fontSize)) !== null && _c !== void 0 ? _c : fontSize;
|
|
17984
17813
|
const data = this.valid(text, textAttribute, fillCb, strokeCb);
|
|
17985
17814
|
if (!data) {
|
|
17986
17815
|
return;
|
|
@@ -18019,6 +17848,7 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
|
|
|
18019
17848
|
else if (fVisible) {
|
|
18020
17849
|
context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute);
|
|
18021
17850
|
context.fillText(t, _x, _y, z);
|
|
17851
|
+
this.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context);
|
|
18022
17852
|
}
|
|
18023
17853
|
}
|
|
18024
17854
|
if (direction) {
|
|
@@ -18026,88 +17856,132 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
|
|
|
18026
17856
|
context.setTransformForCurrent();
|
|
18027
17857
|
}
|
|
18028
17858
|
};
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
const { xOffset, yOffset } = multilineLayout.bbox;
|
|
18037
|
-
if (doStroke) {
|
|
18038
|
-
if (strokeCb) {
|
|
18039
|
-
strokeCb(context, text.attribute, textAttribute);
|
|
17859
|
+
if (text.isMultiLine) {
|
|
17860
|
+
context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
|
|
17861
|
+
if (direction === 'horizontal') {
|
|
17862
|
+
const { multilineLayout } = text;
|
|
17863
|
+
if (!multilineLayout) {
|
|
17864
|
+
context.highPerformanceRestore();
|
|
17865
|
+
return;
|
|
18040
17866
|
}
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
context
|
|
18045
|
-
}
|
|
17867
|
+
const { xOffset, yOffset } = multilineLayout.bbox;
|
|
17868
|
+
if (doStroke) {
|
|
17869
|
+
if (strokeCb) {
|
|
17870
|
+
strokeCb(context, text.attribute, textAttribute);
|
|
17871
|
+
}
|
|
17872
|
+
else if (sVisible) {
|
|
17873
|
+
context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute);
|
|
17874
|
+
multilineLayout.lines.forEach(line => {
|
|
17875
|
+
context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
|
|
17876
|
+
});
|
|
17877
|
+
}
|
|
17878
|
+
}
|
|
17879
|
+
if (doFill) {
|
|
17880
|
+
if (fillCb) {
|
|
17881
|
+
fillCb(context, text.attribute, textAttribute);
|
|
17882
|
+
}
|
|
17883
|
+
else if (fVisible) {
|
|
17884
|
+
context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute);
|
|
17885
|
+
multilineLayout.lines.forEach(line => {
|
|
17886
|
+
context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
|
|
17887
|
+
this.drawUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y - textDrawOffsetY('bottom', fontSize) - 0.05 * fontSize, z, textAttribute, context, {
|
|
17888
|
+
width: line.width
|
|
17889
|
+
});
|
|
17890
|
+
});
|
|
17891
|
+
}
|
|
18046
17892
|
}
|
|
18047
17893
|
}
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
17894
|
+
else {
|
|
17895
|
+
text.tryUpdateAABBBounds();
|
|
17896
|
+
const cache = text.cache;
|
|
17897
|
+
const { verticalList } = cache;
|
|
17898
|
+
context.textAlign = 'left';
|
|
17899
|
+
context.textBaseline = 'top';
|
|
17900
|
+
const totalHeight = lineHeight * verticalList.length;
|
|
17901
|
+
let totalW = 0;
|
|
17902
|
+
verticalList.forEach(verticalData => {
|
|
17903
|
+
const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
|
|
17904
|
+
totalW = max(_w, totalW);
|
|
17905
|
+
});
|
|
17906
|
+
let offsetY = 0;
|
|
17907
|
+
let offsetX = 0;
|
|
17908
|
+
if (textBaseline === 'bottom') {
|
|
17909
|
+
offsetX = -totalHeight;
|
|
18051
17910
|
}
|
|
18052
|
-
else if (
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
width: line.width
|
|
18058
|
-
});
|
|
18059
|
-
});
|
|
17911
|
+
else if (textBaseline === 'middle') {
|
|
17912
|
+
offsetX = -totalHeight / 2;
|
|
17913
|
+
}
|
|
17914
|
+
if (textAlign === 'center') {
|
|
17915
|
+
offsetY -= totalW / 2;
|
|
18060
17916
|
}
|
|
17917
|
+
else if (textAlign === 'right') {
|
|
17918
|
+
offsetY -= totalW;
|
|
17919
|
+
}
|
|
17920
|
+
verticalList.forEach((verticalData, i) => {
|
|
17921
|
+
const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0);
|
|
17922
|
+
const dw = totalW - currentW;
|
|
17923
|
+
let currentOffsetY = offsetY;
|
|
17924
|
+
if (textAlign === 'center') {
|
|
17925
|
+
currentOffsetY += dw / 2;
|
|
17926
|
+
}
|
|
17927
|
+
else if (textAlign === 'right') {
|
|
17928
|
+
currentOffsetY += dw;
|
|
17929
|
+
}
|
|
17930
|
+
verticalData.forEach(item => {
|
|
17931
|
+
const { text, width, direction } = item;
|
|
17932
|
+
drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction);
|
|
17933
|
+
currentOffsetY += width;
|
|
17934
|
+
});
|
|
17935
|
+
});
|
|
18061
17936
|
}
|
|
18062
17937
|
}
|
|
18063
17938
|
else {
|
|
18064
|
-
|
|
18065
|
-
|
|
18066
|
-
const t =
|
|
18067
|
-
|
|
18068
|
-
|
|
18069
|
-
|
|
18070
|
-
|
|
18071
|
-
|
|
18072
|
-
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
|
|
18076
|
-
|
|
18077
|
-
verticalList.forEach(verticalData => {
|
|
18078
|
-
const _w = verticalData.reduce((a, b) => a + (b.width || 0), 0);
|
|
18079
|
-
totalW = max(_w, totalW);
|
|
18080
|
-
});
|
|
18081
|
-
let offsetY = 0;
|
|
18082
|
-
let offsetX = 0;
|
|
18083
|
-
if (textBaseline === 'bottom') {
|
|
18084
|
-
offsetX = -totalHeight;
|
|
18085
|
-
}
|
|
18086
|
-
else if (textBaseline === 'middle') {
|
|
18087
|
-
offsetX = -totalHeight / 2;
|
|
18088
|
-
}
|
|
18089
|
-
if (textAlign === 'center') {
|
|
18090
|
-
offsetY -= totalW / 2;
|
|
18091
|
-
}
|
|
18092
|
-
else if (textAlign === 'right') {
|
|
18093
|
-
offsetY -= totalW;
|
|
18094
|
-
}
|
|
18095
|
-
verticalList.forEach((verticalData, i) => {
|
|
18096
|
-
const currentW = verticalData.reduce((a, b) => a + (b.width || 0), 0);
|
|
18097
|
-
const dw = totalW - currentW;
|
|
18098
|
-
let currentOffsetY = offsetY;
|
|
18099
|
-
if (textAlign === 'center') {
|
|
18100
|
-
currentOffsetY += dw / 2;
|
|
17939
|
+
if (direction === 'horizontal') {
|
|
17940
|
+
context.setTextStyle(text.attribute, textAttribute, z);
|
|
17941
|
+
const t = text.clipedText;
|
|
17942
|
+
let dy = 0;
|
|
17943
|
+
if (lineHeight !== fontSize) {
|
|
17944
|
+
if (textBaseline === 'top') {
|
|
17945
|
+
dy = (lineHeight - fontSize) / 2;
|
|
17946
|
+
}
|
|
17947
|
+
else if (textBaseline === 'middle') ;
|
|
17948
|
+
else if (textBaseline === 'bottom') {
|
|
17949
|
+
dy = -(lineHeight - fontSize) / 2;
|
|
17950
|
+
}
|
|
17951
|
+
else ;
|
|
18101
17952
|
}
|
|
18102
|
-
|
|
18103
|
-
|
|
17953
|
+
drawText(t, 0, dy, 0);
|
|
17954
|
+
}
|
|
17955
|
+
else {
|
|
17956
|
+
text.tryUpdateAABBBounds();
|
|
17957
|
+
const cache = text.cache;
|
|
17958
|
+
if (cache) {
|
|
17959
|
+
context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z);
|
|
17960
|
+
const { verticalList } = cache;
|
|
17961
|
+
let offsetY = 0;
|
|
17962
|
+
const totalW = verticalList[0].reduce((a, b) => a + (b.width || 0), 0);
|
|
17963
|
+
let offsetX = 0;
|
|
17964
|
+
if (textBaseline === 'bottom') {
|
|
17965
|
+
offsetX = -lineHeight;
|
|
17966
|
+
}
|
|
17967
|
+
else if (textBaseline === 'middle') {
|
|
17968
|
+
offsetX = -lineHeight / 2;
|
|
17969
|
+
}
|
|
17970
|
+
if (textAlign === 'center') {
|
|
17971
|
+
offsetY -= totalW / 2;
|
|
17972
|
+
}
|
|
17973
|
+
else if (textAlign === 'right') {
|
|
17974
|
+
offsetY -= totalW;
|
|
17975
|
+
}
|
|
17976
|
+
context.textAlign = 'left';
|
|
17977
|
+
context.textBaseline = 'top';
|
|
17978
|
+
verticalList[0].forEach(item => {
|
|
17979
|
+
const { text, width, direction } = item;
|
|
17980
|
+
drawText(text, offsetX, offsetY, direction);
|
|
17981
|
+
offsetY += width;
|
|
17982
|
+
});
|
|
18104
17983
|
}
|
|
18105
|
-
|
|
18106
|
-
const { text, width, direction } = item;
|
|
18107
|
-
drawText(text, totalHeight - (i + 1) * lineHeight + offsetX, currentOffsetY, direction);
|
|
18108
|
-
currentOffsetY += width;
|
|
18109
|
-
});
|
|
18110
|
-
});
|
|
17984
|
+
}
|
|
18111
17985
|
}
|
|
18112
17986
|
transform3dMatrixToContextMatrix && this.restoreTransformUseContext2d(text, textAttribute, z, context);
|
|
18113
17987
|
this.afterRenderStep(text, context, x, y, doFill, doStroke, fVisible, sVisible, textAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -18118,32 +17992,37 @@ let DefaultCanvasTextRender = class DefaultCanvasTextRender extends BaseRender {
|
|
|
18118
17992
|
const computed3dMatrix = !keepDirIn3d;
|
|
18119
17993
|
this._draw(text, textAttribute, computed3dMatrix, drawContext, params);
|
|
18120
17994
|
}
|
|
18121
|
-
drawUnderLine(underline, lineThrough, text,
|
|
17995
|
+
drawUnderLine(underline, lineThrough, text, x, y, z, textAttribute, context, multiOption) {
|
|
18122
17996
|
if (lineThrough + underline <= 0) {
|
|
18123
17997
|
return;
|
|
18124
17998
|
}
|
|
18125
|
-
const { textAlign = textAttribute.textAlign, fill = textAttribute.fill, opacity = textAttribute.opacity, underlineOffset = textAttribute.underlineOffset, underlineDash = textAttribute.underlineDash, fillOpacity = textAttribute.fillOpacity } = text.attribute;
|
|
17999
|
+
const { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline, fontSize = textAttribute.fontSize, fill = textAttribute.fill, opacity = textAttribute.opacity, underlineOffset = textAttribute.underlineOffset, underlineDash = textAttribute.underlineDash, fillOpacity = textAttribute.fillOpacity } = text.attribute;
|
|
18126
18000
|
const isMulti = !isNil(multiOption);
|
|
18127
18001
|
const w = isMulti ? multiOption.width : text.clipedWidth;
|
|
18128
18002
|
const offsetX = isMulti ? 0 : textDrawOffsetX(textAlign, w);
|
|
18003
|
+
const offsetY = textLayoutOffsetY(isMulti ? 'alphabetic' : textBaseline, fontSize, fontSize);
|
|
18129
18004
|
const attribute = { lineWidth: 0, stroke: fill, opacity, strokeOpacity: fillOpacity };
|
|
18005
|
+
let deltaY = isMulti ? -3 : 0;
|
|
18130
18006
|
if (underline) {
|
|
18131
18007
|
attribute.lineWidth = underline;
|
|
18132
|
-
context.setStrokeStyle(text, attribute,
|
|
18008
|
+
context.setStrokeStyle(text, attribute, x, y, textAttribute);
|
|
18133
18009
|
underlineDash && context.setLineDash(underlineDash);
|
|
18134
18010
|
context.beginPath();
|
|
18135
|
-
const dy =
|
|
18136
|
-
context.moveTo(
|
|
18137
|
-
context.lineTo(
|
|
18011
|
+
const dy = y + offsetY + fontSize + underlineOffset + deltaY;
|
|
18012
|
+
context.moveTo(x + offsetX, dy, z);
|
|
18013
|
+
context.lineTo(x + offsetX + w, dy, z);
|
|
18138
18014
|
context.stroke();
|
|
18139
18015
|
}
|
|
18016
|
+
if (isMulti) {
|
|
18017
|
+
deltaY = -1;
|
|
18018
|
+
}
|
|
18140
18019
|
if (lineThrough) {
|
|
18141
18020
|
attribute.lineWidth = lineThrough;
|
|
18142
|
-
context.setStrokeStyle(text, attribute,
|
|
18021
|
+
context.setStrokeStyle(text, attribute, x, y, textAttribute);
|
|
18143
18022
|
context.beginPath();
|
|
18144
|
-
const dy =
|
|
18145
|
-
context.moveTo(
|
|
18146
|
-
context.lineTo(
|
|
18023
|
+
const dy = y + offsetY + fontSize / 2 + deltaY;
|
|
18024
|
+
context.moveTo(x + offsetX, dy, z);
|
|
18025
|
+
context.lineTo(x + offsetX + w, dy, z);
|
|
18147
18026
|
context.stroke();
|
|
18148
18027
|
}
|
|
18149
18028
|
}
|
|
@@ -18583,16 +18462,18 @@ let DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender
|
|
|
18583
18462
|
}
|
|
18584
18463
|
draw(image, renderService, drawContext) {
|
|
18585
18464
|
const { image: url } = image.attribute;
|
|
18586
|
-
if (!
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18465
|
+
if (!image.isGifImage) {
|
|
18466
|
+
if (!url || !image.resources) {
|
|
18467
|
+
return;
|
|
18468
|
+
}
|
|
18469
|
+
const res = image.resources.get(url);
|
|
18470
|
+
if (res.state === 'loading' && isString(url)) {
|
|
18471
|
+
ResourceLoader.improveImageLoading(url);
|
|
18472
|
+
return;
|
|
18473
|
+
}
|
|
18474
|
+
else if (res.state !== 'success') {
|
|
18475
|
+
return;
|
|
18476
|
+
}
|
|
18596
18477
|
}
|
|
18597
18478
|
const { context } = renderService.drawParams;
|
|
18598
18479
|
if (!context) {
|
|
@@ -19145,7 +19026,7 @@ class CanvasTextLayout {
|
|
|
19145
19026
|
this.textOptions = options;
|
|
19146
19027
|
this.textMeasure = textMeasure;
|
|
19147
19028
|
}
|
|
19148
|
-
LayoutBBox(bbox, textAlign, textBaseline
|
|
19029
|
+
LayoutBBox(bbox, textAlign, textBaseline) {
|
|
19149
19030
|
if (textAlign === 'left' || textAlign === 'start') {
|
|
19150
19031
|
bbox.xOffset = 0;
|
|
19151
19032
|
}
|
|
@@ -19165,52 +19046,73 @@ class CanvasTextLayout {
|
|
|
19165
19046
|
bbox.yOffset = bbox.height / -2;
|
|
19166
19047
|
}
|
|
19167
19048
|
else if (textBaseline === 'alphabetic') {
|
|
19168
|
-
|
|
19169
|
-
if (linesLayout.length === 1) {
|
|
19170
|
-
const lineInfo = linesLayout[0];
|
|
19171
|
-
percent = lineInfo.ascent / (lineInfo.ascent + lineInfo.descent);
|
|
19172
|
-
}
|
|
19173
|
-
bbox.yOffset = bbox.height * -percent;
|
|
19049
|
+
bbox.yOffset = bbox.height * -0.79;
|
|
19174
19050
|
}
|
|
19175
19051
|
else {
|
|
19176
19052
|
bbox.yOffset = -bbox.height;
|
|
19177
19053
|
}
|
|
19178
19054
|
return bbox;
|
|
19179
19055
|
}
|
|
19180
|
-
|
|
19181
|
-
const
|
|
19056
|
+
GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, suffixPosition) {
|
|
19057
|
+
const linesLayout = [];
|
|
19058
|
+
const bboxWH = [width, height];
|
|
19059
|
+
const bboxOffset = [0, 0];
|
|
19060
|
+
while (str.length > 0) {
|
|
19061
|
+
const { str: clipText } = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak, suffixPosition);
|
|
19062
|
+
linesLayout.push({
|
|
19063
|
+
str: clipText,
|
|
19064
|
+
width: this.textMeasure.measureTextWidth(clipText, this.textOptions)
|
|
19065
|
+
});
|
|
19066
|
+
str = str.substring(clipText.length);
|
|
19067
|
+
}
|
|
19068
|
+
if (textAlign === 'left' || textAlign === 'start') ;
|
|
19069
|
+
else if (textAlign === 'center') {
|
|
19070
|
+
bboxOffset[0] = bboxWH[0] / -2;
|
|
19071
|
+
}
|
|
19072
|
+
else if (textAlign === 'right' || textAlign === 'end') {
|
|
19073
|
+
bboxOffset[0] = -bboxWH[0];
|
|
19074
|
+
}
|
|
19075
|
+
if (textBaseline === 'top') ;
|
|
19076
|
+
else if (textBaseline === 'middle') {
|
|
19077
|
+
bboxOffset[1] = bboxWH[1] / -2;
|
|
19078
|
+
}
|
|
19079
|
+
else if (textBaseline === 'bottom') {
|
|
19080
|
+
bboxOffset[1] = -bboxWH[1];
|
|
19081
|
+
}
|
|
19082
|
+
const bbox = {
|
|
19083
|
+
xOffset: bboxOffset[0],
|
|
19084
|
+
yOffset: bboxOffset[1],
|
|
19085
|
+
width: bboxWH[0],
|
|
19086
|
+
height: bboxWH[1]
|
|
19087
|
+
};
|
|
19088
|
+
return this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
19089
|
+
}
|
|
19090
|
+
GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = '', wordBreak, lineWidth, suffixPosition = 'end') {
|
|
19182
19091
|
lines = lines.map(l => l.toString());
|
|
19183
19092
|
const linesLayout = [];
|
|
19184
19093
|
const bboxWH = [0, 0];
|
|
19185
19094
|
if (typeof lineWidth === 'number' && lineWidth !== Infinity) {
|
|
19186
19095
|
let width;
|
|
19187
19096
|
for (let i = 0, len = lines.length; i < len; i++) {
|
|
19188
|
-
|
|
19189
|
-
width = Math.min(metrics.width, lineWidth);
|
|
19097
|
+
width = Math.min(this.textMeasure.measureTextWidth(lines[i], this.textOptions), lineWidth);
|
|
19190
19098
|
linesLayout.push({
|
|
19191
|
-
str:
|
|
19192
|
-
|
|
19193
|
-
: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
|
|
19194
|
-
width,
|
|
19195
|
-
ascent: metrics.ascent,
|
|
19196
|
-
descent: metrics.descent,
|
|
19197
|
-
keepCenterInLine
|
|
19099
|
+
str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
|
|
19100
|
+
width
|
|
19198
19101
|
});
|
|
19199
19102
|
}
|
|
19200
19103
|
bboxWH[0] = lineWidth;
|
|
19201
19104
|
}
|
|
19202
19105
|
else {
|
|
19203
|
-
|
|
19106
|
+
lineWidth = 0;
|
|
19204
19107
|
let width;
|
|
19205
19108
|
let text;
|
|
19206
19109
|
for (let i = 0, len = lines.length; i < len; i++) {
|
|
19207
19110
|
text = lines[i];
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
linesLayout.push({ str: text, width, ascent: metrics.ascent, descent: metrics.descent, keepCenterInLine });
|
|
19111
|
+
width = this.textMeasure.measureTextWidth(text, this.textOptions);
|
|
19112
|
+
lineWidth = Math.max(lineWidth, width);
|
|
19113
|
+
linesLayout.push({ str: text, width });
|
|
19212
19114
|
}
|
|
19213
|
-
bboxWH[0] =
|
|
19115
|
+
bboxWH[0] = lineWidth;
|
|
19214
19116
|
}
|
|
19215
19117
|
bboxWH[1] = linesLayout.length * lineHeight;
|
|
19216
19118
|
bboxWH[0] = linesLayout.reduce((a, b) => Math.max(a, b.width), 0);
|
|
@@ -19220,7 +19122,7 @@ class CanvasTextLayout {
|
|
|
19220
19122
|
width: bboxWH[0],
|
|
19221
19123
|
height: bboxWH[1]
|
|
19222
19124
|
};
|
|
19223
|
-
this.LayoutBBox(bbox, textAlign, textBaseline
|
|
19125
|
+
this.LayoutBBox(bbox, textAlign, textBaseline);
|
|
19224
19126
|
return this.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
19225
19127
|
}
|
|
19226
19128
|
layoutWithBBox(bbox, lines, textAlign, textBaseline, lineHeight) {
|
|
@@ -19257,20 +19159,7 @@ class CanvasTextLayout {
|
|
|
19257
19159
|
else if (textAlign === 'right' || textAlign === 'end') {
|
|
19258
19160
|
line.leftOffset = bbox.width - line.width;
|
|
19259
19161
|
}
|
|
19260
|
-
line.topOffset = lineHeight / 2 +
|
|
19261
|
-
if (!line.keepCenterInLine) {
|
|
19262
|
-
const actualHeight = line.ascent + line.descent;
|
|
19263
|
-
const buf = 0;
|
|
19264
|
-
const actualHeightWithBuf = actualHeight + buf;
|
|
19265
|
-
if (actualHeightWithBuf < lineHeight - buf) {
|
|
19266
|
-
if (textBaseline === 'bottom') {
|
|
19267
|
-
line.topOffset += (lineHeight - actualHeightWithBuf) / 2;
|
|
19268
|
-
}
|
|
19269
|
-
else if (textBaseline === 'top') {
|
|
19270
|
-
line.topOffset -= (lineHeight - actualHeightWithBuf) / 2;
|
|
19271
|
-
}
|
|
19272
|
-
}
|
|
19273
|
-
}
|
|
19162
|
+
line.topOffset = (lineHeight - this.textOptions.fontSize) / 2 + this.textOptions.fontSize * 0.79 + origin[1];
|
|
19274
19163
|
origin[1] += lineHeight;
|
|
19275
19164
|
return line;
|
|
19276
19165
|
}
|
|
@@ -19279,7 +19168,6 @@ class CanvasTextLayout {
|
|
|
19279
19168
|
const TEXT_UPDATE_TAG_KEY = [
|
|
19280
19169
|
'text',
|
|
19281
19170
|
'maxLineWidth',
|
|
19282
|
-
'maxWidth',
|
|
19283
19171
|
'textAlign',
|
|
19284
19172
|
'textBaseline',
|
|
19285
19173
|
'heightLimit',
|
|
@@ -19307,14 +19195,20 @@ class Text extends Graphic {
|
|
|
19307
19195
|
var _a;
|
|
19308
19196
|
const attribute = this.attribute;
|
|
19309
19197
|
const textTheme = this.getGraphicTheme();
|
|
19310
|
-
|
|
19311
|
-
|
|
19198
|
+
if (!this.isSimplify()) {
|
|
19199
|
+
return undefined;
|
|
19200
|
+
}
|
|
19201
|
+
const { maxLineWidth = textTheme.maxLineWidth } = attribute;
|
|
19202
|
+
if (!Number.isFinite(maxLineWidth)) {
|
|
19312
19203
|
return ((_a = attribute.text) !== null && _a !== void 0 ? _a : textTheme.text).toString();
|
|
19313
19204
|
}
|
|
19314
19205
|
this.tryUpdateAABBBounds();
|
|
19315
19206
|
return this.cache.clipedText;
|
|
19316
19207
|
}
|
|
19317
19208
|
get clipedWidth() {
|
|
19209
|
+
if (!this.isSimplify()) {
|
|
19210
|
+
return undefined;
|
|
19211
|
+
}
|
|
19318
19212
|
this.tryUpdateAABBBounds();
|
|
19319
19213
|
return this.cache.clipedWidth;
|
|
19320
19214
|
}
|
|
@@ -19322,11 +19216,10 @@ class Text extends Graphic {
|
|
|
19322
19216
|
var _a, _b;
|
|
19323
19217
|
const textTheme = this.getGraphicTheme();
|
|
19324
19218
|
const attribute = this.attribute;
|
|
19325
|
-
const
|
|
19326
|
-
if (!Number.isFinite(
|
|
19219
|
+
const { maxLineWidth = textTheme.maxLineWidth, text, whiteSpace = textTheme.whiteSpace } = attribute;
|
|
19220
|
+
if (!Number.isFinite(maxLineWidth)) {
|
|
19327
19221
|
return false;
|
|
19328
19222
|
}
|
|
19329
|
-
const { text } = this.attribute;
|
|
19330
19223
|
this.tryUpdateAABBBounds();
|
|
19331
19224
|
if ((_b = (_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData) === null || _b === void 0 ? void 0 : _b.lines) {
|
|
19332
19225
|
let mergedText = '';
|
|
@@ -19345,9 +19238,15 @@ class Text extends Graphic {
|
|
|
19345
19238
|
return this.clipedText !== attribute.text.toString();
|
|
19346
19239
|
}
|
|
19347
19240
|
get multilineLayout() {
|
|
19241
|
+
if (!this.isMultiLine) {
|
|
19242
|
+
return undefined;
|
|
19243
|
+
}
|
|
19348
19244
|
this.tryUpdateAABBBounds();
|
|
19349
19245
|
return this.cache.layoutData;
|
|
19350
19246
|
}
|
|
19247
|
+
isSimplify() {
|
|
19248
|
+
return !this.isMultiLine && this.attribute.direction !== 'vertical';
|
|
19249
|
+
}
|
|
19351
19250
|
get isMultiLine() {
|
|
19352
19251
|
return Array.isArray(this.attribute.text) || this.attribute.whiteSpace === 'normal';
|
|
19353
19252
|
}
|
|
@@ -19415,74 +19314,13 @@ class Text extends Graphic {
|
|
|
19415
19314
|
transformBoundsWithMatrix(aabbBounds, aabbBounds, this.transMatrix);
|
|
19416
19315
|
return aabbBounds;
|
|
19417
19316
|
}
|
|
19418
|
-
updateSingallineAABBBounds(text) {
|
|
19419
|
-
this.updateMultilineAABBBounds([text]);
|
|
19420
|
-
const layoutData = this.cache.layoutData;
|
|
19421
|
-
if (layoutData) {
|
|
19422
|
-
const line = layoutData.lines[0];
|
|
19423
|
-
this.cache.clipedText = line.str;
|
|
19424
|
-
this.cache.clipedWidth = line.width;
|
|
19425
|
-
}
|
|
19426
|
-
return this._AABBBounds;
|
|
19427
|
-
}
|
|
19428
|
-
updateMultilineAABBBounds(text) {
|
|
19429
|
-
const textTheme = this.getGraphicTheme();
|
|
19430
|
-
const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
|
|
19431
|
-
const b = direction === 'horizontal'
|
|
19432
|
-
? this.updateHorizontalMultilineAABBBounds(text)
|
|
19433
|
-
: this.updateVerticalMultilineAABBBounds(text);
|
|
19434
|
-
if (direction === 'horizontal') {
|
|
19435
|
-
if (underlineOffset) {
|
|
19436
|
-
this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
|
|
19437
|
-
}
|
|
19438
|
-
}
|
|
19439
|
-
return b;
|
|
19440
|
-
}
|
|
19441
|
-
guessLineHeightBuf(fontSize) {
|
|
19442
|
-
return fontSize ? fontSize * 0.1 : 0;
|
|
19443
|
-
}
|
|
19444
|
-
updateHorizontalMultilineAABBBounds(text) {
|
|
19445
|
-
var _a;
|
|
19446
|
-
const textTheme = this.getGraphicTheme();
|
|
19447
|
-
const attribute = this.attribute;
|
|
19448
|
-
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, wrap = textTheme.wrap, measureMode = textTheme.measureMode, lineWidth = textTheme.lineWidth, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition, ignoreBuf = textTheme.ignoreBuf, keepCenterInLine = textTheme.keepCenterInLine } = attribute;
|
|
19449
|
-
const buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize);
|
|
19450
|
-
const lineHeight = this.getLineHeight(attribute, textTheme) + buf;
|
|
19451
|
-
if (whiteSpace === 'normal' || wrap) {
|
|
19452
|
-
return this.updateWrapAABBBounds(text);
|
|
19453
|
-
}
|
|
19454
|
-
if (!this.shouldUpdateShape() && ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData)) {
|
|
19455
|
-
const bbox = this.cache.layoutData.bbox;
|
|
19456
|
-
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
19457
|
-
if (stroke) {
|
|
19458
|
-
this._AABBBounds.expand(lineWidth / 2);
|
|
19459
|
-
}
|
|
19460
|
-
return this._AABBBounds;
|
|
19461
|
-
}
|
|
19462
|
-
const textMeasure = application.graphicUtil.textMeasure;
|
|
19463
|
-
const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily, lineHeight }, textMeasure);
|
|
19464
|
-
const layoutData = layoutObj.GetLayoutByLines(text, textAlign, textBaseline, lineHeight, ellipsis === true ? textTheme.ellipsis : ellipsis || undefined, false, {
|
|
19465
|
-
lineWidth: maxLineWidth,
|
|
19466
|
-
suffixPosition,
|
|
19467
|
-
measureMode,
|
|
19468
|
-
keepCenterInLine
|
|
19469
|
-
});
|
|
19470
|
-
const { bbox } = layoutData;
|
|
19471
|
-
this.cache.layoutData = layoutData;
|
|
19472
|
-
this.clearUpdateShapeTag();
|
|
19473
|
-
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
19474
|
-
if (stroke) {
|
|
19475
|
-
this._AABBBounds.expand(lineWidth / 2);
|
|
19476
|
-
}
|
|
19477
|
-
return this._AABBBounds;
|
|
19478
|
-
}
|
|
19479
19317
|
updateWrapAABBBounds(text) {
|
|
19480
|
-
var _a, _b, _c;
|
|
19318
|
+
var _a, _b, _c, _d;
|
|
19481
19319
|
const textTheme = this.getGraphicTheme();
|
|
19482
|
-
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, fontWeight = textTheme.fontWeight, ignoreBuf = textTheme.ignoreBuf,
|
|
19483
|
-
const
|
|
19484
|
-
const
|
|
19485
|
-
if (!this.shouldUpdateShape() && ((
|
|
19320
|
+
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, fontWeight = textTheme.fontWeight, ignoreBuf = textTheme.ignoreBuf, suffixPosition = textTheme.suffixPosition, heightLimit = 0, lineClamp } = this.attribute;
|
|
19321
|
+
const lineHeight = (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (this.attribute.fontSize || textTheme.fontSize);
|
|
19322
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
19323
|
+
if (!this.shouldUpdateShape() && ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.layoutData)) {
|
|
19486
19324
|
const bbox = this.cache.layoutData.bbox;
|
|
19487
19325
|
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
19488
19326
|
if (stroke) {
|
|
@@ -19491,8 +19329,7 @@ class Text extends Graphic {
|
|
|
19491
19329
|
return this._AABBBounds;
|
|
19492
19330
|
}
|
|
19493
19331
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
19494
|
-
const
|
|
19495
|
-
const layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure);
|
|
19332
|
+
const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily }, textMeasure);
|
|
19496
19333
|
const lines = isArray(text) ? text.map(l => l.toString()) : [text.toString()];
|
|
19497
19334
|
const linesLayout = [];
|
|
19498
19335
|
const bboxWH = [0, 0];
|
|
@@ -19509,23 +19346,19 @@ class Text extends Graphic {
|
|
|
19509
19346
|
const str = lines[i];
|
|
19510
19347
|
let needCut = true;
|
|
19511
19348
|
if (i === lineCountLimit - 1) {
|
|
19512
|
-
const clip = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, false, suffixPosition, i !== lines.length - 1);
|
|
19513
|
-
const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
19349
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition, i !== lines.length - 1);
|
|
19514
19350
|
linesLayout.push({
|
|
19515
19351
|
str: clip.str,
|
|
19516
|
-
width: clip.width
|
|
19517
|
-
ascent: matrics.ascent,
|
|
19518
|
-
descent: matrics.descent,
|
|
19519
|
-
keepCenterInLine
|
|
19352
|
+
width: clip.width
|
|
19520
19353
|
});
|
|
19521
19354
|
break;
|
|
19522
19355
|
}
|
|
19523
|
-
const clip = textMeasure.clipText(str, textOptions, maxLineWidth, wordBreak !== 'break-all', wordBreak === 'keep-all');
|
|
19356
|
+
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, wordBreak !== 'break-all', wordBreak === 'keep-all');
|
|
19524
19357
|
if ((str !== '' && clip.str === '') || clip.wordBreaked) {
|
|
19525
19358
|
if (ellipsis) {
|
|
19526
|
-
const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19527
|
-
clip.str = (
|
|
19528
|
-
clip.width = (
|
|
19359
|
+
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19360
|
+
clip.str = (_c = clipEllipsis.str) !== null && _c !== void 0 ? _c : '';
|
|
19361
|
+
clip.width = (_d = clipEllipsis.width) !== null && _d !== void 0 ? _d : 0;
|
|
19529
19362
|
}
|
|
19530
19363
|
else {
|
|
19531
19364
|
clip.str = '';
|
|
@@ -19533,13 +19366,9 @@ class Text extends Graphic {
|
|
|
19533
19366
|
}
|
|
19534
19367
|
needCut = false;
|
|
19535
19368
|
}
|
|
19536
|
-
const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
19537
19369
|
linesLayout.push({
|
|
19538
19370
|
str: clip.str,
|
|
19539
|
-
width: clip.width
|
|
19540
|
-
ascent: matrics.ascent,
|
|
19541
|
-
descent: matrics.descent,
|
|
19542
|
-
keepCenterInLine
|
|
19371
|
+
width: clip.width
|
|
19543
19372
|
});
|
|
19544
19373
|
let cutLength = clip.str.length;
|
|
19545
19374
|
if (clip.wordBreaked && !(str !== '' && clip.str === '')) {
|
|
@@ -19548,7 +19377,10 @@ class Text extends Graphic {
|
|
|
19548
19377
|
}
|
|
19549
19378
|
if (clip.str.length === str.length) ;
|
|
19550
19379
|
else if (needCut) {
|
|
19551
|
-
|
|
19380
|
+
let newStr = str.substring(cutLength);
|
|
19381
|
+
if (wordBreak === 'keep-all') {
|
|
19382
|
+
newStr = newStr.replace(/^\s+/g, '');
|
|
19383
|
+
}
|
|
19552
19384
|
lines.splice(i + 1, 0, newStr);
|
|
19553
19385
|
}
|
|
19554
19386
|
}
|
|
@@ -19565,34 +19397,29 @@ class Text extends Graphic {
|
|
|
19565
19397
|
let text;
|
|
19566
19398
|
for (let i = 0, len = lines.length; i < len; i++) {
|
|
19567
19399
|
if (i === lineCountLimit - 1) {
|
|
19568
|
-
const clip = textMeasure.clipTextWithSuffix(lines[i], textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19569
|
-
const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions, measureMode);
|
|
19400
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19570
19401
|
linesLayout.push({
|
|
19571
19402
|
str: clip.str,
|
|
19572
|
-
width: clip.width
|
|
19573
|
-
ascent: matrics.ascent,
|
|
19574
|
-
descent: matrics.descent,
|
|
19575
|
-
keepCenterInLine
|
|
19403
|
+
width: clip.width
|
|
19576
19404
|
});
|
|
19577
19405
|
lineWidth = Math.max(lineWidth, clip.width);
|
|
19578
19406
|
break;
|
|
19579
19407
|
}
|
|
19580
19408
|
text = lines[i];
|
|
19581
|
-
width = textMeasure.measureTextWidth(text, textOptions);
|
|
19409
|
+
width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, wordBreak === 'break-word');
|
|
19582
19410
|
lineWidth = Math.max(lineWidth, width);
|
|
19583
|
-
|
|
19584
|
-
linesLayout.push({ str: text, width, ascent: matrics.ascent, descent: matrics.descent, keepCenterInLine });
|
|
19411
|
+
linesLayout.push({ str: text, width });
|
|
19585
19412
|
}
|
|
19586
19413
|
bboxWH[0] = lineWidth;
|
|
19587
19414
|
}
|
|
19588
|
-
bboxWH[1] = linesLayout.length * lineHeight;
|
|
19415
|
+
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
19589
19416
|
const bbox = {
|
|
19590
19417
|
xOffset: 0,
|
|
19591
19418
|
yOffset: 0,
|
|
19592
19419
|
width: bboxWH[0],
|
|
19593
19420
|
height: bboxWH[1]
|
|
19594
19421
|
};
|
|
19595
|
-
layoutObj.LayoutBBox(bbox, textAlign, textBaseline
|
|
19422
|
+
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
19596
19423
|
const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
19597
19424
|
this.cache.layoutData = layoutData;
|
|
19598
19425
|
this.clearUpdateShapeTag();
|
|
@@ -19602,19 +19429,212 @@ class Text extends Graphic {
|
|
|
19602
19429
|
}
|
|
19603
19430
|
return this._AABBBounds;
|
|
19604
19431
|
}
|
|
19605
|
-
|
|
19432
|
+
updateSingallineAABBBounds(text) {
|
|
19433
|
+
const textTheme = this.getGraphicTheme();
|
|
19434
|
+
const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
|
|
19435
|
+
const b = direction === 'horizontal'
|
|
19436
|
+
? this.updateHorizontalSinglelineAABBBounds(text)
|
|
19437
|
+
: this.updateVerticalSinglelineAABBBounds(text);
|
|
19438
|
+
if (direction === 'horizontal') {
|
|
19439
|
+
if (underlineOffset) {
|
|
19440
|
+
this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
|
|
19441
|
+
}
|
|
19442
|
+
}
|
|
19443
|
+
return b;
|
|
19444
|
+
}
|
|
19445
|
+
updateMultilineAABBBounds(text) {
|
|
19446
|
+
const textTheme = this.getGraphicTheme();
|
|
19447
|
+
const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;
|
|
19448
|
+
const b = direction === 'horizontal'
|
|
19449
|
+
? this.updateHorizontalMultilineAABBBounds(text)
|
|
19450
|
+
: this.updateVerticalMultilineAABBBounds(text);
|
|
19451
|
+
if (direction === 'horizontal') {
|
|
19452
|
+
if (underlineOffset) {
|
|
19453
|
+
this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);
|
|
19454
|
+
}
|
|
19455
|
+
}
|
|
19456
|
+
return b;
|
|
19457
|
+
}
|
|
19458
|
+
updateHorizontalSinglelineAABBBounds(text) {
|
|
19459
|
+
var _a, _b;
|
|
19460
|
+
const textTheme = this.getGraphicTheme();
|
|
19461
|
+
const { wrap = textTheme.wrap } = this.attribute;
|
|
19462
|
+
if (wrap) {
|
|
19463
|
+
return this.updateWrapAABBBounds([text]);
|
|
19464
|
+
}
|
|
19465
|
+
const textMeasure = application.graphicUtil.textMeasure;
|
|
19466
|
+
let width;
|
|
19467
|
+
let str;
|
|
19468
|
+
const attribute = this.attribute;
|
|
19469
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, ignoreBuf = textTheme.ignoreBuf, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition } = attribute;
|
|
19470
|
+
if (whiteSpace === 'normal') {
|
|
19471
|
+
return this.updateWrapAABBBounds(text);
|
|
19472
|
+
}
|
|
19473
|
+
const buf = ignoreBuf ? 0 : Math.max(2, fontSize * 0.075);
|
|
19474
|
+
const textFontSize = attribute.fontSize || textTheme.fontSize;
|
|
19475
|
+
const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, textFontSize)) !== null && _a !== void 0 ? _a : textFontSize + buf;
|
|
19476
|
+
if (!this.shouldUpdateShape() && this.cache) {
|
|
19477
|
+
width = (_b = this.cache.clipedWidth) !== null && _b !== void 0 ? _b : 0;
|
|
19478
|
+
const dx = textDrawOffsetX(textAlign, width);
|
|
19479
|
+
const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
|
|
19480
|
+
this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight);
|
|
19481
|
+
if (stroke) {
|
|
19482
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19483
|
+
}
|
|
19484
|
+
return this._AABBBounds;
|
|
19485
|
+
}
|
|
19486
|
+
if (Number.isFinite(maxLineWidth)) {
|
|
19487
|
+
if (ellipsis) {
|
|
19488
|
+
const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
|
|
19489
|
+
const data = textMeasure.clipTextWithSuffix(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, false, suffixPosition);
|
|
19490
|
+
str = data.str;
|
|
19491
|
+
width = data.width;
|
|
19492
|
+
}
|
|
19493
|
+
else {
|
|
19494
|
+
const data = textMeasure.clipText(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, false);
|
|
19495
|
+
str = data.str;
|
|
19496
|
+
width = data.width;
|
|
19497
|
+
}
|
|
19498
|
+
this.cache.clipedText = str;
|
|
19499
|
+
this.cache.clipedWidth = width;
|
|
19500
|
+
}
|
|
19501
|
+
else {
|
|
19502
|
+
width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontWeight, fontFamily });
|
|
19503
|
+
this.cache.clipedText = text.toString();
|
|
19504
|
+
this.cache.clipedWidth = width;
|
|
19505
|
+
}
|
|
19506
|
+
this.clearUpdateShapeTag();
|
|
19507
|
+
const dx = textDrawOffsetX(textAlign, width);
|
|
19508
|
+
let lh = lineHeight;
|
|
19509
|
+
if (application.global && application.global.isSafari()) {
|
|
19510
|
+
lh += fontSize * 0.2;
|
|
19511
|
+
}
|
|
19512
|
+
const dy = textLayoutOffsetY(textBaseline, lh, fontSize, buf);
|
|
19513
|
+
this._AABBBounds.set(dx, dy, dx + width, dy + lh);
|
|
19514
|
+
if (stroke) {
|
|
19515
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19516
|
+
}
|
|
19517
|
+
return this._AABBBounds;
|
|
19518
|
+
}
|
|
19519
|
+
getBaselineMapAlign() {
|
|
19520
|
+
return Text.baselineMapAlign;
|
|
19521
|
+
}
|
|
19522
|
+
getAlignMapBaseline() {
|
|
19523
|
+
return Text.alignMapBaseline;
|
|
19524
|
+
}
|
|
19525
|
+
updateVerticalSinglelineAABBBounds(text) {
|
|
19526
|
+
var _a, _b, _c;
|
|
19527
|
+
const textTheme = this.getGraphicTheme();
|
|
19528
|
+
const textMeasure = application.graphicUtil.textMeasure;
|
|
19529
|
+
let width;
|
|
19530
|
+
const attribute = this.attribute;
|
|
19531
|
+
const { ignoreBuf = textTheme.ignoreBuf } = attribute;
|
|
19532
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
19533
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode, suffixPosition = textTheme.suffixPosition } = attribute;
|
|
19534
|
+
const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
19535
|
+
let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
|
|
19536
|
+
if (!verticalMode) {
|
|
19537
|
+
const t = textAlign;
|
|
19538
|
+
textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
|
|
19539
|
+
textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
|
|
19540
|
+
}
|
|
19541
|
+
if (!this.shouldUpdateShape() && this.cache) {
|
|
19542
|
+
width = this.cache.clipedWidth;
|
|
19543
|
+
const dx = textDrawOffsetX(textAlign, width);
|
|
19544
|
+
const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
|
|
19545
|
+
this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width);
|
|
19546
|
+
if (stroke) {
|
|
19547
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19548
|
+
}
|
|
19549
|
+
return this._AABBBounds;
|
|
19550
|
+
}
|
|
19551
|
+
let verticalList = [
|
|
19552
|
+
verticalLayout(text.toString())
|
|
19553
|
+
];
|
|
19554
|
+
if (Number.isFinite(maxLineWidth)) {
|
|
19555
|
+
if (ellipsis) {
|
|
19556
|
+
const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
|
|
19557
|
+
const data = textMeasure.clipTextWithSuffixVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, false, suffixPosition);
|
|
19558
|
+
verticalList = [data.verticalList];
|
|
19559
|
+
width = data.width;
|
|
19560
|
+
}
|
|
19561
|
+
else {
|
|
19562
|
+
const data = textMeasure.clipTextVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, false);
|
|
19563
|
+
verticalList = [data.verticalList];
|
|
19564
|
+
width = data.width;
|
|
19565
|
+
}
|
|
19566
|
+
this.cache.verticalList = verticalList;
|
|
19567
|
+
this.cache.clipedWidth = width;
|
|
19568
|
+
}
|
|
19569
|
+
else {
|
|
19570
|
+
width = 0;
|
|
19571
|
+
verticalList[0].forEach(t => {
|
|
19572
|
+
const w = t.direction === TextDirection.HORIZONTAL
|
|
19573
|
+
? fontSize
|
|
19574
|
+
: textMeasure.measureTextWidth(t.text, { fontSize, fontWeight, fontFamily });
|
|
19575
|
+
width += w;
|
|
19576
|
+
t.width = w;
|
|
19577
|
+
});
|
|
19578
|
+
this.cache.verticalList = verticalList;
|
|
19579
|
+
this.cache.clipedWidth = width;
|
|
19580
|
+
}
|
|
19581
|
+
this.clearUpdateShapeTag();
|
|
19582
|
+
const dx = textDrawOffsetX(textAlign, width);
|
|
19583
|
+
const dy = textLayoutOffsetY(textBaseline, lineHeight, fontSize);
|
|
19584
|
+
this._AABBBounds.set(dy, dx, dy + lineHeight, dx + width);
|
|
19585
|
+
if (stroke) {
|
|
19586
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19587
|
+
}
|
|
19588
|
+
return this._AABBBounds;
|
|
19589
|
+
}
|
|
19590
|
+
updateHorizontalMultilineAABBBounds(text) {
|
|
19606
19591
|
var _a, _b;
|
|
19607
19592
|
const textTheme = this.getGraphicTheme();
|
|
19593
|
+
const { wrap = textTheme.wrap } = this.attribute;
|
|
19594
|
+
if (wrap) {
|
|
19595
|
+
return this.updateWrapAABBBounds(text);
|
|
19596
|
+
}
|
|
19597
|
+
const attribute = this.attribute;
|
|
19598
|
+
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, whiteSpace = textTheme.whiteSpace, suffixPosition = textTheme.suffixPosition } = attribute;
|
|
19599
|
+
const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize);
|
|
19600
|
+
if (whiteSpace === 'normal') {
|
|
19601
|
+
return this.updateWrapAABBBounds(text);
|
|
19602
|
+
}
|
|
19603
|
+
if (!this.shouldUpdateShape() && ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.layoutData)) {
|
|
19604
|
+
const bbox = this.cache.layoutData.bbox;
|
|
19605
|
+
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
19606
|
+
if (stroke) {
|
|
19607
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19608
|
+
}
|
|
19609
|
+
return this._AABBBounds;
|
|
19610
|
+
}
|
|
19611
|
+
const textMeasure = application.graphicUtil.textMeasure;
|
|
19612
|
+
const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily }, textMeasure);
|
|
19613
|
+
const layoutData = layoutObj.GetLayoutByLines(text, textAlign, textBaseline, lineHeight, ellipsis === true ? textTheme.ellipsis : ellipsis || undefined, false, maxLineWidth, suffixPosition);
|
|
19614
|
+
const { bbox } = layoutData;
|
|
19615
|
+
this.cache.layoutData = layoutData;
|
|
19616
|
+
this.clearUpdateShapeTag();
|
|
19617
|
+
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
19618
|
+
if (stroke) {
|
|
19619
|
+
this._AABBBounds.expand(lineWidth / 2);
|
|
19620
|
+
}
|
|
19621
|
+
return this._AABBBounds;
|
|
19622
|
+
}
|
|
19623
|
+
updateVerticalMultilineAABBBounds(text) {
|
|
19624
|
+
var _a, _b, _c;
|
|
19625
|
+
const textTheme = this.getGraphicTheme();
|
|
19608
19626
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
19609
19627
|
let width;
|
|
19610
19628
|
const attribute = this.attribute;
|
|
19629
|
+
const { ignoreBuf = textTheme.ignoreBuf } = attribute;
|
|
19630
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
19611
19631
|
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode, suffixPosition = textTheme.suffixPosition } = attribute;
|
|
19612
|
-
const lineHeight =
|
|
19632
|
+
const lineHeight = (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
19613
19633
|
let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
|
|
19614
19634
|
if (!verticalMode) {
|
|
19615
19635
|
const t = textAlign;
|
|
19616
|
-
textAlign = (
|
|
19617
|
-
textBaseline = (
|
|
19636
|
+
textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
|
|
19637
|
+
textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
|
|
19618
19638
|
}
|
|
19619
19639
|
width = 0;
|
|
19620
19640
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
@@ -19674,15 +19694,6 @@ class Text extends Graphic {
|
|
|
19674
19694
|
}
|
|
19675
19695
|
return this._AABBBounds;
|
|
19676
19696
|
}
|
|
19677
|
-
getMaxWidth(theme) {
|
|
19678
|
-
var _a, _b;
|
|
19679
|
-
const attribute = this.attribute;
|
|
19680
|
-
return (_b = (_a = attribute.maxLineWidth) !== null && _a !== void 0 ? _a : attribute.maxWidth) !== null && _b !== void 0 ? _b : theme.maxWidth;
|
|
19681
|
-
}
|
|
19682
|
-
getLineHeight(attribute, textTheme) {
|
|
19683
|
-
var _a;
|
|
19684
|
-
return ((_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize));
|
|
19685
|
-
}
|
|
19686
19697
|
needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
|
|
19687
19698
|
return super.needUpdateTags(keys, k);
|
|
19688
19699
|
}
|
|
@@ -19695,12 +19706,6 @@ class Text extends Graphic {
|
|
|
19695
19706
|
getNoWorkAnimateAttr() {
|
|
19696
19707
|
return Text.NOWORK_ANIMATE_ATTR;
|
|
19697
19708
|
}
|
|
19698
|
-
getBaselineMapAlign() {
|
|
19699
|
-
return Text.baselineMapAlign;
|
|
19700
|
-
}
|
|
19701
|
-
getAlignMapBaseline() {
|
|
19702
|
-
return Text.alignMapBaseline;
|
|
19703
|
-
}
|
|
19704
19709
|
}
|
|
19705
19710
|
Text.NOWORK_ANIMATE_ATTR = Object.assign({ ellipsis: 1, wordBreak: 1, direction: 1, textAlign: 1, textBaseline: 1, fontFamily: 1, fontWeight: 1 }, NOWORK_ANIMATE_ATTR);
|
|
19706
19711
|
Text.baselineMapAlign = {
|
|
@@ -19764,10 +19769,7 @@ class WrapText extends Text {
|
|
|
19764
19769
|
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19765
19770
|
linesLayout.push({
|
|
19766
19771
|
str: clip.str,
|
|
19767
|
-
width: clip.width
|
|
19768
|
-
ascent: 0,
|
|
19769
|
-
descent: 0,
|
|
19770
|
-
keepCenterInLine: false
|
|
19772
|
+
width: clip.width
|
|
19771
19773
|
});
|
|
19772
19774
|
break;
|
|
19773
19775
|
}
|
|
@@ -19786,10 +19788,7 @@ class WrapText extends Text {
|
|
|
19786
19788
|
}
|
|
19787
19789
|
linesLayout.push({
|
|
19788
19790
|
str: clip.str,
|
|
19789
|
-
width: clip.width
|
|
19790
|
-
ascent: 0,
|
|
19791
|
-
descent: 0,
|
|
19792
|
-
keepCenterInLine: false
|
|
19791
|
+
width: clip.width
|
|
19793
19792
|
});
|
|
19794
19793
|
if (clip.str.length === str.length) ;
|
|
19795
19794
|
else if (needCut) {
|
|
@@ -19813,10 +19812,7 @@ class WrapText extends Text {
|
|
|
19813
19812
|
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, false, suffixPosition);
|
|
19814
19813
|
linesLayout.push({
|
|
19815
19814
|
str: clip.str,
|
|
19816
|
-
width: clip.width
|
|
19817
|
-
ascent: 0,
|
|
19818
|
-
descent: 0,
|
|
19819
|
-
keepCenterInLine: false
|
|
19815
|
+
width: clip.width
|
|
19820
19816
|
});
|
|
19821
19817
|
lineWidth = Math.max(lineWidth, clip.width);
|
|
19822
19818
|
break;
|
|
@@ -19824,7 +19820,7 @@ class WrapText extends Text {
|
|
|
19824
19820
|
text = lines[i];
|
|
19825
19821
|
width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, wordBreak === 'break-word');
|
|
19826
19822
|
lineWidth = Math.max(lineWidth, width);
|
|
19827
|
-
linesLayout.push({ str: text, width
|
|
19823
|
+
linesLayout.push({ str: text, width });
|
|
19828
19824
|
}
|
|
19829
19825
|
bboxWH[0] = lineWidth;
|
|
19830
19826
|
}
|
|
@@ -19887,9 +19883,6 @@ class BaseSymbol {
|
|
|
19887
19883
|
bounds.y2 = size[1] / 2;
|
|
19888
19884
|
}
|
|
19889
19885
|
}
|
|
19890
|
-
parseSize(size) {
|
|
19891
|
-
return isNumber(size) ? size : Math.min(size[0], size[1]);
|
|
19892
|
-
}
|
|
19893
19886
|
}
|
|
19894
19887
|
|
|
19895
19888
|
function circle(ctx, r, x, y, z) {
|
|
@@ -19908,15 +19901,15 @@ class CircleSymbol extends BaseSymbol {
|
|
|
19908
19901
|
this.pathStr = 'M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0';
|
|
19909
19902
|
}
|
|
19910
19903
|
draw(ctx, size, x, y, z) {
|
|
19911
|
-
const r =
|
|
19904
|
+
const r = size / 2;
|
|
19912
19905
|
return circle(ctx, r, x, y, z);
|
|
19913
19906
|
}
|
|
19914
19907
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
19915
|
-
const r =
|
|
19908
|
+
const r = size / 2 + offset;
|
|
19916
19909
|
return circle(ctx, r, x, y, z);
|
|
19917
19910
|
}
|
|
19918
19911
|
drawToSvgPath(size, x, y, z) {
|
|
19919
|
-
const r =
|
|
19912
|
+
const r = size / 2;
|
|
19920
19913
|
return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${r * 2},0 a ${r},${r} 0 1,0 -${r * 2},0`;
|
|
19921
19914
|
}
|
|
19922
19915
|
}
|
|
@@ -19961,11 +19954,11 @@ class CrossSymbol extends BaseSymbol {
|
|
|
19961
19954
|
this.pathStr = 'M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z';
|
|
19962
19955
|
}
|
|
19963
19956
|
draw(ctx, size, x, y, z) {
|
|
19964
|
-
const r =
|
|
19957
|
+
const r = size / 6;
|
|
19965
19958
|
return cross(ctx, r, x, y, z);
|
|
19966
19959
|
}
|
|
19967
19960
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
19968
|
-
const r =
|
|
19961
|
+
const r = size / 6;
|
|
19969
19962
|
return crossOffset(ctx, r, x, y, offset, z);
|
|
19970
19963
|
}
|
|
19971
19964
|
}
|
|
@@ -19986,15 +19979,15 @@ class DiamondSymbol extends BaseSymbol {
|
|
|
19986
19979
|
this.pathStr = 'M-0.5,0L0,-0.5L0.5,0L0,0.5Z';
|
|
19987
19980
|
}
|
|
19988
19981
|
draw(ctx, size, x, y, z) {
|
|
19989
|
-
const r =
|
|
19982
|
+
const r = size / 2;
|
|
19990
19983
|
return diamond(ctx, r, x, y, z);
|
|
19991
19984
|
}
|
|
19992
19985
|
drawFitDir(ctx, size, x, y, z) {
|
|
19993
|
-
const r =
|
|
19986
|
+
const r = size / 2;
|
|
19994
19987
|
return diamond(ctx, r, x, y, z);
|
|
19995
19988
|
}
|
|
19996
19989
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
19997
|
-
const r =
|
|
19990
|
+
const r = size / 2 + offset;
|
|
19998
19991
|
return diamond(ctx, r, x, y, z);
|
|
19999
19992
|
}
|
|
20000
19993
|
}
|
|
@@ -20012,11 +20005,11 @@ class SquareSymbol extends BaseSymbol {
|
|
|
20012
20005
|
this.pathStr = 'M-0.5,-0.5h1v1h-1Z';
|
|
20013
20006
|
}
|
|
20014
20007
|
draw(ctx, size, x, y) {
|
|
20015
|
-
const r =
|
|
20008
|
+
const r = size / 2;
|
|
20016
20009
|
return square(ctx, r, x, y);
|
|
20017
20010
|
}
|
|
20018
20011
|
drawOffset(ctx, size, x, y, offset) {
|
|
20019
|
-
const r =
|
|
20012
|
+
const r = size / 2 + offset;
|
|
20020
20013
|
return square(ctx, r, x, y);
|
|
20021
20014
|
}
|
|
20022
20015
|
}
|
|
@@ -20036,11 +20029,11 @@ class TriangleUpSymbol extends BaseSymbol {
|
|
|
20036
20029
|
this.pathStr = 'M0.5,0.5 L-0.5,0.5 L0,-0.5 Z';
|
|
20037
20030
|
}
|
|
20038
20031
|
draw(ctx, size, x, y) {
|
|
20039
|
-
const r =
|
|
20032
|
+
const r = size / 2;
|
|
20040
20033
|
return trianglUpOffset(ctx, r, x, y);
|
|
20041
20034
|
}
|
|
20042
20035
|
drawOffset(ctx, size, x, y, offset) {
|
|
20043
|
-
const r =
|
|
20036
|
+
const r = size / 2;
|
|
20044
20037
|
return trianglUpOffset(ctx, r, x, y, offset);
|
|
20045
20038
|
}
|
|
20046
20039
|
}
|
|
@@ -20079,11 +20072,11 @@ class StarSymbol extends BaseSymbol {
|
|
|
20079
20072
|
this.pathStr = 'M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z';
|
|
20080
20073
|
}
|
|
20081
20074
|
draw(ctx, size, transX, transY) {
|
|
20082
|
-
const r =
|
|
20075
|
+
const r = size / 2;
|
|
20083
20076
|
return star(ctx, r, transX, transY);
|
|
20084
20077
|
}
|
|
20085
20078
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20086
|
-
const r =
|
|
20079
|
+
const r = size / 2 + offset;
|
|
20087
20080
|
return star(ctx, r, transX, transY);
|
|
20088
20081
|
}
|
|
20089
20082
|
}
|
|
@@ -20112,11 +20105,11 @@ class ArrowSymbol extends BaseSymbol {
|
|
|
20112
20105
|
this.pathStr = 'M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z';
|
|
20113
20106
|
}
|
|
20114
20107
|
draw(ctx, size, transX, transY) {
|
|
20115
|
-
const r =
|
|
20108
|
+
const r = size / 2;
|
|
20116
20109
|
return arrow(ctx, r, transX, transY);
|
|
20117
20110
|
}
|
|
20118
20111
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20119
|
-
const r =
|
|
20112
|
+
const r = size / 2 + offset;
|
|
20120
20113
|
return arrow(ctx, r, transX, transY);
|
|
20121
20114
|
}
|
|
20122
20115
|
}
|
|
@@ -20137,11 +20130,11 @@ class WedgeSymbol extends BaseSymbol {
|
|
|
20137
20130
|
this.pathStr = 'M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z';
|
|
20138
20131
|
}
|
|
20139
20132
|
draw(ctx, size, transX, transY) {
|
|
20140
|
-
const r =
|
|
20133
|
+
const r = size / 2;
|
|
20141
20134
|
return wedge(ctx, r, transX, transY);
|
|
20142
20135
|
}
|
|
20143
20136
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20144
|
-
const r =
|
|
20137
|
+
const r = size / 2 + offset;
|
|
20145
20138
|
return wedge(ctx, r, transX, transY);
|
|
20146
20139
|
}
|
|
20147
20140
|
}
|
|
@@ -20159,11 +20152,11 @@ class StrokeSymbol extends BaseSymbol {
|
|
|
20159
20152
|
this.pathStr = '';
|
|
20160
20153
|
}
|
|
20161
20154
|
draw(ctx, size, transX, transY) {
|
|
20162
|
-
const r =
|
|
20155
|
+
const r = size / 2;
|
|
20163
20156
|
return stroke(ctx, r, transX, transY);
|
|
20164
20157
|
}
|
|
20165
20158
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20166
|
-
const r =
|
|
20159
|
+
const r = size / 2 + offset;
|
|
20167
20160
|
return stroke(ctx, r, transX, transY);
|
|
20168
20161
|
}
|
|
20169
20162
|
}
|
|
@@ -20198,11 +20191,11 @@ class WyeSymbol extends BaseSymbol {
|
|
|
20198
20191
|
this.pathStr = 'M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z';
|
|
20199
20192
|
}
|
|
20200
20193
|
draw(ctx, size, transX, transY) {
|
|
20201
|
-
const r =
|
|
20194
|
+
const r = size / 2;
|
|
20202
20195
|
return wye(ctx, r, transX, transY);
|
|
20203
20196
|
}
|
|
20204
20197
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20205
|
-
const r =
|
|
20198
|
+
const r = size / 2 + offset;
|
|
20206
20199
|
return wye(ctx, r, transX, transY);
|
|
20207
20200
|
}
|
|
20208
20201
|
}
|
|
@@ -20222,11 +20215,11 @@ class TriangleLeftSymbol extends BaseSymbol {
|
|
|
20222
20215
|
this.pathStr = 'M-0.5,0 L0.5,0.5 L0.5,-0.5 Z';
|
|
20223
20216
|
}
|
|
20224
20217
|
draw(ctx, size, x, y) {
|
|
20225
|
-
const r =
|
|
20218
|
+
const r = size / 2;
|
|
20226
20219
|
return trianglLeftOffset(ctx, r, x, y, 0);
|
|
20227
20220
|
}
|
|
20228
20221
|
drawOffset(ctx, size, x, y, offset) {
|
|
20229
|
-
const r =
|
|
20222
|
+
const r = size / 2;
|
|
20230
20223
|
return trianglLeftOffset(ctx, r, x, y, offset);
|
|
20231
20224
|
}
|
|
20232
20225
|
}
|
|
@@ -20246,11 +20239,11 @@ class TriangleRightSymbol extends BaseSymbol {
|
|
|
20246
20239
|
this.pathStr = 'M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z';
|
|
20247
20240
|
}
|
|
20248
20241
|
draw(ctx, size, x, y) {
|
|
20249
|
-
const r =
|
|
20242
|
+
const r = size / 2;
|
|
20250
20243
|
return trianglRightOffset(ctx, r, x, y);
|
|
20251
20244
|
}
|
|
20252
20245
|
drawOffset(ctx, size, x, y, offset) {
|
|
20253
|
-
const r =
|
|
20246
|
+
const r = size / 2;
|
|
20254
20247
|
return trianglRightOffset(ctx, r, x, y, offset);
|
|
20255
20248
|
}
|
|
20256
20249
|
}
|
|
@@ -20270,11 +20263,11 @@ class TriangleDownSymbol extends BaseSymbol {
|
|
|
20270
20263
|
this.pathStr = 'M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z';
|
|
20271
20264
|
}
|
|
20272
20265
|
draw(ctx, size, x, y) {
|
|
20273
|
-
const r =
|
|
20266
|
+
const r = size / 2;
|
|
20274
20267
|
return trianglDownOffset(ctx, r, x, y);
|
|
20275
20268
|
}
|
|
20276
20269
|
drawOffset(ctx, size, x, y, offset) {
|
|
20277
|
-
const r =
|
|
20270
|
+
const r = size / 2;
|
|
20278
20271
|
return trianglDownOffset(ctx, r, x, y, offset);
|
|
20279
20272
|
}
|
|
20280
20273
|
}
|
|
@@ -20296,11 +20289,11 @@ class ThinTriangleSymbol extends BaseSymbol {
|
|
|
20296
20289
|
this.pathStr = 'M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z';
|
|
20297
20290
|
}
|
|
20298
20291
|
draw(ctx, size, x, y) {
|
|
20299
|
-
const r =
|
|
20292
|
+
const r = size / 2 / sqrt3;
|
|
20300
20293
|
return thinTriangle(ctx, r, x, y);
|
|
20301
20294
|
}
|
|
20302
20295
|
drawOffset(ctx, size, x, y, offset) {
|
|
20303
|
-
const r =
|
|
20296
|
+
const r = size / 2 / sqrt3 + offset;
|
|
20304
20297
|
return thinTriangle(ctx, r, x, y);
|
|
20305
20298
|
}
|
|
20306
20299
|
}
|
|
@@ -20320,11 +20313,11 @@ class Arrow2LeftSymbol extends BaseSymbol {
|
|
|
20320
20313
|
this.pathStr = 'M 0.25 -0.5 L -0.25 0 l 0.25 0.5';
|
|
20321
20314
|
}
|
|
20322
20315
|
draw(ctx, size, transX, transY) {
|
|
20323
|
-
const r =
|
|
20316
|
+
const r = size / 4;
|
|
20324
20317
|
return arrow2Left(ctx, r, transX, transY);
|
|
20325
20318
|
}
|
|
20326
20319
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20327
|
-
const r =
|
|
20320
|
+
const r = size / 4 + offset;
|
|
20328
20321
|
return arrow2Left(ctx, r, transX, transY);
|
|
20329
20322
|
}
|
|
20330
20323
|
}
|
|
@@ -20344,11 +20337,11 @@ class Arrow2RightSymbol extends BaseSymbol {
|
|
|
20344
20337
|
this.pathStr = 'M -0.25 -0.5 l 0.25 0 l -0.25 0.5';
|
|
20345
20338
|
}
|
|
20346
20339
|
draw(ctx, size, transX, transY) {
|
|
20347
|
-
const r =
|
|
20340
|
+
const r = size / 4;
|
|
20348
20341
|
return arrow2Right(ctx, r, transX, transY);
|
|
20349
20342
|
}
|
|
20350
20343
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20351
|
-
const r =
|
|
20344
|
+
const r = size / 4 + offset;
|
|
20352
20345
|
return arrow2Right(ctx, r, transX, transY);
|
|
20353
20346
|
}
|
|
20354
20347
|
}
|
|
@@ -20368,11 +20361,11 @@ class Arrow2UpSymbol extends BaseSymbol {
|
|
|
20368
20361
|
this.pathStr = 'M -0.5 0.25 L 0 -0.25 l 0.5 0.25';
|
|
20369
20362
|
}
|
|
20370
20363
|
draw(ctx, size, transX, transY) {
|
|
20371
|
-
const r =
|
|
20364
|
+
const r = size / 4;
|
|
20372
20365
|
return arrow2Up(ctx, r, transX, transY);
|
|
20373
20366
|
}
|
|
20374
20367
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20375
|
-
const r =
|
|
20368
|
+
const r = size / 4 + offset;
|
|
20376
20369
|
return arrow2Up(ctx, r, transX, transY);
|
|
20377
20370
|
}
|
|
20378
20371
|
}
|
|
@@ -20392,11 +20385,11 @@ class Arrow2DownSymbol extends BaseSymbol {
|
|
|
20392
20385
|
this.pathStr = 'M -0.5 -0.25 L 0 0.25 l 0.5 -0.25';
|
|
20393
20386
|
}
|
|
20394
20387
|
draw(ctx, size, transX, transY) {
|
|
20395
|
-
const r =
|
|
20388
|
+
const r = size / 4;
|
|
20396
20389
|
return arrow2Down(ctx, r, transX, transY);
|
|
20397
20390
|
}
|
|
20398
20391
|
drawOffset(ctx, size, transX, transY, offset) {
|
|
20399
|
-
const r =
|
|
20392
|
+
const r = size / 4 + offset;
|
|
20400
20393
|
return arrow2Down(ctx, r, transX, transY);
|
|
20401
20394
|
}
|
|
20402
20395
|
}
|
|
@@ -20414,15 +20407,15 @@ class LineVSymbol extends BaseSymbol {
|
|
|
20414
20407
|
this.pathStr = 'M0,-0.5L0,0.5';
|
|
20415
20408
|
}
|
|
20416
20409
|
draw(ctx, size, x, y, z) {
|
|
20417
|
-
const r =
|
|
20410
|
+
const r = size / 2;
|
|
20418
20411
|
return lineV(ctx, r, x, y);
|
|
20419
20412
|
}
|
|
20420
20413
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
20421
|
-
const r =
|
|
20414
|
+
const r = size / 2 + offset;
|
|
20422
20415
|
return lineV(ctx, r, x, y);
|
|
20423
20416
|
}
|
|
20424
20417
|
drawToSvgPath(size, x, y, z) {
|
|
20425
|
-
const r =
|
|
20418
|
+
const r = size / 2;
|
|
20426
20419
|
return `M ${x}, ${y - r} L ${x},${y + r}`;
|
|
20427
20420
|
}
|
|
20428
20421
|
}
|
|
@@ -20440,15 +20433,15 @@ class LineHSymbol extends BaseSymbol {
|
|
|
20440
20433
|
this.pathStr = 'M-0.5,0L0.5,0';
|
|
20441
20434
|
}
|
|
20442
20435
|
draw(ctx, size, x, y, z) {
|
|
20443
|
-
const r =
|
|
20436
|
+
const r = size / 2;
|
|
20444
20437
|
return lineH(ctx, r, x, y);
|
|
20445
20438
|
}
|
|
20446
20439
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
20447
|
-
const r =
|
|
20440
|
+
const r = size / 2 + offset;
|
|
20448
20441
|
return lineH(ctx, r, x, y);
|
|
20449
20442
|
}
|
|
20450
20443
|
drawToSvgPath(size, x, y, z) {
|
|
20451
|
-
const r =
|
|
20444
|
+
const r = size / 2;
|
|
20452
20445
|
return `M ${x - r}, ${y} L ${x + r},${y}`;
|
|
20453
20446
|
}
|
|
20454
20447
|
}
|
|
@@ -20468,15 +20461,15 @@ class CloseSymbol extends BaseSymbol {
|
|
|
20468
20461
|
this.pathStr = 'M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5';
|
|
20469
20462
|
}
|
|
20470
20463
|
draw(ctx, size, x, y, z) {
|
|
20471
|
-
const r =
|
|
20464
|
+
const r = size / 2;
|
|
20472
20465
|
return close(ctx, r, x, y);
|
|
20473
20466
|
}
|
|
20474
20467
|
drawOffset(ctx, size, x, y, offset, z) {
|
|
20475
|
-
const r =
|
|
20468
|
+
const r = size / 2 + offset;
|
|
20476
20469
|
return close(ctx, r, x, y);
|
|
20477
20470
|
}
|
|
20478
20471
|
drawToSvgPath(size, x, y, z) {
|
|
20479
|
-
const r =
|
|
20472
|
+
const r = size / 2;
|
|
20480
20473
|
return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
|
|
20481
20474
|
}
|
|
20482
20475
|
}
|
|
@@ -20527,7 +20520,6 @@ class CustomSymbolClass {
|
|
|
20527
20520
|
this.isSvg = isSvg;
|
|
20528
20521
|
}
|
|
20529
20522
|
drawOffset(ctx, size, x, y, offset, z, cb) {
|
|
20530
|
-
size = this.parseSize(size);
|
|
20531
20523
|
if (this.isSvg) {
|
|
20532
20524
|
if (!this.svgCache) {
|
|
20533
20525
|
return false;
|
|
@@ -20543,14 +20535,9 @@ class CustomSymbolClass {
|
|
|
20543
20535
|
return false;
|
|
20544
20536
|
}
|
|
20545
20537
|
draw(ctx, size, x, y, z, cb) {
|
|
20546
|
-
size = this.parseSize(size);
|
|
20547
20538
|
return this.drawOffset(ctx, size, x, y, 0, z, cb);
|
|
20548
20539
|
}
|
|
20549
|
-
parseSize(size) {
|
|
20550
|
-
return isNumber(size) ? size : Math.min(size[0], size[1]);
|
|
20551
|
-
}
|
|
20552
20540
|
bounds(size, bounds) {
|
|
20553
|
-
size = this.parseSize(size);
|
|
20554
20541
|
if (this.isSvg) {
|
|
20555
20542
|
if (!this.svgCache) {
|
|
20556
20543
|
return;
|
|
@@ -21570,8 +21557,7 @@ class Paragraph {
|
|
|
21570
21557
|
left = 0;
|
|
21571
21558
|
baseline = 0;
|
|
21572
21559
|
}
|
|
21573
|
-
|
|
21574
|
-
if (this.character.stroke && lineWidth) {
|
|
21560
|
+
if (this.character.stroke) {
|
|
21575
21561
|
applyStrokeStyle(ctx, this.character);
|
|
21576
21562
|
ctx.strokeText(text, left, baseline);
|
|
21577
21563
|
}
|
|
@@ -24728,7 +24714,6 @@ class Stage extends Group {
|
|
|
24728
24714
|
constructor(params = {}) {
|
|
24729
24715
|
var _a;
|
|
24730
24716
|
super({});
|
|
24731
|
-
this.tickedBeforeRender = true;
|
|
24732
24717
|
this._onVisibleChange = (visible) => {
|
|
24733
24718
|
if (this._skipRender < 0) {
|
|
24734
24719
|
return;
|
|
@@ -24755,15 +24740,6 @@ class Stage extends Group {
|
|
|
24755
24740
|
this._afterRender && this._afterRender(stage);
|
|
24756
24741
|
this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));
|
|
24757
24742
|
this._afterNextRenderCbs = null;
|
|
24758
|
-
this.tickedBeforeRender = false;
|
|
24759
|
-
};
|
|
24760
|
-
this.afterTickCb = () => {
|
|
24761
|
-
var _a;
|
|
24762
|
-
this.tickedBeforeRender = true;
|
|
24763
|
-
if (((_a = this.params.optimize) === null || _a === void 0 ? void 0 : _a.tickRenderMode) === 'performance') ;
|
|
24764
|
-
else {
|
|
24765
|
-
this.state !== 'rendering' && this.render();
|
|
24766
|
-
}
|
|
24767
24743
|
};
|
|
24768
24744
|
this.params = params;
|
|
24769
24745
|
this.theme = new Theme();
|
|
@@ -24831,7 +24807,6 @@ class Stage extends Group {
|
|
|
24831
24807
|
if (params.background && isString(this._background) && this._background.includes('/')) {
|
|
24832
24808
|
this.setAttributes({ background: this._background });
|
|
24833
24809
|
}
|
|
24834
|
-
this.ticker.on('afterTick', this.afterTickCb);
|
|
24835
24810
|
}
|
|
24836
24811
|
pauseRender(sr = -1) {
|
|
24837
24812
|
this._skipRender = sr;
|
|
@@ -25145,9 +25120,6 @@ class Stage extends Group {
|
|
|
25145
25120
|
this.timeline.resume();
|
|
25146
25121
|
const state = this.state;
|
|
25147
25122
|
this.state = 'rendering';
|
|
25148
|
-
if (!this.tickedBeforeRender) {
|
|
25149
|
-
this.ticker.trySyncTickStatus();
|
|
25150
|
-
}
|
|
25151
25123
|
this.layerService.prepareStageLayer(this);
|
|
25152
25124
|
if (!this._skipRender) {
|
|
25153
25125
|
this.lastRenderparams = params;
|
|
@@ -25345,7 +25317,6 @@ class Stage extends Group {
|
|
|
25345
25317
|
}
|
|
25346
25318
|
this.window.release();
|
|
25347
25319
|
this.ticker.remTimeline(this.timeline);
|
|
25348
|
-
this.ticker.removeListener('afterTick', this.afterTickCb);
|
|
25349
25320
|
this.renderService.renderTreeRoots = [];
|
|
25350
25321
|
}
|
|
25351
25322
|
setStage(stage) {
|
|
@@ -25458,6 +25429,25 @@ function createStage(params) {
|
|
|
25458
25429
|
return new Stage(params);
|
|
25459
25430
|
}
|
|
25460
25431
|
|
|
25432
|
+
var params;
|
|
25433
|
+
(function (params) {
|
|
25434
|
+
params[params["W"] = 1] = "W";
|
|
25435
|
+
params[params["H"] = 2] = "H";
|
|
25436
|
+
params[params["WH"] = 3] = "WH";
|
|
25437
|
+
})(params || (params = {}));
|
|
25438
|
+
|
|
25439
|
+
const strCommandMap = [
|
|
25440
|
+
'arc',
|
|
25441
|
+
'arcTo',
|
|
25442
|
+
'bezierCurveTo',
|
|
25443
|
+
'closePath',
|
|
25444
|
+
'ellipse',
|
|
25445
|
+
'lineTo',
|
|
25446
|
+
'moveTo',
|
|
25447
|
+
'quadraticCurveTo',
|
|
25448
|
+
'rect'
|
|
25449
|
+
];
|
|
25450
|
+
|
|
25461
25451
|
const initMatrix = new Matrix(1, 0, 0, 1, 0, 0);
|
|
25462
25452
|
const globalPoint = { x: 0, y: 0 };
|
|
25463
25453
|
let EmptyContext2d = class EmptyContext2d {
|
|
@@ -28729,4 +28719,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
28729
28719
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
28730
28720
|
};
|
|
28731
28721
|
|
|
28732
|
-
export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate,
|
|
28722
|
+
export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawPathProxy, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|