@visactor/vrender-core 0.20.22 → 0.20.23

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.
Files changed (34) hide show
  1. package/cjs/common/render-area.d.ts +0 -4
  2. package/cjs/common/render-area.js +16 -76
  3. package/cjs/common/render-area.js.map +1 -1
  4. package/cjs/common/render-curve.d.ts +1 -1
  5. package/cjs/common/render-curve.js.map +1 -1
  6. package/cjs/common/segment/step.js +1 -1
  7. package/cjs/common/segment/step.js.map +1 -1
  8. package/cjs/graphic/line.js +2 -2
  9. package/cjs/graphic/line.js.map +1 -1
  10. package/cjs/interface/graphic.d.ts +1 -1
  11. package/cjs/interface/graphic.js.map +1 -1
  12. package/cjs/render/contributions/render/area-render.d.ts +1 -1
  13. package/cjs/render/contributions/render/area-render.js +16 -36
  14. package/cjs/render/contributions/render/area-render.js.map +1 -1
  15. package/cjs/render/contributions/render/line-render.js +9 -31
  16. package/cjs/render/contributions/render/line-render.js.map +1 -1
  17. package/dist/index.es.js +84 -312
  18. package/es/common/render-area.d.ts +0 -4
  19. package/es/common/render-area.js +16 -76
  20. package/es/common/render-area.js.map +1 -1
  21. package/es/common/render-curve.d.ts +1 -1
  22. package/es/common/render-curve.js.map +1 -1
  23. package/es/common/segment/step.js +1 -1
  24. package/es/common/segment/step.js.map +1 -1
  25. package/es/graphic/line.js +2 -2
  26. package/es/graphic/line.js.map +1 -1
  27. package/es/interface/graphic.d.ts +1 -1
  28. package/es/interface/graphic.js.map +1 -1
  29. package/es/render/contributions/render/area-render.d.ts +1 -1
  30. package/es/render/contributions/render/area-render.js +16 -36
  31. package/es/render/contributions/render/area-render.js.map +1 -1
  32. package/es/render/contributions/render/line-render.js +9 -31
  33. package/es/render/contributions/render/line-render.js.map +1 -1
  34. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -2172,7 +2172,12 @@ let Step$1 = class Step {
2172
2172
  }
2173
2173
  else {
2174
2174
  const x1 = this._x * (1 - this._t) + x * this._t;
2175
- this.context.lineTo(x1, this._y, this._lastDefined !== false && p.defined !== false, this.lastPoint);
2175
+ if (this._t === 0.5) {
2176
+ this.context.lineTo(x1, this._y, this._lastDefined !== false, this.lastPoint);
2177
+ }
2178
+ else {
2179
+ this.context.lineTo(x1, this._y, this._lastDefined !== false && p.defined !== false, this.lastPoint);
2180
+ }
2176
2181
  this.context.lineTo(x1, y, this._lastDefined !== false && p.defined !== false, p);
2177
2182
  }
2178
2183
  break;
@@ -16420,7 +16425,7 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16420
16425
  this._draw(line, lineAttribute, false, drawContext, params);
16421
16426
  }
16422
16427
  drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
16423
- var _a, _b, _c, _d, _e;
16428
+ var _a;
16424
16429
  if (!cache) {
16425
16430
  return;
16426
16431
  }
@@ -16459,60 +16464,6 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16459
16464
  context.stroke();
16460
16465
  }
16461
16466
  }
