@visactor/vrender 0.19.19 → 0.19.20-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3182,7 +3182,7 @@
3182
3182
  return genCurveSegments(path, points);
3183
3183
  }
3184
3184
 
3185
- function point$2(curveClass, x, y, defined, p) {
3185
+ function point$3(curveClass, x, y, defined, p) {
3186
3186
  curveClass.context.bezierCurveTo((2 * curveClass._x0 + curveClass._x1) / 3, (2 * curveClass._y0 + curveClass._y1) / 3, (curveClass._x0 + 2 * curveClass._x1) / 3, (curveClass._y0 + 2 * curveClass._y1) / 3, (curveClass._x0 + 4 * curveClass._x1 + x) / 6, (curveClass._y0 + 4 * curveClass._y1 + y) / 6, defined, curveClass.lastPoint1);
3187
3187
  }
3188
3188
  class Basis {
@@ -3199,7 +3199,7 @@
3199
3199
  this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0, this.startPoint && this.point(this.startPoint);
3200
3200
  }
3201
3201
  lineEnd() {
3202
- if (2 === this._point) point$2(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3202
+ if (2 === this._point) point$3(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3203
3203
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3204
3204
  }
3205
3205
  point(p) {
@@ -3213,7 +3213,7 @@
3213
3213
  this._point = 2;
3214
3214
  break;
3215
3215
  default:
3216
- point$2(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3216
+ point$3(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3217
3217
  }
3218
3218
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3219
3219
  }
@@ -3251,7 +3251,7 @@
3251
3251
  const h = curveClass._x1 - curveClass._x0;
3252
3252
  return h ? (3 * (curveClass._y1 - curveClass._y0) / h - t) / 2 : t;
3253
3253
  }
3254
- function point$1(curveClass, t0, t1, defined, p) {
3254
+ function point$2(curveClass, t0, t1, defined, p) {
3255
3255
  const x0 = curveClass._x0,
3256
3256
  y0 = curveClass._y0,
3257
3257
  x1 = curveClass._x1,
@@ -3278,7 +3278,7 @@
3278
3278
  this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3279
3279
  break;
3280
3280
  case 3:
3281
- point$1(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3281
+ point$2(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3282
3282
  }
3283
3283
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3284
3284
  }
@@ -3294,10 +3294,10 @@
3294
3294
  this._point = 2;
3295
3295
  break;
3296
3296
  case 2:
3297
- this._point = 3, point$1(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3297
+ this._point = 3, point$2(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3298
3298
  break;
3299
3299
  default:
3300
- point$1(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3300
+ point$2(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3301
3301
  }
3302
3302
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._t0 = t1, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = !1 !== p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3303
3303
  }
@@ -3418,6 +3418,162 @@
3418
3418
  return genCurveSegments(path, points);
3419
3419
  }
3420
3420
 
3421
+ function point$1(curveClass, x, y, defined, p) {
3422
+ let x1 = curveClass._x1,
3423
+ y1 = curveClass._y1,
3424
+ x2 = curveClass._x2,
3425
+ y2 = curveClass._y2;
3426
+ if (curveClass._l01_a > epsilon) {
3427
+ const a = 2 * curveClass._l01_2a + 3 * curveClass._l01_a * curveClass._l12_a + curveClass._l12_2a,
3428
+ n = 3 * curveClass._l01_a * (curveClass._l01_a + curveClass._l12_a);
3429
+ x1 = (x1 * a - curveClass._x0 * curveClass._l12_2a + curveClass._x2 * curveClass._l01_2a) / n, y1 = (y1 * a - curveClass._y0 * curveClass._l12_2a + curveClass._y2 * curveClass._l01_2a) / n;
3430
+ }
3431
+ if (curveClass._l23_a > epsilon) {
3432
+ const b = 2 * curveClass._l23_2a + 3 * curveClass._l23_a * curveClass._l12_a + curveClass._l12_2a,
3433
+ m = 3 * curveClass._l23_a * (curveClass._l23_a + curveClass._l12_a);
3434
+ x2 = (x2 * b + curveClass._x1 * curveClass._l23_2a - x * curveClass._l12_2a) / m, y2 = (y2 * b + curveClass._y1 * curveClass._l23_2a - y * curveClass._l12_2a) / m;
3435
+ }
3436
+ curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
3437
+ }
3438
+ class CatmullRom {
3439
+ constructor(context) {
3440
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3441
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3442
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3443
+ }
3444
+ areaStart() {
3445
+ this._line = 0;
3446
+ }
3447
+ areaEnd() {
3448
+ this._line = NaN;
3449
+ }
3450
+ lineStart() {
3451
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
3452
+ }
3453
+ lineEnd() {
3454
+ switch (this._point) {
3455
+ case 2:
3456
+ this.context.lineTo(this._x2, this._y2, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3457
+ break;
3458
+ case 3:
3459
+ this.point({
3460
+ x: this._x2,
3461
+ y: this._y2
3462
+ });
3463
+ }
3464
+ (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3465
+ }
3466
+ point(p) {
3467
+ const {
3468
+ x: x,
3469
+ y: y
3470
+ } = p;
3471
+ if (this._point) {
3472
+ const x23 = this._x2 - x,
3473
+ y23 = this._y2 - y;
3474
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
3475
+ }
3476
+ switch (this._point) {
3477
+ case 0:
3478
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2) : this.context.moveTo(x, y);
3479
+ break;
3480
+ case 1:
3481
+ this._point = 2;
3482
+ break;
3483
+ case 2:
3484
+ this._point = 3;
3485
+ default:
3486
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3487
+ }
3488
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3489
+ }
3490
+ tryUpdateLength() {
3491
+ return this.context.tryUpdateLength();
3492
+ }
3493
+ }
3494
+ function commonGenCatmullRomSegments(type, cons) {
3495
+ return function (points, alpha) {
3496
+ let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3497
+ const {
3498
+ direction: direction,
3499
+ startPoint: startPoint
3500
+ } = params;
3501
+ if (points.length < 2 - Number(!!startPoint)) return null;
3502
+ if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
3503
+ const segContext = genSegContext(type, direction, points),
3504
+ gatmullRom = new cons(segContext, alpha, startPoint);
3505
+ return genCurveSegments(gatmullRom, points), segContext;
3506
+ };
3507
+ }
3508
+ const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
3509
+
3510
+ class CatmullRomClosed {
3511
+ constructor(context) {
3512
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3513
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3514
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3515
+ }
3516
+ areaStart() {
3517
+ this._line = 0;
3518
+ }
3519
+ areaEnd() {
3520
+ this._line = NaN;
3521
+ }
3522
+ lineStart() {
3523
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
3524
+ }
3525
+ lineEnd() {
3526
+ switch (this._point) {
3527
+ case 1:
3528
+ this.context.moveTo(this._x3, this._y3, this.lastPoint1), this.context.closePath();
3529
+ break;
3530
+ case 2:
3531
+ this.context.lineTo(this._x3, this._y3, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1), this.context.closePath();
3532
+ break;
3533
+ case 3:
3534
+ this.point({
3535
+ x: this._x3,
3536
+ y: this._y3
3537
+ }), this.point({
3538
+ x: this._x4,
3539
+ y: this._y4
3540
+ }), this.point({
3541
+ x: this._x5,
3542
+ y: this._y5
3543
+ });
3544
+ }
3545
+ }
3546
+ point(p) {
3547
+ const {
3548
+ x: x,
3549
+ y: y
3550
+ } = p;
3551
+ if (this._point) {
3552
+ const x23 = this._x2 - x,
3553
+ y23 = this._y2 - y;
3554
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
3555
+ }
3556
+ switch (this._point) {
3557
+ case 0:
3558
+ this._point = 1, this._x3 = x, this._y3 = y;
3559
+ break;
3560
+ case 1:
3561
+ this._point = 2, this.context.moveTo(this._x4 = x, this._y4 = y, p);
3562
+ break;
3563
+ case 2:
3564
+ this._point = 3, this._x5 = x, this._y5 = y;
3565
+ break;
3566
+ default:
3567
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3568
+ }
3569
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3570
+ }
3571
+ tryUpdateLength() {
3572
+ return this.context.tryUpdateLength();
3573
+ }
3574
+ }
3575
+ const genCatmullRomClosedSegments = commonGenCatmullRomSegments("catmullRomClosed", CatmullRomClosed);
3576
+
3421
3577
  class CurveContext {
3422
3578
  constructor(path) {
3423
3579
  this.path = path, this._lastX = this._lastY = this._startX = this._startY = 0;
@@ -3457,6 +3613,7 @@
3457
3613
  }
3458
3614
 
3459
3615
  function calcLineCache$1(points, curveType, params) {
3616
+ var _a, _b;
3460
3617
  switch (curveType) {
3461
3618
  case "linear":
3462
3619
  default:
@@ -3473,6 +3630,10 @@
3473
3630
  return genStepSegments(points, 0, params);
3474
3631
  case "stepAfter":
3475
3632
  return genStepSegments(points, 1, params);
3633
+ case "catmullRom":
3634
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
3635
+ case "catmullRomClosed":
3636
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
3476
3637
  case "linearClosed":
3477
3638
  return genLinearClosedSegments(points, params);
3478
3639
  }
@@ -3913,7 +4074,8 @@
3913
4074
  segments: [],
3914
4075
  curveType: "linear",
3915
4076
  clipRange: 1,
3916
- closePath: !1
4077
+ closePath: !1,
4078
+ curveTension: 1
3917
4079
  });
3918
4080
  const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
3919
4081
  radius: 1,
@@ -3948,7 +4110,8 @@
3948
4110
  curveType: "linear",
3949
4111
  clipRange: 1,
3950
4112
  clipRangeByDimension: "default",
3951
- closePath: !1
4113
+ closePath: !1,
4114
+ curveTension: 1
3952
4115
  });
3953
4116
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
3954
4117
  path: new CustomPath2D(),
@@ -10527,6 +10690,7 @@
10527
10690
  }
10528
10691
  if (outerRadius <= epsilon) context.moveTo(cx, cy);else if (deltaAngle >= pi2 - epsilon) context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle)), context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise), innerRadius > epsilon && (context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle)), context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise));else {
10529
10692
  const cornerRadius = arc.getParsedCornerRadius(),
10693
+ cornerRadiusIsArray = isArray$1(cornerRadius),
10530
10694
  {
10531
10695
  outerDeltaAngle: outerDeltaAngle,
10532
10696
  innerDeltaAngle: innerDeltaAngle,
@@ -10535,10 +10699,10 @@
10535
10699
  innerEndAngle: innerEndAngle,
10536
10700
  innerStartAngle: innerStartAngle
10537
10701
  } = arc.getParsePadAngle(startAngle, endAngle),
10538
- outerCornerRadiusStart = cornerRadius,
10539
- outerCornerRadiusEnd = cornerRadius,
10540
- innerCornerRadiusEnd = cornerRadius,
10541
- innerCornerRadiusStart = cornerRadius,
10702
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
10703
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
10704
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
10705
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
10542
10706
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
10543
10707
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
10544
10708
  let limitedOcr = maxOuterCornerRadius,
@@ -12095,7 +12259,7 @@
12095
12259
  return new Symbol$1(attributes);
12096
12260
  }
