@visactor/vrender-core 1.1.5 → 1.1.6
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/common/canvas-utils.d.ts +4 -1
- package/cjs/common/canvas-utils.js +9 -4
- package/cjs/common/canvas-utils.js.map +1 -1
- package/cjs/common/polygon.d.ts +8 -0
- package/cjs/common/polygon.js +107 -3
- package/cjs/common/polygon.js.map +1 -1
- package/cjs/graphic/graphic-service/polygon-outer-border-bounds.d.ts +4 -0
- package/cjs/graphic/graphic-service/polygon-outer-border-bounds.js +36 -0
- package/cjs/graphic/graphic-service/polygon-outer-border-bounds.js.map +1 -0
- package/cjs/graphic/graphic.d.ts +5 -2
- package/cjs/graphic/graphic.js +36 -27
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/polygon.d.ts +2 -0
- package/cjs/graphic/polygon.js +12 -2
- package/cjs/graphic/polygon.js.map +1 -1
- package/cjs/graphic/state/state-transition-orchestrator.d.ts +4 -0
- package/cjs/graphic/state/state-transition-orchestrator.js +11 -5
- package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -1
- package/cjs/graphic/text.js +7 -3
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.d.ts +9 -0
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.js +40 -2
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +5 -5
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/polygon-render.js +1 -1
- package/cjs/render/contributions/render/polygon-render.js.map +1 -1
- package/dist/index.es.js +406 -116
- package/es/common/canvas-utils.d.ts +4 -1
- package/es/common/canvas-utils.js +6 -2
- package/es/common/canvas-utils.js.map +1 -1
- package/es/common/polygon.d.ts +8 -0
- package/es/common/polygon.js +102 -0
- package/es/common/polygon.js.map +1 -1
- package/es/graphic/graphic-service/polygon-outer-border-bounds.d.ts +4 -0
- package/es/graphic/graphic-service/polygon-outer-border-bounds.js +32 -0
- package/es/graphic/graphic-service/polygon-outer-border-bounds.js.map +1 -0
- package/es/graphic/graphic.d.ts +5 -2
- package/es/graphic/graphic.js +36 -27
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/polygon.d.ts +2 -0
- package/es/graphic/polygon.js +14 -2
- package/es/graphic/polygon.js.map +1 -1
- package/es/graphic/state/state-transition-orchestrator.d.ts +4 -0
- package/es/graphic/state/state-transition-orchestrator.js +11 -5
- package/es/graphic/state/state-transition-orchestrator.js.map +1 -1
- package/es/graphic/text.js +7 -3
- package/es/graphic/text.js.map +1 -1
- package/es/render/contributions/render/contributions/polygon-contribution-render.d.ts +9 -0
- package/es/render/contributions/render/contributions/polygon-contribution-render.js +40 -0
- package/es/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +5 -5
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/polygon-render.js +2 -2
- package/es/render/contributions/render/polygon-render.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -7639,9 +7639,9 @@ class GradientParser {
|
|
|
7639
7639
|
}
|
|
7640
7640
|
}
|
|
7641
7641
|
|
|
7642
|
-
function
|
|
7642
|
+
function getScaledStrokeWithMatrix(matrix, width, dpr) {
|
|
7643
7643
|
let strokeWidth = width;
|
|
7644
|
-
const { a, b, c, d } =
|
|
7644
|
+
const { a, b, c, d } = matrix;
|
|
7645
7645
|
const scaleX = Math.sign(a) * Math.sqrt(a * a + b * b);
|
|
7646
7646
|
const scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
|
|
7647
7647
|
if (scaleX + scaleY === 0) {
|
|
@@ -7650,6 +7650,9 @@ function getScaledStroke(context, width, dpr) {
|
|
|
7650
7650
|
strokeWidth = (strokeWidth / Math.abs(scaleX + scaleY)) * 2 * dpr;
|
|
7651
7651
|
return strokeWidth;
|
|
7652
7652
|
}
|
|
7653
|
+
function getScaledStroke(context, width, dpr) {
|
|
7654
|
+
return getScaledStrokeWithMatrix(context.currentMatrix, width, dpr);
|
|
7655
|
+
}
|
|
7653
7656
|
function createColor(context, c, params, offsetX = 0, offsetY = 0) {
|
|
7654
7657
|
var _a, _b, _c, _d;
|
|
7655
7658
|
if (!c || c === true) {
|
|
@@ -9530,7 +9533,7 @@ function normalizeNoAnimateAttrConfig(config) {
|
|
|
9530
9533
|
}
|
|
9531
9534
|
class StateTransitionOrchestrator {
|
|
9532
9535
|
analyzeTransition(targetAttrs, hasAnimation, options = {}) {
|
|
9533
|
-
var _a, _b;
|
|
9536
|
+
var _a, _b, _c, _d;
|
|
9534
9537
|
const plan = {
|
|
9535
9538
|
targetAttrs: Object.assign({}, targetAttrs),
|
|
9536
9539
|
animateAttrs: {},
|
|
@@ -9543,12 +9546,22 @@ class StateTransitionOrchestrator {
|
|
|
9543
9546
|
const isClear = options.isClear === true;
|
|
9544
9547
|
const getDefaultAttribute = options.getDefaultAttribute;
|
|
9545
9548
|
const readDefaultAttribute = getDefaultAttribute;
|
|
9549
|
+
const readStateTransitionDefaultAttribute = ((_c = options.getStateTransitionDefaultAttribute) !== null && _c !== void 0 ? _c : getDefaultAttribute);
|
|
9546
9550
|
const shouldSkipDefaultAttribute = options.shouldSkipDefaultAttribute;
|
|
9547
|
-
const
|
|
9551
|
+
const stateTransitionTargetAttrs = (_d = options.stateTransitionTargetAttrs) !== null && _d !== void 0 ? _d : targetAttrs;
|
|
9552
|
+
const assignTransitionAttr = (key, value, isRemovedStateAttr = false) => {
|
|
9548
9553
|
if (noWorkAnimateAttr[key]) {
|
|
9549
9554
|
plan.noAnimateAttrs[key] = value;
|
|
9550
9555
|
return;
|
|
9551
9556
|
}
|
|
9557
|
+
if (isRemovedStateAttr && value === undefined) {
|
|
9558
|
+
const defaultValue = readStateTransitionDefaultAttribute === null || readStateTransitionDefaultAttribute === void 0 ? void 0 : readStateTransitionDefaultAttribute(key, stateTransitionTargetAttrs);
|
|
9559
|
+
if (defaultValue === undefined && (shouldSkipDefaultAttribute === null || shouldSkipDefaultAttribute === void 0 ? void 0 : shouldSkipDefaultAttribute(key, stateTransitionTargetAttrs))) {
|
|
9560
|
+
return;
|
|
9561
|
+
}
|
|
9562
|
+
plan.animateAttrs[key] = defaultValue;
|
|
9563
|
+
return;
|
|
9564
|
+
}
|
|
9552
9565
|
if (isClear && value === undefined) {
|
|
9553
9566
|
if (shouldSkipDefaultAttribute === null || shouldSkipDefaultAttribute === void 0 ? void 0 : shouldSkipDefaultAttribute(key, targetAttrs)) {
|
|
9554
9567
|
return;
|
|
@@ -9573,7 +9586,7 @@ class StateTransitionOrchestrator {
|
|
|
9573
9586
|
(hasTargetAttr && targetAttrs[key] !== undefined)) {
|
|
9574
9587
|
continue;
|
|
9575
9588
|
}
|
|
9576
|
-
assignTransitionAttr(key, extraAnimateAttrs[key]);
|
|
9589
|
+
assignTransitionAttr(key, extraAnimateAttrs[key], true);
|
|
9577
9590
|
}
|
|
9578
9591
|
}
|
|
9579
9592
|
return plan;
|
|
@@ -9613,9 +9626,11 @@ class StateTransitionOrchestrator {
|
|
|
9613
9626
|
noWorkAnimateAttr: graphic.getNoWorkAnimateAttr(),
|
|
9614
9627
|
isClear: true,
|
|
9615
9628
|
getDefaultAttribute: graphic.getDefaultAttribute.bind(graphic),
|
|
9629
|
+
getStateTransitionDefaultAttribute: options.getStateTransitionDefaultAttribute,
|
|
9616
9630
|
shouldSkipDefaultAttribute: (_a = options.shouldSkipDefaultAttribute) !== null && _a !== void 0 ? _a : graphic.shouldSkipStateTransitionDefaultAttribute.bind(graphic),
|
|
9617
9631
|
animateConfig: options.animateConfig,
|
|
9618
|
-
extraAnimateAttrs: options.extraAnimateAttrs
|
|
9632
|
+
extraAnimateAttrs: options.extraAnimateAttrs,
|
|
9633
|
+
stateTransitionTargetAttrs: options.stateTransitionTargetAttrs
|
|
9619
9634
|
});
|
|
9620
9635
|
return this.applyTransition(graphic, plan, hasAnimation, options);
|
|
9621
9636
|
}
|
|
@@ -10124,35 +10139,33 @@ class GraphicImpl extends Node {
|
|
|
10124
10139
|
return snapshot;
|
|
10125
10140
|
}
|
|
10126
10141
|
buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
|
|
10127
|
-
const extraAttrs = {};
|
|
10128
10142
|
if (!previousResolvedStatePatch) {
|
|
10129
|
-
return
|
|
10143
|
+
return;
|
|
10130
10144
|
}
|
|
10131
10145
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
10132
|
-
const
|
|
10146
|
+
const extraAttrs = {};
|
|
10133
10147
|
Object.keys(previousResolvedStatePatch).forEach(key => {
|
|
10134
10148
|
const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
|
|
10135
10149
|
if (hasTargetAttr && targetStateAttrs[key] !== undefined) {
|
|
10136
10150
|
return;
|
|
10137
10151
|
}
|
|
10138
10152
|
const assignFallbackAttr = (value) => {
|
|
10139
|
-
if (value === undefined && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs)) {
|
|
10140
|
-
return;
|
|
10141
|
-
}
|
|
10142
10153
|
extraAttrs[key] = value === undefined ? value : cloneAttributeValue(value);
|
|
10143
10154
|
};
|
|
10144
10155
|
if (hasTargetAttr) {
|
|
10145
|
-
assignFallbackAttr(
|
|
10156
|
+
assignFallbackAttr(targetStateAttrs[key]);
|
|
10146
10157
|
return;
|
|
10147
10158
|
}
|
|
10148
10159
|
if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
|
|
10149
|
-
|
|
10150
|
-
assignFallbackAttr(snapshotValue === undefined ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
|
|
10160
|
+
assignFallbackAttr(snapshot[key]);
|
|
10151
10161
|
return;
|
|
10152
10162
|
}
|
|
10153
|
-
assignFallbackAttr(
|
|
10163
|
+
assignFallbackAttr(undefined);
|
|
10154
10164
|
});
|
|
10155
|
-
return
|
|
10165
|
+
return {
|
|
10166
|
+
extraAttrs: extraAttrs,
|
|
10167
|
+
stateTransitionTargetAttrs: snapshot
|
|
10168
|
+
};
|
|
10156
10169
|
}
|
|
10157
10170
|
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
10158
10171
|
const delta = new Map();
|
|
@@ -11386,7 +11399,8 @@ class GraphicImpl extends Node {
|
|
|
11386
11399
|
}
|
|
11387
11400
|
if (hasAnimation && animateSameStatePatchChange) {
|
|
11388
11401
|
this._syncFinalAttributeFromStaticTruth();
|
|
11389
|
-
|
|
11402
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
11403
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, false, undefined, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.extraAttrs, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
11390
11404
|
}
|
|
11391
11405
|
else {
|
|
11392
11406
|
this.stopStateAnimates();
|
|
@@ -11405,13 +11419,15 @@ class GraphicImpl extends Node {
|
|
|
11405
11419
|
var _a, _b, _c;
|
|
11406
11420
|
return (_c = (_a = animateConfig !== null && animateConfig !== void 0 ? animateConfig : this.stateAnimateConfig) !== null && _a !== void 0 ? _a : (_b = this.context) === null || _b === void 0 ? void 0 : _b.stateAnimateConfig) !== null && _c !== void 0 ? _c : DefaultStateAnimateConfig;
|
|
11407
11421
|
}
|
|
11408
|
-
applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
|
|
11422
|
+
applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs, stateTransitionTargetAttrs) {
|
|
11409
11423
|
const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : undefined;
|
|
11410
11424
|
const transitionOptions = resolvedAnimateConfig
|
|
11411
11425
|
? {
|
|
11412
11426
|
animateConfig: resolvedAnimateConfig,
|
|
11413
11427
|
extraAnimateAttrs: extraAnimateAttrs,
|
|
11414
|
-
|
|
11428
|
+
getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
|
|
11429
|
+
shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
|
|
11430
|
+
stateTransitionTargetAttrs: stateTransitionTargetAttrs
|
|
11415
11431
|
}
|
|
11416
11432
|
: undefined;
|
|
11417
11433
|
if (isClear) {
|
|
@@ -11422,7 +11438,9 @@ class GraphicImpl extends Node {
|
|
|
11422
11438
|
noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
|
|
11423
11439
|
animateConfig: resolvedAnimateConfig,
|
|
11424
11440
|
extraAnimateAttrs: extraAnimateAttrs,
|
|
11425
|
-
|
|
11441
|
+
getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
|
|
11442
|
+
shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
|
|
11443
|
+
stateTransitionTargetAttrs: stateTransitionTargetAttrs
|
|
11426
11444
|
});
|
|
11427
11445
|
this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
|
|
11428
11446
|
}
|
|
@@ -11478,7 +11496,8 @@ class GraphicImpl extends Node {
|
|
|
11478
11496
|
this.clearSharedStateActiveRegistrations();
|
|
11479
11497
|
if (hasAnimation) {
|
|
11480
11498
|
this._syncFinalAttributeFromStaticTruth();
|
|
11481
|
-
|
|
11499
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
11500
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, true, undefined, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.extraAttrs, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
11482
11501
|
}
|
|
11483
11502
|
else {
|
|
11484
11503
|
this.stopStateAnimates();
|
|
@@ -11561,7 +11580,8 @@ class GraphicImpl extends Node {
|
|
|
11561
11580
|
this.syncSharedStateActiveRegistrations();
|
|
11562
11581
|
if (hasAnimation) {
|
|
11563
11582
|
this._syncFinalAttributeFromStaticTruth();
|
|
11564
|
-
|
|
11583
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
11584
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, false, undefined, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.extraAttrs, removedStateAnimationAttrs === null || removedStateAnimationAttrs === void 0 ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
11565
11585
|
}
|
|
11566
11586
|
else {
|
|
11567
11587
|
this.stopStateAnimates();
|
|
@@ -12730,13 +12750,14 @@ class Text extends Graphic {
|
|
|
12730
12750
|
if (!this.obbText) {
|
|
12731
12751
|
this.obbText = new Text({});
|
|
12732
12752
|
}
|
|
12733
|
-
|
|
12753
|
+
const { dx = 0, dy = 0 } = attribute;
|
|
12754
|
+
this.obbText.setAttributes(Object.assign(Object.assign({}, attribute), { angle: 0, dx: 0, dy: 0 }));
|
|
12734
12755
|
const bounds1 = this.obbText.AABBBounds;
|
|
12735
12756
|
const { x, y } = attribute;
|
|
12736
12757
|
const boundsCenter = { x: (bounds1.x1 + bounds1.x2) / 2, y: (bounds1.y1 + bounds1.y2) / 2 };
|
|
12737
12758
|
const center = rotatePoint(boundsCenter, angle, { x, y });
|
|
12738
12759
|
this._OBBBounds.copy(bounds1);
|
|
12739
|
-
this._OBBBounds.translate(center.x - boundsCenter.x, center.y - boundsCenter.y);
|
|
12760
|
+
this._OBBBounds.translate(center.x - boundsCenter.x + dx, center.y - boundsCenter.y + dy);
|
|
12740
12761
|
this._OBBBounds.angle = angle;
|
|
12741
12762
|
return this._OBBBounds;
|
|
12742
12763
|
}
|
|
@@ -16669,7 +16690,262 @@ function createGroup(attributes) {
|
|
|
16669
16690
|
return new Group(attributes);
|
|
16670
16691
|
}
|
|
16671
16692
|
|
|
16672
|
-
|
|
16693
|
+
function drawPolygon(path, points, x, y) {
|
|
16694
|
+
if (!points || !points.length) {
|
|
16695
|
+
return;
|
|
16696
|
+
}
|
|
16697
|
+
path.moveTo(points[0].x + x, points[0].y + y);
|
|
16698
|
+
for (let i = 1; i < points.length; i++) {
|
|
16699
|
+
path.lineTo(points[i].x + x, points[i].y + y);
|
|
16700
|
+
}
|
|
16701
|
+
}
|
|
16702
|
+
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = true) {
|
|
16703
|
+
var _a;
|
|
16704
|
+
const normalized = normalizePolygonPoints(points, cornerRadius, closePath);
|
|
16705
|
+
if (normalized) {
|
|
16706
|
+
drawRoundedPolygon(path, normalized.points, x, y, normalized.cornerRadius, closePath);
|
|
16707
|
+
return;
|
|
16708
|
+
}
|
|
16709
|
+
if (points.length < 3) {
|
|
16710
|
+
drawPolygon(path, points, x, y);
|
|
16711
|
+
return;
|
|
16712
|
+
}
|
|
16713
|
+
let startI = 0;
|
|
16714
|
+
let endI = points.length - 1;
|
|
16715
|
+
if (!closePath) {
|
|
16716
|
+
startI += 1;
|
|
16717
|
+
endI -= 1;
|
|
16718
|
+
path.moveTo(points[0].x + x, points[0].y + y);
|
|
16719
|
+
}
|
|
16720
|
+
for (let i = startI; i <= endI; i++) {
|
|
16721
|
+
const p1 = points[i === 0 ? endI : (i - 1) % points.length];
|
|
16722
|
+
const angularPoint = points[i % points.length];
|
|
16723
|
+
const p2 = points[(i + 1) % points.length];
|
|
16724
|
+
const dx1 = angularPoint.x - p1.x;
|
|
16725
|
+
const dy1 = angularPoint.y - p1.y;
|
|
16726
|
+
const dx2 = angularPoint.x - p2.x;
|
|
16727
|
+
const dy2 = angularPoint.y - p2.y;
|
|
16728
|
+
const angle = (Math.atan2(dy1, dx1) - Math.atan2(dy2, dx2)) / 2;
|
|
16729
|
+
const tan = Math.abs(Math.tan(angle));
|
|
16730
|
+
let radius = Array.isArray(cornerRadius) ? (_a = cornerRadius[i % points.length]) !== null && _a !== void 0 ? _a : 0 : cornerRadius;
|
|
16731
|
+
let segment = radius / tan;
|
|
16732
|
+
const length1 = getLength(dx1, dy1);
|
|
16733
|
+
const length2 = getLength(dx2, dy2);
|
|
16734
|
+
const length = Math.min(length1, length2);
|
|
16735
|
+
if (segment > length) {
|
|
16736
|
+
segment = length;
|
|
16737
|
+
radius = length * tan;
|
|
16738
|
+
}
|
|
16739
|
+
const p1Cross = getProportionPoint(angularPoint, segment, length1, dx1, dy1);
|
|
16740
|
+
const p2Cross = getProportionPoint(angularPoint, segment, length2, dx2, dy2);
|
|
16741
|
+
const dx = angularPoint.x * 2 - p1Cross.x - p2Cross.x;
|
|
16742
|
+
const dy = angularPoint.y * 2 - p1Cross.y - p2Cross.y;
|
|
16743
|
+
const L = getLength(dx, dy);
|
|
16744
|
+
const d = getLength(segment, radius);
|
|
16745
|
+
const circlePoint = getProportionPoint(angularPoint, d, L, dx, dy);
|
|
16746
|
+
let startAngle = Math.atan2(p1Cross.y - circlePoint.y, p1Cross.x - circlePoint.x);
|
|
16747
|
+
const endAngle = Math.atan2(p2Cross.y - circlePoint.y, p2Cross.x - circlePoint.x);
|
|
16748
|
+
let sweepAngle = endAngle - startAngle;
|
|
16749
|
+
if (sweepAngle < 0) {
|
|
16750
|
+
startAngle = endAngle;
|
|
16751
|
+
sweepAngle = -sweepAngle;
|
|
16752
|
+
}
|
|
16753
|
+
if (sweepAngle > Math.PI) {
|
|
16754
|
+
sweepAngle = sweepAngle - Math.PI;
|
|
16755
|
+
}
|
|
16756
|
+
if (i === 0) {
|
|
16757
|
+
path.moveTo(p1Cross.x + x, p1Cross.y + y);
|
|
16758
|
+
}
|
|
16759
|
+
else {
|
|
16760
|
+
path.lineTo(p1Cross.x + x, p1Cross.y + y);
|
|
16761
|
+
}
|
|
16762
|
+
if (sweepAngle) {
|
|
16763
|
+
path.arcTo(angularPoint.x + x, angularPoint.y + y, p2Cross.x + x, p2Cross.y + y, radius);
|
|
16764
|
+
}
|
|
16765
|
+
path.lineTo(p2Cross.x + x, p2Cross.y + y);
|
|
16766
|
+
}
|
|
16767
|
+
if (!closePath) {
|
|
16768
|
+
path.lineTo(points[endI + 1].x + x, points[endI + 1].y + y);
|
|
16769
|
+
}
|
|
16770
|
+
}
|
|
16771
|
+
function getLength(dx, dy) {
|
|
16772
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
16773
|
+
}
|
|
16774
|
+
function getProportionPoint(point, segment, length, dx, dy) {
|
|
16775
|
+
const factor = segment / length;
|
|
16776
|
+
return {
|
|
16777
|
+
x: point.x - dx * factor,
|
|
16778
|
+
y: point.y - dy * factor
|
|
16779
|
+
};
|
|
16780
|
+
}
|
|
16781
|
+
function normalizePolygonPoints(points, cornerRadius, closePath = true) {
|
|
16782
|
+
var _a;
|
|
16783
|
+
let hasDuplicate = false;
|
|
16784
|
+
for (let i = 1; i < points.length; i++) {
|
|
16785
|
+
if (isSamePoint(points[i - 1], points[i])) {
|
|
16786
|
+
hasDuplicate = true;
|
|
16787
|
+
break;
|
|
16788
|
+
}
|
|
16789
|
+
}
|
|
16790
|
+
if (!hasDuplicate && closePath && points.length > 1 && isSamePoint(points[0], points[points.length - 1])) {
|
|
16791
|
+
hasDuplicate = true;
|
|
16792
|
+
}
|
|
16793
|
+
if (!hasDuplicate) {
|
|
16794
|
+
return null;
|
|
16795
|
+
}
|
|
16796
|
+
const normalizedPoints = [];
|
|
16797
|
+
const normalizedCornerRadius = Array.isArray(cornerRadius) ? [] : null;
|
|
16798
|
+
for (let i = 0; i < points.length; i++) {
|
|
16799
|
+
if (normalizedPoints.length && isSamePoint(normalizedPoints[normalizedPoints.length - 1], points[i])) {
|
|
16800
|
+
continue;
|
|
16801
|
+
}
|
|
16802
|
+
normalizedPoints.push(points[i]);
|
|
16803
|
+
normalizedCornerRadius === null || normalizedCornerRadius === void 0 ? void 0 : normalizedCornerRadius.push((_a = cornerRadius[i]) !== null && _a !== void 0 ? _a : 0);
|
|
16804
|
+
}
|
|
16805
|
+
if (closePath &&
|
|
16806
|
+
normalizedPoints.length > 1 &&
|
|
16807
|
+
isSamePoint(normalizedPoints[0], normalizedPoints[normalizedPoints.length - 1])) {
|
|
16808
|
+
normalizedPoints.pop();
|
|
16809
|
+
normalizedCornerRadius === null || normalizedCornerRadius === void 0 ? void 0 : normalizedCornerRadius.pop();
|
|
16810
|
+
}
|
|
16811
|
+
return {
|
|
16812
|
+
points: normalizedPoints,
|
|
16813
|
+
cornerRadius: normalizedCornerRadius !== null && normalizedCornerRadius !== void 0 ? normalizedCornerRadius : cornerRadius
|
|
16814
|
+
};
|
|
16815
|
+
}
|
|
16816
|
+
function isSamePoint(a, b) {
|
|
16817
|
+
return a.x === b.x && a.y === b.y;
|
|
16818
|
+
}
|
|
16819
|
+
function getPolygonWinding(points) {
|
|
16820
|
+
let signedArea = 0;
|
|
16821
|
+
for (let i = 0; i < points.length; i++) {
|
|
16822
|
+
const current = points[i];
|
|
16823
|
+
const next = points[(i + 1) % points.length];
|
|
16824
|
+
signedArea += current.x * next.y - next.x * current.y;
|
|
16825
|
+
}
|
|
16826
|
+
return signedArea > 0 ? 1 : -1;
|
|
16827
|
+
}
|
|
16828
|
+
function offsetPolygonPoints(points, distance, closePath = true) {
|
|
16829
|
+
var _a;
|
|
16830
|
+
const n = (_a = points === null || points === void 0 ? void 0 : points.length) !== null && _a !== void 0 ? _a : 0;
|
|
16831
|
+
if (n < 2 || (closePath && n < 3) || !distance) {
|
|
16832
|
+
return points;
|
|
16833
|
+
}
|
|
16834
|
+
const sign = getPolygonWinding(points);
|
|
16835
|
+
const edgeCount = closePath ? n : n - 1;
|
|
16836
|
+
const lines = [];
|
|
16837
|
+
for (let i = 0; i < edgeCount; i++) {
|
|
16838
|
+
const cur = points[i];
|
|
16839
|
+
const next = points[(i + 1) % n];
|
|
16840
|
+
const dx = next.x - cur.x;
|
|
16841
|
+
const dy = next.y - cur.y;
|
|
16842
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
16843
|
+
if (!len) {
|
|
16844
|
+
lines.push(null);
|
|
16845
|
+
continue;
|
|
16846
|
+
}
|
|
16847
|
+
const offsetX = (sign * dy * distance) / len;
|
|
16848
|
+
const offsetY = (-sign * dx * distance) / len;
|
|
16849
|
+
lines.push({ x: cur.x + offsetX, y: cur.y + offsetY, dx, dy, len, offsetX, offsetY });
|
|
16850
|
+
}
|
|
16851
|
+
const prevLines = new Array(n);
|
|
16852
|
+
let prevLine = null;
|
|
16853
|
+
if (closePath) {
|
|
16854
|
+
for (let i = edgeCount - 1; i >= 0; i--) {
|
|
16855
|
+
if (lines[i]) {
|
|
16856
|
+
prevLine = lines[i];
|
|
16857
|
+
break;
|
|
16858
|
+
}
|
|
16859
|
+
}
|
|
16860
|
+
}
|
|
16861
|
+
for (let i = 0; i < n; i++) {
|
|
16862
|
+
prevLines[i] = prevLine;
|
|
16863
|
+
if (i < edgeCount && lines[i]) {
|
|
16864
|
+
prevLine = lines[i];
|
|
16865
|
+
}
|
|
16866
|
+
}
|
|
16867
|
+
const nextLines = new Array(n);
|
|
16868
|
+
let nextLine = null;
|
|
16869
|
+
if (closePath) {
|
|
16870
|
+
for (let count = 0; count < edgeCount; count++) {
|
|
16871
|
+
const line = lines[(n - 1 + count) % edgeCount];
|
|
16872
|
+
if (line) {
|
|
16873
|
+
nextLine = line;
|
|
16874
|
+
break;
|
|
16875
|
+
}
|
|
16876
|
+
}
|
|
16877
|
+
}
|
|
16878
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
16879
|
+
if (i < edgeCount && lines[i]) {
|
|
16880
|
+
nextLine = lines[i];
|
|
16881
|
+
}
|
|
16882
|
+
nextLines[i] = nextLine;
|
|
16883
|
+
}
|
|
16884
|
+
const offsetPointByLine = (point, line) => ({
|
|
16885
|
+
x: point.x + line.offsetX,
|
|
16886
|
+
y: point.y + line.offsetY
|
|
16887
|
+
});
|
|
16888
|
+
const result = [];
|
|
16889
|
+
for (let i = 0; i < n; i++) {
|
|
16890
|
+
const prev = prevLines[i];
|
|
16891
|
+
const cur = nextLines[i];
|
|
16892
|
+
const line = prev || cur;
|
|
16893
|
+
if (!line) {
|
|
16894
|
+
result.push(points[i]);
|
|
16895
|
+
continue;
|
|
16896
|
+
}
|
|
16897
|
+
if (!prev || !cur) {
|
|
16898
|
+
result.push(offsetPointByLine(points[i], line));
|
|
16899
|
+
continue;
|
|
16900
|
+
}
|
|
16901
|
+
const denominator = prev.dx * cur.dy - prev.dy * cur.dx;
|
|
16902
|
+
if (Math.abs(denominator) <= 1e-12 * prev.len * cur.len) {
|
|
16903
|
+
result.push(offsetPointByLine(points[i], cur));
|
|
16904
|
+
continue;
|
|
16905
|
+
}
|
|
16906
|
+
const t = ((cur.x - prev.x) * cur.dy - (cur.y - prev.y) * cur.dx) / denominator;
|
|
16907
|
+
const point = { x: prev.x + prev.dx * t, y: prev.y + prev.dy * t };
|
|
16908
|
+
result.push(Number.isFinite(point.x) && Number.isFinite(point.y) ? point : offsetPointByLine(points[i], cur));
|
|
16909
|
+
}
|
|
16910
|
+
return result;
|
|
16911
|
+
}
|
|
16912
|
+
|
|
16913
|
+
const getBoundsScaleMatrix = (polygon) => {
|
|
16914
|
+
var _a;
|
|
16915
|
+
const globalMatrix = polygon.globalTransMatrix;
|
|
16916
|
+
const viewBoxMatrix = (_a = polygon.stage) === null || _a === void 0 ? void 0 : _a.window.getViewBoxTransform();
|
|
16917
|
+
if (!viewBoxMatrix) {
|
|
16918
|
+
return globalMatrix;
|
|
16919
|
+
}
|
|
16920
|
+
return {
|
|
16921
|
+
a: viewBoxMatrix.a * globalMatrix.a + viewBoxMatrix.c * globalMatrix.b,
|
|
16922
|
+
b: viewBoxMatrix.b * globalMatrix.a + viewBoxMatrix.d * globalMatrix.b,
|
|
16923
|
+
c: viewBoxMatrix.a * globalMatrix.c + viewBoxMatrix.c * globalMatrix.d,
|
|
16924
|
+
d: viewBoxMatrix.b * globalMatrix.c + viewBoxMatrix.d * globalMatrix.d
|
|
16925
|
+
};
|
|
16926
|
+
};
|
|
16927
|
+
const getPolygonBoundsScale = (polygon) => getScaledStrokeWithMatrix(getBoundsScaleMatrix(polygon), 1, 1);
|
|
16928
|
+
const updateBoundsOfPolygonOuterBorder = (attribute, polygonTheme, aabbBounds, polygon) => {
|
|
16929
|
+
const { outerBorder, points = polygonTheme.points, closePath = polygonTheme.closePath, shadowBlur = polygonTheme.shadowBlur, keepStrokeScale = polygonTheme.keepStrokeScale } = attribute;
|
|
16930
|
+
if (outerBorder && outerBorder.visible !== false) {
|
|
16931
|
+
const defaultOuterBorder = polygonTheme.outerBorder;
|
|
16932
|
+
const { distance = defaultOuterBorder.distance, lineWidth = defaultOuterBorder.lineWidth, lineJoin = defaultOuterBorder.lineJoin, strokeBoundsBuffer = defaultOuterBorder.strokeBoundsBuffer } = outerBorder;
|
|
16933
|
+
const boundsScale = getPolygonBoundsScale(polygon);
|
|
16934
|
+
let scaledDistance = distance;
|
|
16935
|
+
if (!keepStrokeScale) {
|
|
16936
|
+
scaledDistance *= boundsScale;
|
|
16937
|
+
}
|
|
16938
|
+
offsetPolygonPoints(points, scaledDistance, closePath).forEach(point => {
|
|
16939
|
+
aabbBounds.add(point.x, point.y);
|
|
16940
|
+
});
|
|
16941
|
+
const scaledLineWidth = lineWidth * (keepStrokeScale ? 1 : boundsScale);
|
|
16942
|
+
const scaledShadowBlur = shadowBlur * boundsScale;
|
|
16943
|
+
boundStroke(aabbBounds, (scaledShadowBlur + scaledLineWidth) / 2, lineJoin === 'miter', strokeBoundsBuffer);
|
|
16944
|
+
}
|
|
16945
|
+
return aabbBounds;
|
|
16946
|
+
};
|
|
16947
|
+
|
|
16948
|
+
const POLYGON_UPDATE_TAG_KEY = ['points', 'cornerRadius', 'outerBorder', 'keepStrokeScale', ...GRAPHIC_UPDATE_TAG_KEY];
|
|
16673
16949
|
class Polygon extends Graphic {
|
|
16674
16950
|
constructor(params) {
|
|
16675
16951
|
super(params);
|
|
@@ -16686,6 +16962,20 @@ class Polygon extends Graphic {
|
|
|
16686
16962
|
getGraphicTheme() {
|
|
16687
16963
|
return getTheme(this).polygon;
|
|
16688
16964
|
}
|
|
16965
|
+
tryUpdateAABBBounds() {
|
|
16966
|
+
const { outerBorder } = this.attribute;
|
|
16967
|
+
if (outerBorder && outerBorder.visible !== false) {
|
|
16968
|
+
const boundsScale = getPolygonBoundsScale(this);
|
|
16969
|
+
if (boundsScale !== this._outerBorderBoundsScale) {
|
|
16970
|
+
this._outerBorderBoundsScale = boundsScale;
|
|
16971
|
+
this.addUpdateBoundTag();
|
|
16972
|
+
}
|
|
16973
|
+
}
|
|
16974
|
+
else {
|
|
16975
|
+
this._outerBorderBoundsScale = undefined;
|
|
16976
|
+
}
|
|
16977
|
+
return super.tryUpdateAABBBounds();
|
|
16978
|
+
}
|
|
16689
16979
|
updateAABBBounds(attribute, polygonTheme, aabbBounds) {
|
|
16690
16980
|
if (!this.updatePathProxyAABBBounds(aabbBounds)) {
|
|
16691
16981
|
this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds);
|
|
@@ -16702,6 +16992,7 @@ class Polygon extends Graphic {
|
|
|
16702
16992
|
points.forEach(p => {
|
|
16703
16993
|
aabbBounds.add(p.x, p.y);
|
|
16704
16994
|
});
|
|
16995
|
+
updateBoundsOfPolygonOuterBorder(attribute, polygonTheme, aabbBounds, this);
|
|
16705
16996
|
return aabbBounds;
|
|
16706
16997
|
}
|
|
16707
16998
|
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
@@ -22358,23 +22649,27 @@ class DefaultRectRenderContribution {
|
|
|
22358
22649
|
}
|
|
22359
22650
|
const { cornerRadius = rectAttribute.cornerRadius, cornerType = rectAttribute.cornerType, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY, x1, y1, keepStrokeScale = rectAttribute.keepStrokeScale } = rect.attribute;
|
|
22360
22651
|
let { width, height } = rect.attribute;
|
|
22361
|
-
width = (width !== null && width !== void 0 ? width : x1 -
|
|
22362
|
-
height = (height !== null && height !== void 0 ? height : y1 -
|
|
22652
|
+
width = (width !== null && width !== void 0 ? width : x1 - originX) || 0;
|
|
22653
|
+
height = (height !== null && height !== void 0 ? height : y1 - originY) || 0;
|
|
22654
|
+
const borderX = width < 0 ? x + width : x;
|
|
22655
|
+
const borderY = height < 0 ? y + height : y;
|
|
22656
|
+
const borderWidth = width < 0 ? -width : width;
|
|
22657
|
+
const borderHeight = height < 0 ? -height : height;
|
|
22363
22658
|
const renderBorder = (borderStyle, key) => {
|
|
22364
22659
|
const doStroke = !!(borderStyle && borderStyle.stroke);
|
|
22365
22660
|
const sign = key === 'outerBorder' ? -1 : 1;
|
|
22366
22661
|
const { distance = rectAttribute[key].distance } = borderStyle;
|
|
22367
22662
|
const d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr);
|
|
22368
|
-
const nextX =
|
|
22369
|
-
const nextY =
|
|
22663
|
+
const nextX = borderX + sign * d;
|
|
22664
|
+
const nextY = borderY + sign * d;
|
|
22370
22665
|
const dw = d * 2;
|
|
22371
22666
|
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
22372
22667
|
context.beginPath();
|
|
22373
|
-
context.rect(nextX, nextY,
|
|
22668
|
+
context.rect(nextX, nextY, borderWidth - sign * dw, borderHeight - sign * dw);
|
|
22374
22669
|
}
|
|
22375
22670
|
else {
|
|
22376
22671
|
context.beginPath();
|
|
22377
|
-
createRectPath(context, nextX, nextY,
|
|
22672
|
+
createRectPath(context, nextX, nextY, borderWidth - sign * dw, borderHeight - sign * dw, cornerRadius, cornerType !== 'bevel');
|
|
22378
22673
|
}
|
|
22379
22674
|
context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute);
|
|
22380
22675
|
if (strokeCb) {
|
|
@@ -25848,99 +26143,94 @@ class DefaultCanvasTextRender extends BaseRender {
|
|
|
25848
26143
|
class AbstractGraphicRender {
|
|
25849
26144
|
}
|
|
25850
26145
|
|
|
25851
|
-
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
|
|
25857
|
-
|
|
25858
|
-
}
|
|
25859
|
-
}
|
|
25860
|
-
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = true) {
|
|
25861
|
-
var _a;
|
|
25862
|
-
if (points.length < 3) {
|
|
25863
|
-
drawPolygon(path, points, x, y);
|
|
25864
|
-
return;
|
|
25865
|
-
}
|
|
25866
|
-
let startI = 0;
|
|
25867
|
-
let endI = points.length - 1;
|
|
25868
|
-
if (!closePath) {
|
|
25869
|
-
startI += 1;
|
|
25870
|
-
endI -= 1;
|
|
25871
|
-
path.moveTo(points[0].x + x, points[0].y + y);
|
|
26146
|
+
const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
26147
|
+
const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
26148
|
+
class DefaultPolygonRenderContribution {
|
|
26149
|
+
constructor() {
|
|
26150
|
+
this.time = BaseRenderContributionTime.afterFillStroke;
|
|
26151
|
+
this.useStyle = true;
|
|
26152
|
+
this.order = 0;
|
|
25872
26153
|
}
|
|
25873
|
-
|
|
25874
|
-
const
|
|
25875
|
-
const
|
|
25876
|
-
const
|
|
25877
|
-
|
|
25878
|
-
|
|
25879
|
-
const dx2 = angularPoint.x - p2.x;
|
|
25880
|
-
const dy2 = angularPoint.y - p2.y;
|
|
25881
|
-
const angle = (Math.atan2(dy1, dx1) - Math.atan2(dy2, dx2)) / 2;
|
|
25882
|
-
const tan = Math.abs(Math.tan(angle));
|
|
25883
|
-
let radius = Array.isArray(cornerRadius) ? ((_a = cornerRadius[i % points.length]) !== null && _a !== void 0 ? _a : 0) : cornerRadius;
|
|
25884
|
-
let segment = radius / tan;
|
|
25885
|
-
const length1 = getLength(dx1, dy1);
|
|
25886
|
-
const length2 = getLength(dx2, dy2);
|
|
25887
|
-
const length = Math.min(length1, length2);
|
|
25888
|
-
if (segment > length) {
|
|
25889
|
-
segment = length;
|
|
25890
|
-
radius = length * tan;
|
|
25891
|
-
}
|
|
25892
|
-
const p1Cross = getProportionPoint(angularPoint, segment, length1, dx1, dy1);
|
|
25893
|
-
const p2Cross = getProportionPoint(angularPoint, segment, length2, dx2, dy2);
|
|
25894
|
-
const dx = angularPoint.x * 2 - p1Cross.x - p2Cross.x;
|
|
25895
|
-
const dy = angularPoint.y * 2 - p1Cross.y - p2Cross.y;
|
|
25896
|
-
const L = getLength(dx, dy);
|
|
25897
|
-
const d = getLength(segment, radius);
|
|
25898
|
-
const circlePoint = getProportionPoint(angularPoint, d, L, dx, dy);
|
|
25899
|
-
let startAngle = Math.atan2(p1Cross.y - circlePoint.y, p1Cross.x - circlePoint.x);
|
|
25900
|
-
const endAngle = Math.atan2(p2Cross.y - circlePoint.y, p2Cross.x - circlePoint.x);
|
|
25901
|
-
let sweepAngle = endAngle - startAngle;
|
|
25902
|
-
if (sweepAngle < 0) {
|
|
25903
|
-
startAngle = endAngle;
|
|
25904
|
-
sweepAngle = -sweepAngle;
|
|
25905
|
-
}
|
|
25906
|
-
if (sweepAngle > Math.PI) {
|
|
25907
|
-
sweepAngle = sweepAngle - Math.PI;
|
|
25908
|
-
}
|
|
25909
|
-
if (i === 0) {
|
|
25910
|
-
path.moveTo(p1Cross.x + x, p1Cross.y + y);
|
|
25911
|
-
}
|
|
25912
|
-
else {
|
|
25913
|
-
path.lineTo(p1Cross.x + x, p1Cross.y + y);
|
|
25914
|
-
}
|
|
25915
|
-
if (sweepAngle) {
|
|
25916
|
-
path.arcTo(angularPoint.x + x, angularPoint.y + y, p2Cross.x + x, p2Cross.y + y, radius);
|
|
26154
|
+
drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb) {
|
|
26155
|
+
const { outerBorder, innerBorder } = polygon.attribute;
|
|
26156
|
+
const doOuterBorder = outerBorder && outerBorder.visible !== false;
|
|
26157
|
+
const doInnerBorder = innerBorder && innerBorder.visible !== false;
|
|
26158
|
+
if (!(doOuterBorder || doInnerBorder)) {
|
|
26159
|
+
return;
|
|
25917
26160
|
}
|
|
25918
|
-
|
|
25919
|
-
|
|
25920
|
-
|
|
25921
|
-
|
|
26161
|
+
const { points = polygonAttribute.points, cornerRadius = polygonAttribute.cornerRadius, opacity = polygonAttribute.opacity, x: originX = polygonAttribute.x, y: originY = polygonAttribute.y, scaleX = polygonAttribute.scaleX, scaleY = polygonAttribute.scaleY, keepStrokeScale = polygonAttribute.keepStrokeScale, closePath = polygonAttribute.closePath } = polygon.attribute;
|
|
26162
|
+
const renderBorder = (borderStyle, key) => {
|
|
26163
|
+
var _a, _b;
|
|
26164
|
+
const doBorderStroke = !!borderStyle.stroke;
|
|
26165
|
+
const distanceDirection = key === 'outerBorder' ? 1 : -1;
|
|
26166
|
+
const { distance = polygonAttribute[key].distance } = borderStyle;
|
|
26167
|
+
const borderDistance = distanceDirection *
|
|
26168
|
+
(keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr));
|
|
26169
|
+
const normalized = normalizePolygonPoints(points, cornerRadius, closePath);
|
|
26170
|
+
const normalizedPoints = (_a = normalized === null || normalized === void 0 ? void 0 : normalized.points) !== null && _a !== void 0 ? _a : points;
|
|
26171
|
+
const normalizedCornerRadius = (_b = normalized === null || normalized === void 0 ? void 0 : normalized.cornerRadius) !== null && _b !== void 0 ? _b : cornerRadius;
|
|
26172
|
+
const borderPoints = offsetPolygonPoints(normalizedPoints, borderDistance, closePath);
|
|
26173
|
+
const winding = getPolygonWinding(normalizedPoints);
|
|
26174
|
+
const borderCornerRadius = normalizedPoints.map((point, i) => {
|
|
26175
|
+
var _a;
|
|
26176
|
+
const radius = isArray(normalizedCornerRadius)
|
|
26177
|
+
? (_a = normalizedCornerRadius[i]) !== null && _a !== void 0 ? _a : 0
|
|
26178
|
+
: normalizedCornerRadius || 0;
|
|
26179
|
+
if ((!closePath && (i === 0 || i === normalizedPoints.length - 1)) || normalizedPoints.length < 3) {
|
|
26180
|
+
return radius;
|
|
26181
|
+
}
|
|
26182
|
+
const prev = normalizedPoints[(i - 1 + normalizedPoints.length) % normalizedPoints.length];
|
|
26183
|
+
const next = normalizedPoints[(i + 1) % normalizedPoints.length];
|
|
26184
|
+
const cross = (point.x - prev.x) * (next.y - point.y) - (point.y - prev.y) * (next.x - point.x);
|
|
26185
|
+
const cornerDirection = cross * winding < 0 ? -1 : 1;
|
|
26186
|
+
return Math.max(0, radius + borderDistance * cornerDirection);
|
|
26187
|
+
});
|
|
26188
|
+
const noCorner = borderCornerRadius.length === 0 || borderCornerRadius.every(r => r === 0);
|
|
26189
|
+
context.beginPath();
|
|
26190
|
+
if (noCorner) {
|
|
26191
|
+
drawPolygon(context.camera ? context : context.nativeContext, borderPoints, x, y);
|
|
26192
|
+
}
|
|
26193
|
+
else {
|
|
26194
|
+
drawRoundedPolygon(context.camera ? context : context.nativeContext, borderPoints, x, y, borderCornerRadius, closePath);
|
|
26195
|
+
}
|
|
26196
|
+
closePath && context.closePath();
|
|
26197
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute);
|
|
26198
|
+
if (strokeCb) {
|
|
26199
|
+
strokeCb(context, borderStyle, polygonAttribute[key]);
|
|
26200
|
+
}
|
|
26201
|
+
else if (doBorderStroke) {
|
|
26202
|
+
const lastOpacity = polygonAttribute[key].opacity;
|
|
26203
|
+
const borderStyleWithStrokeScale = borderStyle;
|
|
26204
|
+
const lastKeepStrokeScale = borderStyleWithStrokeScale.keepStrokeScale;
|
|
26205
|
+
polygonAttribute[key].opacity = opacity;
|
|
26206
|
+
borderStyleWithStrokeScale.keepStrokeScale = keepStrokeScale;
|
|
26207
|
+
context.setStrokeStyle(polygon, borderStyleWithStrokeScale, (originX - x) / scaleX, (originY - y) / scaleY, polygonAttribute[key]);
|
|
26208
|
+
polygonAttribute[key].opacity = lastOpacity;
|
|
26209
|
+
if (lastKeepStrokeScale === undefined) {
|
|
26210
|
+
delete borderStyleWithStrokeScale.keepStrokeScale;
|
|
26211
|
+
}
|
|
26212
|
+
else {
|
|
26213
|
+
borderStyleWithStrokeScale.keepStrokeScale = lastKeepStrokeScale;
|
|
26214
|
+
}
|
|
26215
|
+
context.stroke();
|
|
26216
|
+
}
|
|
26217
|
+
};
|
|
26218
|
+
doOuterBorder && renderBorder(outerBorder, 'outerBorder');
|
|
26219
|
+
doInnerBorder && renderBorder(innerBorder, 'innerBorder');
|
|
25922
26220
|
}
|
|
25923
26221
|
}
|
|
25924
|
-
|
|
25925
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
25926
|
-
}
|
|
25927
|
-
function getProportionPoint(point, segment, length, dx, dy) {
|
|
25928
|
-
const factor = segment / length;
|
|
25929
|
-
return {
|
|
25930
|
-
x: point.x - dx * factor,
|
|
25931
|
-
y: point.y - dy * factor
|
|
25932
|
-
};
|
|
25933
|
-
}
|
|
25934
|
-
|
|
25935
|
-
const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
25936
|
-
const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
26222
|
+
const defaultPolygonRenderContribution = new DefaultPolygonRenderContribution();
|
|
25937
26223
|
|
|
25938
26224
|
class DefaultCanvasPolygonRender extends BaseRender {
|
|
25939
26225
|
constructor(graphicRenderContributions) {
|
|
25940
26226
|
super();
|
|
25941
26227
|
this.graphicRenderContributions = graphicRenderContributions;
|
|
25942
26228
|
this.numberType = POLYGON_NUMBER_TYPE;
|
|
25943
|
-
this.builtinContributions = [
|
|
26229
|
+
this.builtinContributions = [
|
|
26230
|
+
defaultPolygonRenderContribution,
|
|
26231
|
+
defaultPolygonBackgroundRenderContribution,
|
|
26232
|
+
defaultPolygonTextureRenderContribution
|
|
26233
|
+
];
|
|
25944
26234
|
this.init(graphicRenderContributions);
|
|
25945
26235
|
}
|
|
25946
26236
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
@@ -30834,4 +31124,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
30834
31124
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
30835
31125
|
};
|
|
30836
31126
|
|
|
30837
|
-
export { APPLICATION_STATE_SYMBOL, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, Base3dRender, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, CONTRIBUTION_STORE_STATE_SYMBOL, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArc3DRender, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasPyramid3dRender, DefaultCanvasRect3dRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FACTORY_STATE_SYMBOL, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_CLASS_SYMBOL, GRAPHIC_REGISTRY_SYMBOL, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RUNTIME_INSTALLER_STATE_SYMBOL, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getApplicationState, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getContributionStoreState, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getFactoryState, getGraphicClassState, getGraphicRegistryState, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getRuntimeInstallerState, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|
|
31127
|
+
export { APPLICATION_STATE_SYMBOL, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, Base3dRender, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, CIRCLE_NUMBER_TYPE, CONTRIBUTION_STORE_STATE_SYMBOL, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Context2dFactory, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArc3DRender, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasPyramid3dRender, DefaultCanvasRect3dRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FACTORY_STATE_SYMBOL, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_CLASS_SYMBOL, GRAPHIC_REGISTRY_SYMBOL, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerFactory, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, PluginRegistry, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RUNTIME_INSTALLER_STATE_SYMBOL, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step, StepClosed, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dRenderModule, bindArcRenderModule, bindAreaRenderModule, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindGlyphRenderModule, bindImageRenderModule, bindLineRenderModule, bindPathRenderModule, bindPolygonRenderModule, bindPyramid3dRenderModule, bindRect3dRenderModule, bindRectRenderModule, bindRichtextRenderModule, bindStarRenderModule, bindSymbolRenderModule, bindTextRenderModule, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, configureRuntimeApplicationForApp, container, cornerTangents, createBrowserApp as createApp, createArc, createArc3d, createArea, createBrowserApp, createCanvasEventTransformer, createCircle, createColor, createConicalGradient, createContributionProvider, createEventTransformer, createGlyph, createGraphic, createGroup, createImage, createLine, createMat4, createMiniappApp, createNodeApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, getApplicationState, getAttributeFromDefaultAttrList, getBackgroundImage, getConicGradientAt, getContributionStoreState, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getFactoryState, getGraphicClassState, getGraphicRegistryState, getLegacyBindingContext, getModelMatrix, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getRuntimeInstallerState, getScaledStroke, getScaledStrokeWithMatrix, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, installRuntimeContributionModule, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNoRepeatSizingMode, isNodeEnv, isSvg, isXML, layerService, lineModule, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlobalEventTransformer, registerGlyphGraphic, registerGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerStarGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapTextGraphic, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldClipImageByLayout, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformMat4, transformPointForCanvas, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|