16462
- let { connectedType, connectedX, connectedY, connectedStyle } = attribute;
16463
- if (isArray(defaultAttribute)) {
16464
- connectedType = (_b = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute[0].connectedType) !== null && _b !== void 0 ? _b : defaultAttribute[1].connectedType;
16465
- connectedX = (_c = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute[0].connectedX) !== null && _c !== void 0 ? _c : defaultAttribute[1].connectedX;
16466
- connectedY = (_d = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute[0].connectedY) !== null && _d !== void 0 ? _d : defaultAttribute[1].connectedY;
16467
- connectedStyle = (_e = connectedStyle !== null && connectedStyle !== void 0 ? connectedStyle : defaultAttribute[0].connectedStyle) !== null && _e !== void 0 ? _e : defaultAttribute[1].connectedStyle;
16468
- }
16469
- else {
16470
- connectedType = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute.connectedType;
16471
- connectedX = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute.connectedX;
16472
- connectedY = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute.connectedY;
16473
- connectedStyle = connectedStyle !== null && connectedStyle !== void 0 ? connectedStyle : defaultAttribute.connectedStyle;
16474
- }
16475
- if (connectedType !== 'connect' && connectedType !== 'zero') {
16476
- connectedType = 'none';
16477
- }
16478
- if (connectedType !== 'none') {
16479
- context.beginPath();
16480
- drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
16481
- offsetX,
16482
- offsetY,
16483
- offsetZ: z,
16484
- drawConnect: true,
16485
- mode: connectedType,
16486
- zeroX: connectedX,
16487
- zeroY: connectedY
16488
- });
16489
- const da = [];
16490
- if (isArray(defaultAttribute)) {
16491
- defaultAttribute.forEach(i => da.push(i));
16492
- }
16493
- else {
16494
- da.push(defaultAttribute);
16495
- }
16496
- da.push(attribute);
16497
- if (fill !== false) {
16498
- if (fillCb) {
16499
- fillCb(context, attribute, defaultAttribute);
16500
- }
16501
- else if (fillOpacity) {
16502
- context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da);
16503
- context.fill();
16504
- }
16505
- }
16506
- if (stroke !== false) {
16507
- if (strokeCb) {
16508
- strokeCb(context, attribute, defaultAttribute);
16509
- }
16510
- else if (strokeOpacity) {
16511
- context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da);
16512
- context.stroke();
16513
- }
16514
- }
16515
- }
16516
16467
  return !!ret;
16517
16468
  }
16518
16469
  drawLinearLineHighPerformance(line, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, lineAttribute, drawContext, params, fillCb, strokeCb) {
@@ -16549,7 +16500,7 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16549
16500
  }