12097
12261
 
12098
- const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
12262
+ const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
12099
12263
  let Line$1 = class Line extends Graphic {
12100
12264
  constructor() {
12101
12265
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -13172,7 +13336,7 @@
13172
13336
  return new Path(attributes);
13173
13337
  }
13174
13338
 
13175
- const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
13339
+ const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
13176
13340
  class Area extends Graphic {
13177
13341
  constructor(params) {
13178
13342
  super(params), this.type = "area", this.numberType = AREA_NUMBER_TYPE;
@@ -13282,8 +13446,13 @@
13282
13446
  innerRadius = arcTheme.innerRadius
13283
13447
  } = this.attribute;
13284
13448
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
13285
- const deltaRadius = Math.abs(outerRadius - innerRadius);
13286
- return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
13449
+ const deltaRadius = Math.abs(outerRadius - innerRadius),
13450
+ parseCR = cornerRadius => Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
13451
+ if (isArray$1(cornerRadius)) {
13452
+ const crList = cornerRadius.map(cr => parseCR(cr) || 0);
13453
+ return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
13454
+ }
13455
+ return parseCR(cornerRadius);
13287
13456
  }
13288
13457
  getParsedAngle() {
13289
13458
  const arcTheme = getTheme(this).arc;
@@ -15577,6 +15746,7 @@
15577
15746
  outerRadius = innerRadius, innerRadius = temp;
15578
15747
  }
15579
15748
  const cornerRadius = arc.getParsedCornerRadius(),
15749
+ cornerRadiusIsArray = isArray$1(cornerRadius),
15580
15750
  {
15581
15751
  outerDeltaAngle: outerDeltaAngle,
15582
15752
  innerDeltaAngle: innerDeltaAngle,
@@ -15585,10 +15755,10 @@
15585
15755
  innerEndAngle: innerEndAngle,
15586
15756
  innerStartAngle: innerStartAngle
15587
15757
  } = arc.getParsePadAngle(startAngle, endAngle),
15588
- outerCornerRadiusStart = cornerRadius,
15589
- outerCornerRadiusEnd = cornerRadius,
15590
- innerCornerRadiusEnd = cornerRadius,
15591
- innerCornerRadiusStart = cornerRadius,
15758
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
15759
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
15760
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
15761
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
15592
15762
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
15593
15763
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
15594
15764
  let limitedOcr = maxOuterCornerRadius,
@@ -15979,7 +16149,8 @@
15979
16149
  strokeOpacity = lineAttribute.strokeOpacity,
15980
16150
  segments: segments,
15981
16151
  points: points,
15982
- closePath: closePath
16152
+ closePath: closePath,
16153
+ curveTension = lineAttribute.curveTension
15983
16154
  } = line.attribute;
15984
16155
  if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
15985
16156
  let {
@@ -16013,7 +16184,8 @@
16013
16184
  defined: lastSeg.curves[lastSeg.curves.length - 1].defined
16014
16185
  } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
16015
16186
  const data = calcLineCache$1(seg.points, curveType, {
16016
- startPoint: startPoint
16187
+ startPoint: startPoint,
16188
+ curveTension: curveTension
16017
16189
  });
16018
16190
  return lastSeg = data, data;
16019
16191
  }).filter(item => !!item), "linearClosed" === curveType) {
@@ -16030,7 +16202,9 @@
16030
16202
  }
16031
16203
  } else {
16032
16204
  if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
16033
- line.cache = calcLineCache$1(_points, curveType);
16205
+ line.cache = calcLineCache$1(_points, curveType, {
16206
+ curveTension: curveTension
16207
+ });
16034
16208
  }
16035
16209
  line.clearUpdateShapeTag();
16036
16210
  }
@@ -16201,6 +16375,7 @@
16201
16375
  };
16202
16376
  };
16203
16377
  function calcLineCache(points, curveType, params) {
16378
+ var _a, _b;
16204
16379
  switch (curveType) {
16205
16380
  case "linear":
16206
16381
  default:
@@ -16217,6 +16392,10 @@
16217
16392
  return genStepSegments(points, 0, params);
16218
16393
  case "stepAfter":
16219
16394
  return genStepSegments(points, 1, params);
16395
+ case "catmullRom":
16396
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
16397
+ case "catmullRomClosed":
16398
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
16220
16399
  case "linearClosed":
16221
16400
  return genLinearClosedSegments(points, params);
16222
16401
  }
@@ -16281,7 +16460,8 @@
16281
16460
  stroke = areaAttribute.stroke,
16282
16461
  fillOpacity = areaAttribute.fillOpacity,
16283
16462
  z = areaAttribute.z,
16284
- strokeOpacity = areaAttribute.strokeOpacity
16463
+ strokeOpacity = areaAttribute.strokeOpacity,
16464
+ curveTension = areaAttribute.curveTension
16285
16465
  } = area.attribute,