16550
16501
  drawShape(line, context, x, y, drawContext, params, fillCb, strokeCb) {
16551
16502
  const lineAttribute = getTheme(line, params === null || params === void 0 ? void 0 : params.theme).line;
16552
- const { fill = lineAttribute.fill, stroke = lineAttribute.stroke, fillOpacity = lineAttribute.fillOpacity, strokeOpacity = lineAttribute.strokeOpacity, segments, points, closePath, curveTension = lineAttribute.curveTension } = line.attribute;
16503
+ const { fill = lineAttribute.fill, stroke = lineAttribute.stroke, fillOpacity = lineAttribute.fillOpacity, strokeOpacity = lineAttribute.strokeOpacity, segments, points, closePath, curveTension = lineAttribute.curveTension, connectedType = lineAttribute.connectedType } = line.attribute;
16553
16504
  const data = this.valid(line, lineAttribute, fillCb, strokeCb);
16554
16505
  if (!data) {
16555
16506
  return;
@@ -16562,6 +16513,12 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16562
16513
  if (clipRange === 1 && !segments && !points.some(p => p.defined === false) && curveType === 'linear') {
16563
16514
  return this.drawLinearLineHighPerformance(line, context, !!fill, !!stroke, fillOpacity, strokeOpacity, x, y, lineAttribute, drawContext, params, fillCb, strokeCb);
16564
16515
  }
16516
+ function parsePoint(points, connectedType) {
16517
+ if (connectedType === 'none') {
16518
+ return points;
16519
+ }
16520
+ return points.filter(p => p.defined !== false);
16521
+ }
16565
16522
  if (line.shouldUpdateShape()) {
16566
16523
  const { points, segments } = line.attribute;
16567
16524
  const _points = points;
@@ -16593,7 +16550,7 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16593
16550
  startPoint.y = lastSeg.endY;
16594
16551
  startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined;
16595
16552
  }
16596
- const data = calcLineCache(seg.points, curveType, {
16553
+ const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
16597
16554
  startPoint,
16598
16555
  curveTension
16599
16556
  });
@@ -16619,7 +16576,7 @@ let DefaultCanvasLineRender = class DefaultCanvasLineRender extends BaseRender {
16619
16576
  }
16620
16577
  }
16621
16578
  else if (points && points.length) {
16622
- line.cache = calcLineCache(_points, curveType, { curveTension });
16579
+ line.cache = calcLineCache(parsePoint(_points, connectedType), curveType, { curveTension });
16623
16580
  }
16624
16581
  else {
16625
16582
  line.cache = null;
@@ -16671,10 +16628,6 @@ DefaultCanvasLineRender = __decorate([
16671
16628
 
16672
16629
  function drawAreaSegments(path, segPath, percent, params) {
16673
16630
  var _a;
16674
- const { drawConnect = false, mode = 'none' } = params || {};
16675
- if (drawConnect && mode === 'none') {
16676
- return;
16677
- }
16678
16631
  const { top, bottom } = segPath;
16679
16632
  if (top.curves.length !== bottom.curves.length) {
16680
16633
  return;
@@ -16683,90 +16636,28 @@ function drawAreaSegments(path, segPath, percent, params) {
16683
16636
  const topList = [];
16684
16637
  const bottomList = [];
16685
16638
  let lastDefined = true;
16686
- if (drawConnect) {
16687
- let defined0 = true;
16688
- let lastCurve;
16689
- let lastBottomCurve;
16690
- const n = top.curves.length;
16691
- top.curves.forEach((curve, i) => {
16692
- const bototmCurve = bottom.curves[n - i - 1];
16693
- let currentTopCurve = curve;
16694
- let currentBottomCurve = bototmCurve;
16695
- if (curve.originP1 === curve.originP2) {
16696
- lastCurve = curve;
16697
- lastBottomCurve = bototmCurve;
16698
- return;
16699
- }
16700
- if (lastCurve && lastCurve.originP1 === lastCurve.originP2) {
16701
- currentTopCurve = lastCurve;
16702
- currentBottomCurve = lastBottomCurve;
16703
- }
16704
- if (curve.defined) {
16705
- if (!defined0) {
16706
- topList.push(currentTopCurve);
16707
- bottomList.push(currentBottomCurve);
16708
- drawAreaConnectBlock(path, topList, bottomList, params);
16709
- topList.length = 0;
16710
- bottomList.length = 0;
16711
- defined0 = !defined0;
16712
- }
16639
+ for (let i = 0, n = top.curves.length; i < n; i++) {
16640
+ const topCurve = top.curves[i];
16641
+ if (lastDefined !== topCurve.defined) {
16642
+ if (lastDefined) {
16643
+ drawAreaBlock(path, topList, bottomList, params);
16644
+ topList.length = 0;
16645
+ bottomList.length = 0;
16713
16646
  }
16714
16647
  else {
16715
- const { originP1, originP2 } = curve;
16716
- let validTopCurve;
16717
- let validBottomCurve;
16718
- if (originP1 && originP1.defined !== false) {
16719
- validTopCurve = currentTopCurve;
16720
- validBottomCurve = currentBottomCurve;
16721
- }
16722
- else if (originP1 && originP2.defined !== false) {
16723
- validTopCurve = curve;
16724
- validBottomCurve = bototmCurve;
16725
- }
16726
- if (defined0) {
16727
- defined0 = !defined0;
16728
- topList.push(validTopCurve || curve);
16729
- bottomList.push(validBottomCurve || bototmCurve);
16730
- }
16731
- else {
16732
- if (validTopCurve) {
16733
- defined0 = !defined0;
16734
- topList.push(validTopCurve || curve);
16735
- bottomList.push(validBottomCurve || bototmCurve);
16736
- drawAreaConnectBlock(path, topList, bottomList, params);
16737
- topList.length = 0;
16738
- bottomList.length = 0;
16739
- }
16740
- }
16741
- }
16742
- lastCurve = curve;
16743
- });
16744
- drawAreaConnectBlock(path, topList, bottomList, params);
16745
- }
16746
- else {
16747
- for (let i = 0, n = top.curves.length; i < n; i++) {
16748
- const topCurve = top.curves[i];
16749
- if (lastDefined !== topCurve.defined) {
16750
- if (lastDefined) {
16751
- drawAreaBlock(path, topList, bottomList, params);
16752
- topList.length = 0;
16753
- bottomList.length = 0;
16754
- }
16755
- else {
16756
- topList.push(topCurve);
16757
- bottomList.push(bottom.curves[n - i - 1]);
16758
- }
16759
- lastDefined = !lastDefined;
16648
+ topList.push(topCurve);
16649
+ bottomList.push(bottom.curves[n - i - 1]);
16760
16650
  }
16761
- else {
16762
- if (lastDefined) {
16763
- topList.push(topCurve);
16764
- bottomList.push(bottom.curves[n - i - 1]);
16765
- }
16651
+ lastDefined = !lastDefined;
16652
+ }
16653
+ else {
16654
+ if (lastDefined) {
16655
+ topList.push(topCurve);
16656
+ bottomList.push(bottom.curves[n - i - 1]);
16766
16657
  }
16767
16658
  }
16768
- drawAreaBlock(path, topList, bottomList, params);
16769
16659
  }
16660
+ drawAreaBlock(path, topList, bottomList, params);
16770
16661
  return;
16771
16662
  }
16772
16663
  if (percent <= 0) {
@@ -16790,9 +16681,6 @@ function drawAreaSegments(path, segPath, percent, params) {
16790
16681
  let lastDefined = true;
16791
16682
  const topList = [];
16792
16683
  const bottomList = [];
16793
- let defined0 = true;
16794
- let lastTopCurve;
16795
- let lastBottomCurve;
16796
16684
  for (let i = 0, n = top.curves.length; i < n; i++) {
16797
16685
  const topCurve = top.curves[i];
16798
16686
  const curCurveLength = topCurve.getLength(direction);
@@ -16801,127 +16689,50 @@ function drawAreaSegments(path, segPath, percent, params) {
16801
16689
  break;
16802
16690
  }
16803
16691
  drawedLengthUntilLast += curCurveLength;
16804
- if (drawConnect) {
16805
- const bototmCurve = bottom.curves[n - i - 1];
16806
- let currentTopCurve = topCurve;
16807
- let currentBottomCurve = bototmCurve;
16808
- if (topCurve.originP1 === topCurve.originP2) {
16809
- lastTopCurve = topCurve;
16810
- lastBottomCurve = bototmCurve;
16811
- continue;
16812
- }
16813
- if (lastTopCurve && lastTopCurve.originP1 === lastTopCurve.originP2) {
16814
- currentTopCurve = lastTopCurve;
16815
- currentBottomCurve = lastBottomCurve;
16816
- }
16817
- if (topCurve.defined) {
16818
- if (!defined0) {
16819
- topList.push(currentTopCurve);
16820
- bottomList.push(currentBottomCurve);
16821
- drawAreaConnectBlock(path, topList, bottomList, params);
16822
- topList.length = 0;
16823
- bottomList.length = 0;
16824
- defined0 = !defined0;
16825
- }
16692
+ let tc = null;
16693
+ let bc = null;
16694
+ if (lastDefined !== topCurve.defined) {
16695
+ if (lastDefined) {
16696
+ drawAreaBlock(path, topList, bottomList, params);
16697
+ topList.length = 0;
16698
+ bottomList.length = 0;
16826
16699
  }
16827
16700
  else {
16828
- const { originP1, originP2 } = topCurve;
16829
- let validTopCurve;
16830
- let validBottomCurve;
16831
- if (originP1 && originP1.defined !== false) {
16832
- validTopCurve = currentTopCurve;
16833
- validBottomCurve = currentBottomCurve;
16834
- }
16835
- else if (originP1 && originP2.defined !== false) {
16836
- validTopCurve = topCurve;
16837
- validBottomCurve = bototmCurve;
16838
- }
16839
- if (defined0) {
16840
- defined0 = !defined0;
16841
- topList.push(validTopCurve || topCurve);
16842
- bottomList.push(validBottomCurve || bototmCurve);
16843
- }
16844
- else {
16845
- if (validTopCurve) {
16846
- defined0 = !defined0;
16847
- topList.push(validTopCurve || topCurve);
16848
- bottomList.push(validBottomCurve || bototmCurve);
16849
- drawAreaConnectBlock(path, topList, bottomList, params);
16850
- topList.length = 0;
16851
- bottomList.length = 0;
16852
- }
16853
- }
16701
+ tc = topCurve;
16702
+ bc = bottom.curves[n - i - 1];
16854
16703
  }
16855
- lastTopCurve = topCurve;
16704
+ lastDefined = !lastDefined;
16856
16705
  }
16857
16706
  else {
16858
- let tc = null;
16859
- let bc = null;
16860
- if (lastDefined !== topCurve.defined) {
16861
- if (lastDefined) {
16862
- drawAreaBlock(path, topList, bottomList, params);
16863
- topList.length = 0;
16864
- bottomList.length = 0;
16707
+ if (lastDefined) {
16708
+ tc = topCurve;
16709
+ bc = bottom.curves[n - i - 1];
16710
+ }
16711
+ }
16712
+ if (tc && bc) {
16713
+ if (percent < 1) {
16714
+ if (tc.p2 && tc.p3) {
16715
+ tc = divideCubic(tc, percent)[0];
16865
16716
  }
16866
16717
  else {
16867
- tc = topCurve;
16868
- bc = bottom.curves[n - i - 1];
16718
+ tc = divideLinear(tc, percent)[0];
16869
16719
  }
16870
- lastDefined = !lastDefined;
16871
- }
16872
- else {
16873
- if (lastDefined) {
16874
- tc = topCurve;
16875
- bc = bottom.curves[n - i - 1];
16720
+ if (bc.p2 && bc.p3) {
16721
+ bc = divideCubic(bc, 1 - percent)[1];
16876
16722
  }
16877
- }
16878
- if (tc && bc) {
16879
- if (percent < 1) {
16880
- if (tc.p2 && tc.p3) {
16881
- tc = divideCubic(tc, percent)[0];
16882
- }
16883
- else {
16884
- tc = divideLinear(tc, percent)[0];
16885
- }
16886
- if (bc.p2 && bc.p3) {
16887
- bc = divideCubic(bc, 1 - percent)[1];
16888
- }
16889
- else {
16890
- bc = divideLinear(bc, 1 - percent)[1];
16891
- }
16723
+ else {
16724
+ bc = divideLinear(bc, 1 - percent)[1];
16892
16725
  }
16893
- tc.defined = lastDefined;
16894
- bc.defined = lastDefined;
16895
- topList.push(tc);
16896
- bottomList.push(bc);
16897
16726
  }
16898
- tc = null;
16899
- bc = null;
16727
+ tc.defined = lastDefined;
16728
+ bc.defined = lastDefined;
16729
+ topList.push(tc);
16730
+ bottomList.push(bc);
16900
16731
  }
16732
+ tc = null;
16733
+ bc = null;
16901
16734
  }
16902
- if (drawConnect) {
16903
- drawAreaConnectBlock(path, topList, bottomList, params);
16904
- }
16905
- else {
16906
- drawAreaBlock(path, topList, bottomList, params);
16907
- }
16908
- }
16909
- function drawAreaConnectBlock(path, topList, bottomList, params) {
16910
- if (topList.length < 2) {
16911
- return;
16912
- }
16913
- const { offsetX = 0, offsetY = 0, offsetZ = 0, mode } = params || {};
16914
- let curve = topList[0];
16915
- path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ);
16916
- curve = topList[topList.length - 1];
16917
- let end = curve.p3 || curve.p1;
16918
- path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ);
16919
- curve = bottomList[bottomList.length - 1];
16920
- path.lineTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ);
16921
- curve = bottomList[0];
16922
- end = curve.p3 || curve.p1;
16923
- path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ);
16924
- path.closePath();
16735
+ drawAreaBlock(path, topList, bottomList, params);
16925
16736
  }
16926
16737
  function drawAreaBlock(path, topList, bottomList, params) {
16927
16738
  const { offsetX = 0, offsetY = 0, offsetZ = 0 } = params || {};
@@ -17035,7 +16846,7 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17035
16846
  drawShape(area, context, x, y, drawContext, params, fillCb, strokeCb) {
17036
16847
  var _a, _b, _c, _d, _e, _f;
17037
16848
  const areaAttribute = getTheme(area, params === null || params === void 0 ? void 0 : params.theme).area;
17038
- const { fill = areaAttribute.fill, stroke = areaAttribute.stroke, fillOpacity = areaAttribute.fillOpacity, z = areaAttribute.z, strokeOpacity = areaAttribute.strokeOpacity, curveTension = areaAttribute.curveTension } = area.attribute;
16849
+ const { fill = areaAttribute.fill, stroke = areaAttribute.stroke, fillOpacity = areaAttribute.fillOpacity, z = areaAttribute.z, strokeOpacity = areaAttribute.strokeOpacity, curveTension = areaAttribute.curveTension, connectedType = areaAttribute.connectedType } = area.attribute;
17039
16850
  const data = this.valid(area, areaAttribute, fillCb, strokeCb);
17040
16851
  if (!data) {
17041
16852
  return;
@@ -17047,6 +16858,12 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17047
16858
  if (closePath && curveType === 'linear') {
17048
16859
  curveType = 'linearClosed';
17049
16860
  }
16861
+ function parsePoint(points, connectedType) {
16862
+ if (connectedType !== 'connect') {
16863
+ return points;
16864
+ }
16865
+ return points.filter(p => p.defined !== false);
16866
+ }
17050
16867
  if (clipRange === 1 && !segments && !points.some(p => p.defined === false) && curveType === 'linear') {
17051
16868
  return this.drawLinearAreaHighPerformance(area, context, !!fill, doStroke, fillOpacity, strokeOpacity, x, y, areaAttribute, drawContext, params, fillCb, strokeCb);
17052
16869
  }
@@ -17069,7 +16886,7 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17069
16886
  startPoint.x = lastTopSeg.endX;
17070
16887
  startPoint.y = lastTopSeg.endY;
17071
16888
  }
17072
- const data = calcLineCache(seg.points, curveType, {
16889
+ const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
17073
16890
  startPoint,
17074
16891
  curveTension
17075
16892
  });
@@ -17098,7 +16915,7 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17098
16915
  });
17099
16916
  }
17100
16917
  if (bottomPoints.length > 1) {
17101
- lastBottomSeg = calcLineCache(bottomPoints, curveType === 'stepBefore' ? 'stepAfter' : curveType === 'stepAfter' ? 'stepBefore' : curveType, { curveTension });
16918
+ lastBottomSeg = calcLineCache(parsePoint(bottomPoints, connectedType), curveType === 'stepBefore' ? 'stepAfter' : curveType === 'stepAfter' ? 'stepBefore' : curveType, { curveTension });
17102
16919
  bottomCaches.unshift(lastBottomSeg);
17103
16920
  }
17104
16921
  }
@@ -17108,12 +16925,12 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17108
16925
  }));
17109
16926
  }
17110
16927
  else if (points && points.length) {
17111
- const topPoints = points;
16928
+ const topPoints = parsePoint(points, connectedType);
17112
16929
  const bottomPoints = [];
17113
- for (let i = points.length - 1; i >= 0; i--) {
16930
+ for (let i = topPoints.length - 1; i >= 0; i--) {
17114
16931
  bottomPoints.push({
17115
- x: (_e = points[i].x1) !== null && _e !== void 0 ? _e : points[i].x,
17116
- y: (_f = points[i].y1) !== null && _f !== void 0 ? _f : points[i].y
16932
+ x: (_e = points[i].x1) !== null && _e !== void 0 ? _e : topPoints[i].x,
16933
+ y: (_f = points[i].y1) !== null && _f !== void 0 ? _f : topPoints[i].y
17117
16934
  });
17118
16935
  }
17119
16936
  const topCache = calcLineCache(topPoints, curveType, { curveTension });
@@ -17168,17 +16985,9 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17168
16985
  this._draw(area, areaAttribute, false, drawContext, params);
17169
16986
  }
17170
16987
  drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
17171
- let ret = false;
17172
- ret =
17173
- ret ||
17174
- this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, false, fillCb, strokeCb);
17175
- ret =
17176
- ret ||
17177
- this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, true, fillCb, strokeCb);
17178
- return ret;
16988
+ return this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb);
17179
16989
  }
17180
- _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, connect, fillCb, strokeCb) {
17181
- var _a, _b, _c, _d;
16990
+ _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
17182
16991
  if (!(cache &&
17183
16992
  cache.top &&
17184
16993
  cache.bottom &&
@@ -17188,35 +16997,6 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17188
16997
  cache.bottom.curves.length)) {
17189
16998
  return;
17190
16999
  }
17191
- let { connectedType, connectedX, connectedY, connectedStyle } = attribute;
17192
- const da = [];
17193
- if (connect) {
17194
- if (isArray(defaultAttribute)) {
17195
- connectedType = (_a = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute[0].connectedType) !== null && _a !== void 0 ? _a : defaultAttribute[1].connectedType;
17196
- connectedX = (_b = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute[0].connectedX) !== null && _b !== void 0 ? _b : defaultAttribute[1].connectedX;
17197
- connectedY = (_c = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute[0].connectedY) !== null && _c !== void 0 ? _c : defaultAttribute[1].connectedY;
17198
- connectedStyle = (_d = connectedStyle !== null && connectedStyle !== void 0 ? connectedStyle : defaultAttribute[0].connectedStyle) !== null && _d !== void 0 ? _d : defaultAttribute[1].connectedStyle;
17199
- }
17200
- else {
17201
- connectedType = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute.connectedType;
17202
- connectedX = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute.connectedX;
17203
- connectedY = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute.connectedY;
17204
- connectedStyle = connectedStyle !== null && connectedStyle !== void 0 ? connectedStyle : defaultAttribute.connectedStyle;
17205
- }
17206
- if (connectedType !== 'connect' && connectedType !== 'zero') {
17207
- connectedType = 'none';
17208
- }
17209
- if (isArray(defaultAttribute)) {
17210
- defaultAttribute.forEach(i => da.push(i));
17211
- }
17212
- else {
17213
- da.push(defaultAttribute);
17214
- }
17215
- da.push(attribute);
17216
- }
17217
- if (connect && connectedType === 'none') {
17218
- return false;
17219
- }
17220
17000
  context.beginPath();
17221
17001
  const ret = false;
17222
17002
  const { points, segments } = area.attribute;
@@ -17251,11 +17031,7 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17251
17031
  offsetX,
17252
17032
  offsetY,
17253
17033
  offsetZ,
17254
- direction,
17255
- drawConnect: connect,
17256
- mode: connectedType,
17257
- zeroX: connectedX,
17258
- zeroY: connectedY
17034
+ direction
17259
17035
  });
17260
17036
  this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, false, fill, false, defaultAttribute, drawContext, fillCb, null, { attribute });
17261
17037
  context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute);