16286
16466
  data = this.valid(area, areaAttribute, fillCb, strokeCb);
16287
16467
  if (!data) return;
@@ -16312,7 +16492,8 @@
16312
16492
  y: lastTopSeg.endY
16313
16493
  } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
16314
16494
  const data = calcLineCache(seg.points, curveType, {
16315
- startPoint: startPoint
16495
+ startPoint: startPoint,
16496
+ curveTension: curveTension
16316
16497
  });
16317
16498
  return lastTopSeg = data, data;
16318
16499
  }).filter(item => !!item);
@@ -16333,7 +16514,9 @@
16333
16514
  y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
16334
16515
  });
16335
16516
  }
16336
- bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType), bottomCaches.unshift(lastBottomSeg));
16517
+ bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
16518
+ curveTension: curveTension
16519
+ }), bottomCaches.unshift(lastBottomSeg));
16337
16520
  }
16338
16521
  area.cacheArea = bottomCaches.map((item, index) => ({
16339
16522
  top: topCaches[index],
@@ -16348,8 +16531,12 @@
16348
16531
  x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : points[i].x,
16349
16532
  y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : points[i].y
16350
16533
  });
16351
- const topCache = calcLineCache(topPoints, curveType),
16352
- bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType);
16534
+ const topCache = calcLineCache(topPoints, curveType, {
16535
+ curveTension: curveTension
16536
+ }),
16537
+ bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
16538
+ curveTension: curveTension
16539
+ });
16353
16540
  area.cacheArea = {
16354
16541
  top: topCache,
16355
16542
  bottom: bottomCache
@@ -17050,6 +17237,100 @@
17050
17237
  decorator(target, key, paramIndex);
17051
17238
  };
17052
17239
  };
17240
+ exports.DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
17241
+ constructor(groupRenderContribitions) {
17242
+ this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
17243
+ }
17244
+ drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
17245
+ const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
17246
+ {
17247
+ fill = groupAttribute.fill,
17248
+ background: background,
17249
+ stroke = groupAttribute.stroke,
17250
+ opacity = groupAttribute.opacity,
17251
+ width = groupAttribute.width,
17252
+ height = groupAttribute.height,
17253
+ clip = groupAttribute.clip,
17254
+ fillOpacity = groupAttribute.fillOpacity,
17255
+ strokeOpacity = groupAttribute.strokeOpacity,
17256
+ cornerRadius = groupAttribute.cornerRadius,
17257
+ path = groupAttribute.path,
17258
+ lineWidth = groupAttribute.lineWidth,
17259
+ visible = groupAttribute.visible
17260
+ } = group.attribute,
17261
+ fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
17262
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
17263
+ doFill = runFill(fill, background),
17264
+ doStroke = runStroke(stroke, lineWidth);
17265
+ if (!group.valid || !visible) return;
17266
+ if (!clip) {
17267
+ if (!doFill && !doStroke) return;
17268
+ if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
17269
+ }
17270
+ if (path && path.length && drawContext.drawContribution) {
17271
+ const disableFill = context.disableFill,
17272
+ disableStroke = context.disableStroke,
17273
+ disableBeginPath = context.disableBeginPath;
17274
+ context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
17275
+ drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
17276
+ }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
17277
+ } else 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
17278
+ this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
17279
+ const doFillOrStroke = {
17280
+ doFill: doFill,
17281
+ doStroke: doStroke
17282
+ };
17283
+ this._groupRenderContribitions.forEach(c => {
17284
+ c.time === exports.BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
17285
+ }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
17286
+ c.time === exports.BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
17287
+ });
17288
+ }
17289
+ draw(group, renderService, drawContext, params) {
17290
+ const {
17291
+ context: context
17292
+ } = drawContext;
17293
+ if (!context) return;
17294
+ const {
17295
+ clip: clip,
17296
+ baseOpacity = 1
17297
+ } = group.attribute;
17298
+ clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
17299
+ const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
17300
+ lastModelMatrix = context.modelMatrix;
17301
+ if (context.camera) {
17302
+ const nextModelMatrix = mat4Allocate.allocate(),
17303
+ modelMatrix = mat4Allocate.allocate();
17304
+ getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
17305
+ } else context.transformFromMatrix(group.transMatrix, !0);
17306
+ context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
17307
+ const {
17308
+ scrollX = groupAttribute.scrollX,
17309
+ scrollY = groupAttribute.scrollY
17310
+ } = group.attribute;
17311
+ let p;
17312
+ (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
17313
+ clip ? context.restore() : context.highPerformanceRestore();
17314
+ }) : clip ? context.restore() : context.highPerformanceRestore();
17315
+ }
17316
+ };
17317
+ exports.DefaultCanvasGroupRender = __decorate$1s([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(GroupRenderContribution)), __metadata$16("design:paramtypes", [Object])], exports.DefaultCanvasGroupRender);
17318
+
17319
+ var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17320
+ var d,
17321
+ c = arguments.length,
17322
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17323
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17324
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
17325
+ },
17326
+ __metadata$15 = undefined && undefined.__metadata || function (k, v) {
17327
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17328
+ },
17329
+ __param$G = undefined && undefined.__param || function (paramIndex, decorator) {
17330
+ return function (target, key) {
17331
+ decorator(target, key, paramIndex);
17332
+ };
17333
+ };
17053
17334
  const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
17054
17335
  exports.DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
17055
17336
  constructor(imageRenderContribitions) {
@@ -17106,7 +17387,7 @@
17106
17387
  this._draw(image, imageAttribute, !1, drawContext);
17107
17388
  }
17108
17389
  };
17109
- exports.DefaultCanvasImageRender = __decorate$1s([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(ImageRenderContribution)), __metadata$16("design:paramtypes", [Object])], exports.DefaultCanvasImageRender);
17390
+ exports.DefaultCanvasImageRender = __decorate$1r([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(ImageRenderContribution)), __metadata$15("design:paramtypes", [Object])], exports.DefaultCanvasImageRender);
17110
17391
 
17111
17392
  const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
17112
17393
  const ArcRender = Symbol.for("ArcRender");
@@ -17129,14 +17410,14 @@
17129
17410
  const RenderSelector = Symbol.for("RenderSelector");
17130
17411
  const DrawContribution = Symbol.for("DrawContribution");
17131
17412
 
17132
- var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17413
+ var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17133
17414
  var d,
17134
17415
  c = arguments.length,
17135
17416
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17136
17417
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17137
17418
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17138
17419
  },
17139
- __metadata$15 = undefined && undefined.__metadata || function (k, v) {
17420
+ __metadata$14 = undefined && undefined.__metadata || function (k, v) {
17140
17421
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17141
17422
  };
17142
17423
  const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
@@ -17196,7 +17477,7 @@
17196
17477
  return !1;
17197
17478
  }
17198
17479
  };