@@ -17266,7 +17042,7 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17266
17042
  fillCb(context, attribute, defaultAttribute);
17267
17043
  }
17268
17044
  else if (fillOpacity) {
17269
- context.setCommonStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute);
17045
+ context.setCommonStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute);
17270
17046
  context.fill();
17271
17047
  }
17272
17048
  }
@@ -17283,14 +17059,10 @@ let DefaultCanvasAreaRender = class DefaultCanvasAreaRender extends BaseRender {
17283
17059
  drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? 'x' : 'y', {
17284
17060
  offsetX,
17285
17061
  offsetY,
17286
- offsetZ,
17287
- drawConnect: connect,
17288
- mode: connectedType,
17289
- zeroX: connectedX,
17290
- zeroY: connectedY
17062
+ offsetZ
17291
17063
  });
17292
17064
  }
17293
- context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute);
17065
+ context.setStrokeStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute);
17294
17066
  context.stroke();
17295
17067
  }
17296
17068
  }
@@ -20792,7 +20564,7 @@ let Line$1 = class Line extends Graphic {
20792
20564
  const { points = lineTheme.points, connectedType } = attribute;
20793
20565
  const b = aabbBounds;
20794
20566
  points.forEach(p => {
20795
- if (p.defined !== false || connectedType === 'zero' || connectedType === 'connect') {
20567
+ if (p.defined !== false || connectedType === 'connect') {
20796
20568
  b.add(p.x, p.y);
20797
20569
  }
20798
20570
  });
@@ -20803,7 +20575,7 @@ let Line$1 = class Line extends Graphic {
20803
20575
  const b = aabbBounds;
20804
20576
  segments.forEach(s => {
20805
20577
  s.points.forEach(p => {
20806
- if (p.defined !== false || connectedType === 'zero' || connectedType === 'connect') {
20578
+ if (p.defined !== false || connectedType === 'connect') {
20807
20579
  b.add(p.x, p.y);
20808
20580
  }
20809
20581
  });
@@ -4,8 +4,4 @@ export declare function drawAreaSegments(path: IPath2D, segPath: IAreaCacheItem,
4
4
  offsetY?: number;
5
5
  offsetZ?: number;
6
6
  direction?: IDirection;
7
- drawConnect?: boolean;
8
- mode?: 'none' | 'connect' | 'zero';
9
- zeroX?: number;
10
- zeroY?: number;
11
7
  }): void;