17199
- exports.CommonDrawItemInterceptorContribution = __decorate$1r([injectable(), __metadata$15("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
17480
+ exports.CommonDrawItemInterceptorContribution = __decorate$1q([injectable(), __metadata$14("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
17200
17481
  class InteractiveDrawItemInterceptorContribution {
17201
17482
  constructor() {
17202
17483
  this.order = 1;
@@ -17328,17 +17609,17 @@
17328
17609
  }
17329
17610
  }
17330
17611
 
17331
- var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17612
+ var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17332
17613
  var d,
17333
17614
  c = arguments.length,
17334
17615
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17335
17616
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17336
17617
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17337
17618
  },
17338
- __metadata$14 = undefined && undefined.__metadata || function (k, v) {
17619
+ __metadata$13 = undefined && undefined.__metadata || function (k, v) {
17339
17620
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17340
17621
  },
17341
- __param$G = undefined && undefined.__param || function (paramIndex, decorator) {
17622
+ __param$F = undefined && undefined.__param || function (paramIndex, decorator) {
17342
17623
  return function (target, key) {
17343
17624
  decorator(target, key, paramIndex);
17344
17625
  };
@@ -17376,7 +17657,7 @@
17376
17657
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
17377
17658
  }
17378
17659
  };
17379
- exports.DefaultRenderService = __decorate$1q([injectable(), __param$G(0, inject(DrawContribution)), __metadata$14("design:paramtypes", [Object])], exports.DefaultRenderService);
17660
+ exports.DefaultRenderService = __decorate$1p([injectable(), __param$F(0, inject(DrawContribution)), __metadata$13("design:paramtypes", [Object])], exports.DefaultRenderService);
17380
17661
 
17381
17662
  var renderModule$1 = new ContainerModule(bind => {
17382
17663
  bind(RenderService).to(exports.DefaultRenderService);
@@ -17387,7 +17668,7 @@
17387
17668
  const BoundsPicker = Symbol.for("BoundsPicker");
17388
17669
  const GlobalPickerService = Symbol.for("GlobalPickerService");
17389
17670
 
17390
- var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17671
+ var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17391
17672
  var d,
17392
17673
  c = arguments.length,
17393
17674
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17420,7 +17701,7 @@
17420
17701
  return context.highPerformanceRestore(), result;
17421
17702
  }
17422
17703
  };
17423
- exports.ShadowRootPickItemInterceptorContribution = __decorate$1p([injectable()], exports.ShadowRootPickItemInterceptorContribution);
17704
+ exports.ShadowRootPickItemInterceptorContribution = __decorate$1o([injectable()], exports.ShadowRootPickItemInterceptorContribution);
17424
17705
  exports.InteractivePickItemInterceptorContribution = class InteractivePickItemInterceptorContribution {
17425
17706
  constructor() {
17426
17707
  this.order = 1;
@@ -17439,7 +17720,7 @@
17439
17720
  return null;
17440
17721
  }
17441
17722
  };
17442
- exports.InteractivePickItemInterceptorContribution = __decorate$1p([injectable()], exports.InteractivePickItemInterceptorContribution);
17723
+ exports.InteractivePickItemInterceptorContribution = __decorate$1o([injectable()], exports.InteractivePickItemInterceptorContribution);
17443
17724
  exports.Canvas3DPickItemInterceptor = class Canvas3DPickItemInterceptor {
17444
17725
  constructor() {
17445
17726
  this.order = 1;
@@ -17499,7 +17780,7 @@
17499
17780
  context.setTransformForCurrent();
17500
17781
  }
17501
17782
  };
17502
- exports.Canvas3DPickItemInterceptor = __decorate$1p([injectable()], exports.Canvas3DPickItemInterceptor);
17783
+ exports.Canvas3DPickItemInterceptor = __decorate$1o([injectable()], exports.Canvas3DPickItemInterceptor);
17503
17784
 
17504
17785
  var pickModule = new ContainerModule((bind, unbind, isBound) => {
17505
17786
  isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(exports.Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.Canvas3DPickItemInterceptor), bind(exports.ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.ShadowRootPickItemInterceptorContribution), bind(exports.InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
@@ -17512,17 +17793,17 @@
17512
17793
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
17513
17794
  const PluginService = Symbol.for("PluginService");
17514
17795
 
17515
- var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17796
+ var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17516
17797
  var d,
17517
17798
  c = arguments.length,
17518
17799
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17519
17800
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17520
17801
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17521
17802
  },
17522
- __metadata$13 = undefined && undefined.__metadata || function (k, v) {
17803
+ __metadata$12 = undefined && undefined.__metadata || function (k, v) {
17523
17804
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17524
17805
  },
17525
- __param$F = undefined && undefined.__param || function (paramIndex, decorator) {
17806
+ __param$E = undefined && undefined.__param || function (paramIndex, decorator) {
17526
17807
  return function (target, key) {
17527
17808
  decorator(target, key, paramIndex);
17528
17809
  };
@@ -17562,7 +17843,7 @@
17562
17843
  }), this.onRegisterPlugin = [];
17563
17844
  }
17564
17845
  };
17565
- DefaultPluginService = __decorate$1o([injectable(), __param$F(0, inject(ContributionProvider)), __param$F(0, named(AutoEnablePlugins)), __metadata$13("design:paramtypes", [Object])], DefaultPluginService);
17846
+ DefaultPluginService = __decorate$1n([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(AutoEnablePlugins)), __metadata$12("design:paramtypes", [Object])], DefaultPluginService);
17566
17847
 
17567
17848
  var pluginModule = new ContainerModule(bind => {
17568
17849
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -17576,14 +17857,14 @@
17576
17857
  bind(TextMeasureContribution).to(exports.DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
17577
17858
  });
17578
17859
 
17579
- var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17860
+ var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17580
17861
  var d,
17581
17862
  c = arguments.length,
17582
17863
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17583
17864
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17584
17865
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17585
17866
  },
17586
- __metadata$12 = undefined && undefined.__metadata || function (k, v) {
17867
+ __metadata$11 = undefined && undefined.__metadata || function (k, v) {
17587
17868
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17588
17869
  };
17589
17870
  let CanvasLayerHandlerContribution = class {
@@ -17653,16 +17934,16 @@
17653
17934
  this.canvas.release();
17654
17935
  }
17655
17936
  };
17656
- CanvasLayerHandlerContribution = __decorate$1n([injectable(), __metadata$12("design:paramtypes", [])], CanvasLayerHandlerContribution);
17937
+ CanvasLayerHandlerContribution = __decorate$1m([injectable(), __metadata$11("design:paramtypes", [])], CanvasLayerHandlerContribution);
17657
17938
 
17658
- var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17939
+ var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17659
17940
  var d,
17660
17941
  c = arguments.length,
17661
17942
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17662
17943
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17663
17944
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17664
17945
  },
17665
- __metadata$11 = undefined && undefined.__metadata || function (k, v) {
17946
+ __metadata$10 = undefined && undefined.__metadata || function (k, v) {
17666
17947
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17667
17948
  };
17668
17949
  let EmptyLayerHandlerContribution = class {
@@ -17697,16 +17978,16 @@
17697
17978
  }
17698
17979
  release() {}
17699
17980
  };
17700
- EmptyLayerHandlerContribution = __decorate$1m([injectable(), __metadata$11("design:paramtypes", [])], EmptyLayerHandlerContribution);
17981
+ EmptyLayerHandlerContribution = __decorate$1l([injectable(), __metadata$10("design:paramtypes", [])], EmptyLayerHandlerContribution);
17701
17982
 
17702
- var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17983
+ var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17703
17984
  var d,
17704
17985
  c = arguments.length,
17705
17986
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17706
17987
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17707
17988
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17708
17989
  },
17709
- __metadata$10 = undefined && undefined.__metadata || function (k, v) {
17990
+ __metadata$$ = undefined && undefined.__metadata || function (k, v) {
17710
17991
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17711
17992
  };
17712
17993
  let OffscreenLayerHandlerContribution = class {
@@ -17769,7 +18050,7 @@
17769
18050
  }
17770
18051
  merge(layerHandlers) {}
17771
18052
  };
17772
- OffscreenLayerHandlerContribution = __decorate$1l([injectable(), __metadata$10("design:paramtypes", [])], OffscreenLayerHandlerContribution);
18053
+ OffscreenLayerHandlerContribution = __decorate$1k([injectable(), __metadata$$("design:paramtypes", [])], OffscreenLayerHandlerContribution);
17773
18054
 
17774
18055
  var layerHandlerModules = new ContainerModule(bind => {
17775
18056
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -17885,17 +18166,17 @@
17885
18166
  return result;
17886
18167
  }
17887
18168
 
17888
- var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18169
+ var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17889
18170
  var d,
17890
18171
  c = arguments.length,
17891
18172
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
17892
18173
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
17893
18174
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17894
18175
  },
17895
- __metadata$$ = undefined && undefined.__metadata || function (k, v) {
18176
+ __metadata$_ = undefined && undefined.__metadata || function (k, v) {
17896
18177
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
17897
18178
  },
17898
- __param$E = undefined && undefined.__param || function (paramIndex, decorator) {
18179
+ __param$D = undefined && undefined.__param || function (paramIndex, decorator) {
17899
18180
  return function (target, key) {
17900
18181
  decorator(target, key, paramIndex);
17901
18182
  };
@@ -18082,101 +18363,7 @@
18082
18363
  }
18083
18364
  afterDraw(renderService, drawParams) {}
18084
18365
  };
18085
- DefaultDrawContribution = __decorate$1k([injectable(), __param$E(0, multiInject(GraphicRender)), __param$E(1, inject(ContributionProvider)), __param$E(1, named(DrawItemInterceptor)), __metadata$$("design:paramtypes", [Array, Object])], DefaultDrawContribution);
18086
-
18087
- var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18088
- var d,
18089
- c = arguments.length,
18090
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
18091
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
18092
- return c > 3 && r && Object.defineProperty(target, key, r), r;
18093
- },
18094
- __metadata$_ = undefined && undefined.__metadata || function (k, v) {
18095
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
18096
- },
18097
- __param$D = undefined && undefined.__param || function (paramIndex, decorator) {
18098
- return function (target, key) {
18099
- decorator(target, key, paramIndex);
18100
- };
18101
- };
18102
- let DefaultCanvasGroupRender = class {
18103
- constructor(groupRenderContribitions) {
18104
- this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
18105
- }
18106
- drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
18107
- const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
18108
- {
18109
- fill = groupAttribute.fill,
18110
- background: background,
18111
- stroke = groupAttribute.stroke,
18112
- opacity = groupAttribute.opacity,
18113
- width = groupAttribute.width,
18114
- height = groupAttribute.height,
18115
- clip = groupAttribute.clip,
18116
- fillOpacity = groupAttribute.fillOpacity,
18117
- strokeOpacity = groupAttribute.strokeOpacity,
18118
- cornerRadius = groupAttribute.cornerRadius,
18119
- path = groupAttribute.path,
18120
- lineWidth = groupAttribute.lineWidth,
18121
- visible = groupAttribute.visible
18122
- } = group.attribute,
18123
- fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
18124
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
18125
- doFill = runFill(fill, background),
18126
- doStroke = runStroke(stroke, lineWidth);
18127
- if (!group.valid || !visible) return;
18128
- if (!clip) {
18129
- if (!doFill && !doStroke) return;
18130
- if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
18131
- }
18132
- if (path && path.length && drawContext.drawContribution) {
18133
- const disableFill = context.disableFill,
18134
- disableStroke = context.disableStroke,
18135
- disableBeginPath = context.disableBeginPath;
18136
- context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
18137
- drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
18138
- }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
18139
- } else 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
18140
- this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
18141
- const doFillOrStroke = {
18142
- doFill: doFill,
18143
- doStroke: doStroke
18144
- };
18145
- this._groupRenderContribitions.forEach(c => {
18146
- c.time === exports.BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
18147
- }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
18148
- c.time === exports.BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
18149
- });
18150
- }
18151
- draw(group, renderService, drawContext, params) {
18152
- const {
18153
- context: context
18154
- } = drawContext;
18155
- if (!context) return;
18156
- const {
18157
- clip: clip,
18158
- baseOpacity = 1
18159
- } = group.attribute;
18160
- clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
18161
- const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
18162
- lastModelMatrix = context.modelMatrix;
18163
- if (context.camera) {
18164
- const nextModelMatrix = mat4Allocate.allocate(),
18165
- modelMatrix = mat4Allocate.allocate();
18166
- getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
18167
- } else context.transformFromMatrix(group.transMatrix, !0);
18168
- context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
18169
- const {
18170
- scrollX = groupAttribute.scrollX,
18171
- scrollY = groupAttribute.scrollY
18172
- } = group.attribute;
18173
- let p;
18174
- (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
18175
- clip ? context.restore() : context.highPerformanceRestore();
18176
- }) : clip ? context.restore() : context.highPerformanceRestore();
18177
- }
18178
- };
18179
- DefaultCanvasGroupRender = __decorate$1j([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(GroupRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasGroupRender);
18366
+ DefaultDrawContribution = __decorate$1j([injectable(), __param$D(0, multiInject(GraphicRender)), __param$D(1, inject(ContributionProvider)), __param$D(1, named(DrawItemInterceptor)), __metadata$_("design:paramtypes", [Array, Object])], DefaultDrawContribution);
18180
18367
 
18181
18368
  var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18182
18369
  var d,
@@ -18420,7 +18607,7 @@
18420
18607
  DefaultIncrementalDrawContribution = __decorate$1g([injectable(), __param$C(0, multiInject(GraphicRender)), __param$C(1, inject(DefaultIncrementalCanvasLineRender)), __param$C(2, inject(DefaultIncrementalCanvasAreaRender)), __param$C(3, inject(ContributionProvider)), __param$C(3, named(DrawItemInterceptor)), __metadata$Z("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
18421
18608
 
18422
18609
  var renderModule = new ContainerModule(bind => {
18423
- bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(exports.DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(exports.CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(exports.CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
18610
+ bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(exports.DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(exports.DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(exports.CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(exports.CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
18424
18611
  });
18425
18612
 
18426
18613
  function load(container) {
@@ -29111,7 +29298,7 @@
29111
29298
 
29112
29299
  const roughModule = _roughModule;
29113
29300
 
29114
- const version = "0.19.19";
29301
+ const version = "0.19.20-alpha.3";
29115
29302
  preLoadAllModule();
29116
29303
  if (isBrowserEnv()) {
29117
29304
  loadBrowserEnv(container);
@@ -29623,7 +29810,7 @@
29623
29810
  exports.pathMathPickModule = pathMathPickModule;
29624
29811
  exports.pathModule = pathModule;
29625
29812
  exports.pathToBezierCurves = pathToBezierCurves;
29626
- exports.point = point$2;
29813
+ exports.point = point$3;
29627
29814
  exports.pointEqual = pointEqual;
29628
29815
  exports.pointInterpolation = pointInterpolation;
29629
29816
  exports.pointInterpolationHighPerformance = pointInterpolationHighPerformance;