@wcardinal/wcardinal-ui 0.465.0 → 0.466.0

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 (93) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-stroke-side.d.ts +6 -0
  2. package/dist/types/wcardinal/ui/shape/e-shape-type.d.ts +1 -0
  3. package/dist/types/wcardinal/ui/shape/load/index.d.ts +2 -0
  4. package/dist/types/wcardinal/ui/shape/load/load-shape-rectangle-legacy.d.ts +1 -0
  5. package/dist/types/wcardinal/ui/shape/variant/build-rectangle-legacy.d.ts +10 -0
  6. package/dist/types/wcardinal/ui/shape/variant/build-rectangle.d.ts +1 -10
  7. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-legacy.d.ts +9 -0
  8. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +1 -9
  9. package/dist/types/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.d.ts +4 -0
  10. package/dist/types/wcardinal/ui/shape/variant/create-rectangle-uploaded.d.ts +1 -4
  11. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.d.ts +4 -0
  12. package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.d.ts +2 -2
  13. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.d.ts +7 -0
  14. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.d.ts +2 -2
  15. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.d.ts +85 -0
  16. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.d.ts +3 -0
  17. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle.d.ts +4 -0
  18. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +7 -0
  19. package/dist/wcardinal/ui/shape/e-shape-stroke-side.js +6 -0
  20. package/dist/wcardinal/ui/shape/e-shape-stroke-side.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/e-shape-type.js +1 -0
  22. package/dist/wcardinal/ui/shape/e-shape-type.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/load/index.js +2 -0
  24. package/dist/wcardinal/ui/shape/load/index.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/load/load-shape-all.js +2 -0
  26. package/dist/wcardinal/ui/shape/load/load-shape-all.js.map +1 -1
  27. package/dist/wcardinal/ui/shape/load/load-shape-image.js +2 -2
  28. package/dist/wcardinal/ui/shape/load/load-shape-image.js.map +1 -1
  29. package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js +17 -0
  30. package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js.map +1 -0
  31. package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js +2 -2
  32. package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js.map +1 -1
  33. package/dist/wcardinal/ui/shape/variant/build-polygon.js +1 -1
  34. package/dist/wcardinal/ui/shape/variant/build-polygon.js.map +1 -1
  35. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js +336 -0
  36. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js.map +1 -0
  37. package/dist/wcardinal/ui/shape/variant/build-rectangle.js +5 -338
  38. package/dist/wcardinal/ui/shape/variant/build-rectangle.js.map +1 -1
  39. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +16 -16
  40. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
  41. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +6 -6
  42. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
  43. package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js +77 -0
  44. package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js.map +1 -0
  45. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +6 -6
  46. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
  47. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +1 -72
  48. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
  49. package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js +2 -2
  50. package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +3 -3
  52. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js +24 -0
  54. package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js.map +1 -0
  55. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +4 -4
  56. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +1 -19
  58. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
  59. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js +10 -0
  60. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js.map +1 -0
  61. package/dist/wcardinal/ui/shape/variant/e-shape-circle-triangulated-impl.js +68 -30
  62. package/dist/wcardinal/ui/shape/variant/e-shape-circle-triangulated-impl.js.map +1 -1
  63. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js +2 -2
  64. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js.map +1 -1
  65. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js +27 -0
  66. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js.map +1 -0
  67. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js +2 -2
  68. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js.map +1 -1
  69. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js +796 -0
  70. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js.map +1 -0
  71. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js +6 -0
  72. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js.map +1 -0
  73. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js +14 -1
  74. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js.map +1 -1
  75. package/dist/wcardinal/ui/shape/variant/index.js +7 -0
  76. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  77. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  78. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  79. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  80. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  81. package/dist/wcardinal-ui-theme-dark.js +1 -1
  82. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  83. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  84. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  85. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  86. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  87. package/dist/wcardinal-ui-theme-white.js +1 -1
  88. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  89. package/dist/wcardinal-ui.cjs.js +1035 -131
  90. package/dist/wcardinal-ui.js +1035 -131
  91. package/dist/wcardinal-ui.min.js +2 -2
  92. package/dist/wcardinal-ui.min.js.map +1 -1
  93. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.465.0
2
+ Winter Cardinal UI v0.466.0
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -55,6 +55,7 @@
55
55
  EMBEDDED_ACCEPTOR_EDGE: 25,
56
56
  POLYGON: 26,
57
57
  CIRCLE_LEGACY: 27,
58
+ RECTANGLE_LEGACY: 28,
58
59
  EXTENSION: 1000
59
60
  };
60
61
 
@@ -1466,8 +1467,14 @@
1466
1467
  LEFT: LEFT$1,
1467
1468
  TOP_OR_LEFT: TOP$1 | LEFT$1,
1468
1469
  TOP_OR_RIGHT: TOP$1 | RIGHT$1,
1470
+ TOP_OR_BOTTOM: TOP$1 | BOTTOM$1,
1469
1471
  BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
1470
1472
  BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
1473
+ LEFT_OR_RIGHT: LEFT$1 | RIGHT$1,
1474
+ NOT_TOP: RIGHT$1 | BOTTOM$1 | LEFT$1,
1475
+ NOT_RIGHT: TOP$1 | BOTTOM$1 | LEFT$1,
1476
+ NOT_BOTTOM: TOP$1 | RIGHT$1 | LEFT$1,
1477
+ NOT_LEFT: TOP$1 | RIGHT$1 | BOTTOM$1,
1471
1478
  ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
1472
1479
  };
1473
1480
 
@@ -25467,22 +25474,22 @@
25467
25474
  * Copyright (C) 2019 Toshiba Corporation
25468
25475
  * SPDX-License-Identifier: Apache-2.0
25469
25476
  */
25470
- var EShapeRectangle = /** @class */ (function (_super) {
25471
- __extends(EShapeRectangle, _super);
25472
- function EShapeRectangle(type) {
25473
- if (type === void 0) { type = EShapeType.RECTANGLE; }
25477
+ var EShapeRectangleLegacy = /** @class */ (function (_super) {
25478
+ __extends(EShapeRectangleLegacy, _super);
25479
+ function EShapeRectangleLegacy(type) {
25480
+ if (type === void 0) { type = EShapeType.RECTANGLE_LEGACY; }
25474
25481
  return _super.call(this, type) || this;
25475
25482
  }
25476
- EShapeRectangle.prototype.clone = function () {
25477
- return new EShapeRectangle(this.type).copy(this);
25483
+ EShapeRectangleLegacy.prototype.clone = function () {
25484
+ return new EShapeRectangleLegacy(this.type).copy(this);
25478
25485
  };
25479
- EShapeRectangle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
25486
+ EShapeRectangleLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
25480
25487
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
25481
25488
  return hitTestRectangle(this, x, y, ax, ay, sw, ss);
25482
25489
  }
25483
25490
  return false;
25484
25491
  };
25485
- return EShapeRectangle;
25492
+ return EShapeRectangleLegacy;
25486
25493
  }(EShapePrimitive));
25487
25494
 
25488
25495
  /*
@@ -25502,7 +25509,7 @@
25502
25509
  return result;
25503
25510
  };
25504
25511
  return EShapeRectanglePivoted;
25505
- }(EShapeRectangle));
25512
+ }(EShapeRectangleLegacy));
25506
25513
 
25507
25514
  /*
25508
25515
  * Copyright (C) 2019 Toshiba Corporation
@@ -41983,7 +41990,7 @@
41983
41990
  var buildPolygonStep = function (steps, polygonDistances, polygonLengths, polygonClippings, polygonUvs, polygonBoundary, voffset, vertexCount, fillDirection, fillPercent, strokeWidth, strokeSide, strokeStyle) {
41984
41991
  var scaleInvariant = toScaleInvariant(strokeStyle);
41985
41992
  var dash = toDash(strokeStyle);
41986
- var w = (strokeSide & EShapeStrokeSide.ALL) === EShapeStrokeSide.ALL ? 1 : 0;
41993
+ var w = strokeSide !== EShapeStrokeSide.NONE ? 1 : 0;
41987
41994
  var e = toPackedI4x64(7 + dash, scaleInvariant, w, 0);
41988
41995
  var fp = Math.max(0, Math.min(1, fillPercent));
41989
41996
  switch (fillDirection) {
@@ -42515,11 +42522,12 @@
42515
42522
  var nny = nx * fy * s + ny * c;
42516
42523
  var sx = this.toSkeletonX(ppx, ppy, px, py, nx, ny);
42517
42524
  vertices[0] = 0;
42518
- vertices[1] = scale * sizeY;
42525
+ vertices[1] = sizeY;
42519
42526
  clippings[0] = -1;
42527
+ distances[0] = sx;
42520
42528
  lengths[0] = 0;
42521
42529
  uvs[0] = 0.5;
42522
- uvs[1] = 0.5 * (scale + 1);
42530
+ uvs[1] = 1;
42523
42531
  var iv = 1;
42524
42532
  var ii = 0;
42525
42533
  var length = 0;
@@ -42542,35 +42550,41 @@
42542
42550
  var nlength = length + dl;
42543
42551
  var iv1 = iv++;
42544
42552
  var iv2 = iv1 << 1;
42545
- var snx = scale * nx;
42546
- var sny = scale * ny;
42547
- vertices[iv2 + 0] = snx;
42548
- vertices[iv2 + 1] = sny;
42549
- clippings[iv1] = -1;
42550
- lengths[iv1] = nlength;
42551
- uvs[iv2 + 0] = 0.5 * (snx / sizeX + 1);
42552
- uvs[iv2 + 1] = 0.5 * (sny / sizeY + 1);
42553
42553
  var niv1 = iv++;
42554
42554
  var niv2 = niv1 << 1;
42555
42555
  var ndistance = Math.abs(-dx * py - dy * (nsx - px)) * fl;
42556
+ maxDistance = Math.max(maxDistance, ndistance);
42557
+ vertices[iv2 + 0] = nx;
42558
+ vertices[iv2 + 1] = ny;
42559
+ clippings[iv1] = -1 - ndistance;
42560
+ distances[iv1] = nsx;
42561
+ lengths[iv1] = nlength;
42562
+ uvs[iv2 + 0] = 0.5 * (nx / sizeX + 1);
42563
+ uvs[iv2 + 1] = 0.5 * (ny / sizeY + 1);
42556
42564
  vertices[niv2 + 0] = nsx;
42557
42565
  vertices[niv2 + 1] = 0;
42558
42566
  clippings[niv1] = ndistance;
42559
- maxDistance = Math.max(maxDistance, ndistance);
42567
+ distances[niv1] = 0;
42560
42568
  lengths[niv1] = length + ((nsx - px) * dx - py * dy) * fl;
42561
42569
  uvs[niv2] = 0.5 * (nsx / sizeX + 1);
42562
42570
  uvs[niv2 + 1] = 0.5;
42563
42571
  indices[ii++] = current;
42564
42572
  indices[ii++] = iv1;
42565
42573
  indices[ii++] = niv1;
42566
- if (sx !== nsx) {
42574
+ distances[current] = sx;
42575
+ if (sx === nsx) {
42576
+ clippings[current] = -1 - ndistance;
42577
+ }
42578
+ else {
42579
+ var mdistance = Math.abs(-dx * py - dy * (sx - px)) * fl;
42580
+ maxDistance = Math.max(maxDistance, mdistance);
42581
+ clippings[current] = -1 - mdistance;
42567
42582
  var miv1 = iv++;
42568
42583
  var miv2 = miv1 << 1;
42569
- var mdistance = Math.abs(-dx * py - dy * (sx - px)) * fl;
42570
42584
  vertices[miv2] = sx;
42571
42585
  vertices[miv2 + 1] = 0;
42572
42586
  clippings[miv1] = mdistance;
42573
- maxDistance = Math.max(maxDistance, mdistance);
42587
+ distances[miv1] = 0;
42574
42588
  lengths[miv1] = length + ((sx - px) * dx - py * dy) * fl;
42575
42589
  uvs[miv2] = 0.5 * (sx / sizeX + 1);
42576
42590
  uvs[miv2 + 1] = 0.5;
@@ -42592,15 +42606,27 @@
42592
42606
  if (0 < maxDistance) {
42593
42607
  fdistance = 1 / maxDistance;
42594
42608
  }
42609
+ var shift = (scale - 1) * maxDistance;
42595
42610
  for (var i = 0; i < iv; ++i) {
42596
- distances[i] = fdistance;
42597
42611
  var clipping = clippings[i];
42598
42612
  if (0 <= clipping) {
42599
42613
  clippings[i] = 1 - clipping * fdistance;
42600
42614
  }
42601
42615
  else {
42616
+ var distance = -1 - clipping;
42617
+ if (0 < distance) {
42618
+ var i2 = i << 1;
42619
+ var factor = shift / distance;
42620
+ var x = vertices[i2] + (vertices[i2] - distances[i]) * factor;
42621
+ var y = vertices[i2 + 1] * (1 + factor);
42622
+ vertices[i2] = x;
42623
+ vertices[i2 + 1] = y;
42624
+ uvs[i2] = 0.5 * (x / sizeX + 1);
42625
+ uvs[i2 + 1] = 0.5 * (y / sizeY + 1);
42626
+ }
42602
42627
  clippings[i] = scale;
42603
42628
  }
42629
+ distances[i] = fdistance;
42604
42630
  }
42605
42631
  // The skeleton points of adjacent vertices may coincide on a nearly circular ellipse.
42606
42632
  this.pad(iv, ii, nv, ni, fdistance);
@@ -42645,11 +42671,12 @@
42645
42671
  var nny = s * nx * fy + c * ny;
42646
42672
  var sy = this.toSkeletonY(pppx, pppy, ppx, ppy, px, py);
42647
42673
  vertices[0] = 0;
42648
- vertices[1] = scale * sizeY;
42674
+ vertices[1] = sizeY;
42649
42675
  clippings[0] = -1;
42676
+ distances[0] = sy;
42650
42677
  lengths[0] = 0;
42651
42678
  uvs[0] = 0.5;
42652
- uvs[1] = 0.5 * (scale + 1);
42679
+ uvs[1] = 1;
42653
42680
  var iv = 1;
42654
42681
  var ii = 0;
42655
42682
  var length = 0;
@@ -42672,35 +42699,41 @@
42672
42699
  var nlength = length + dl;
42673
42700
  var iv1 = iv++;
42674
42701
  var iv2 = iv1 << 1;
42675
- var snx = scale * nx;
42676
- var sny = scale * ny;
42677
- vertices[iv2 + 0] = snx;
42678
- vertices[iv2 + 1] = sny;
42679
- clippings[iv1] = -1;
42680
- lengths[iv1] = nlength;
42681
- uvs[iv2 + 0] = 0.5 * (snx / sizeX + 1);
42682
- uvs[iv2 + 1] = 0.5 * (sny / sizeY + 1);
42683
42702
  var niv1 = iv++;
42684
42703
  var niv2 = niv1 << 1;
42685
42704
  var ndistance = Math.abs(dx * (nsy - py) + dy * px) * fl;
42705
+ maxDistance = Math.max(maxDistance, ndistance);
42706
+ vertices[iv2 + 0] = nx;
42707
+ vertices[iv2 + 1] = ny;
42708
+ clippings[iv1] = -1 - ndistance;
42709
+ distances[iv1] = nsy;
42710
+ lengths[iv1] = nlength;
42711
+ uvs[iv2 + 0] = 0.5 * (nx / sizeX + 1);
42712
+ uvs[iv2 + 1] = 0.5 * (ny / sizeY + 1);
42686
42713
  vertices[niv2] = 0;
42687
42714
  vertices[niv2 + 1] = nsy;
42688
42715
  clippings[niv1] = ndistance;
42689
- maxDistance = Math.max(maxDistance, ndistance);
42716
+ distances[niv1] = 0;
42690
42717
  lengths[niv1] = length + (-px * dx + (nsy - py) * dy) * fl;
42691
42718
  uvs[niv2] = 0.5;
42692
42719
  uvs[niv2 + 1] = 0.5 * (nsy / sizeY + 1);
42693
42720
  indices[ii++] = current;
42694
42721
  indices[ii++] = iv1;
42695
42722
  indices[ii++] = niv1;
42696
- if (sy !== nsy) {
42723
+ distances[current] = sy;
42724
+ if (sy === nsy) {
42725
+ clippings[current] = -1 - ndistance;
42726
+ }
42727
+ else {
42728
+ var mdistance = Math.abs(dx * (sy - py) + dy * px) * fl;
42729
+ maxDistance = Math.max(maxDistance, mdistance);
42730
+ clippings[current] = -1 - mdistance;
42697
42731
  var miv1 = iv++;
42698
42732
  var miv2 = miv1 << 1;
42699
- var mdistance = Math.abs(dx * (sy - py) + dy * px) * fl;
42700
42733
  vertices[miv2] = 0;
42701
42734
  vertices[miv2 + 1] = sy;
42702
42735
  clippings[miv1] = mdistance;
42703
- maxDistance = Math.max(maxDistance, mdistance);
42736
+ distances[miv1] = 0;
42704
42737
  lengths[miv1] = length + (-px * dx + (sy - py) * dy) * fl;
42705
42738
  uvs[miv2] = 0.5;
42706
42739
  uvs[miv2 + 1] = 0.5 * (sy / sizeY + 1);
@@ -42722,15 +42755,27 @@
42722
42755
  if (0 < maxDistance) {
42723
42756
  fdistance = 1 / maxDistance;
42724
42757
  }
42758
+ var shift = (scale - 1) * maxDistance;
42725
42759
  for (var i = 0; i < iv; ++i) {
42726
- distances[i] = fdistance;
42727
42760
  var clipping = clippings[i];
42728
42761
  if (0 <= clipping) {
42729
42762
  clippings[i] = 1 - clipping * fdistance;
42730
42763
  }
42731
42764
  else {
42765
+ var distance = -1 - clipping;
42766
+ if (0 < distance) {
42767
+ var i2 = i << 1;
42768
+ var factor = shift / distance;
42769
+ var x = vertices[i2] * (1 + factor);
42770
+ var y = vertices[i2 + 1] + (vertices[i2 + 1] - distances[i]) * factor;
42771
+ vertices[i2] = x;
42772
+ vertices[i2 + 1] = y;
42773
+ uvs[i2] = 0.5 * (x / sizeX + 1);
42774
+ uvs[i2 + 1] = 0.5 * (y / sizeY + 1);
42775
+ }
42732
42776
  clippings[i] = scale;
42733
42777
  }
42778
+ distances[i] = fdistance;
42734
42779
  }
42735
42780
  // The skeleton points of adjacent vertices may coincide on a nearly circular ellipse.
42736
42781
  this.pad(iv, ii, nv, ni, fdistance);
@@ -43939,11 +43984,10 @@
43939
43984
  }
43940
43985
  };
43941
43986
 
43942
- var RECTANGLE_VERTEX_COUNT = 16;
43943
- var RECTANGLE_INDEX_COUNT = 8;
43944
- var RECTANGLE_WORLD_SIZE = [0, 0];
43945
- var RECTANGLE_WORK_POINT = new pixi_js.Point();
43946
- var buildRectangleIndex = function (indices, voffset, ioffset) {
43987
+ var RECTANGLE_LEGACY_VERTEX_COUNT = 16;
43988
+ var RECTANGLE_LEGACY_INDEX_COUNT = 8;
43989
+ var RECTANGLE_LEGACY_WORLD_SIZE = [0, 0];
43990
+ var buildRectangleLegacyIndex = function (indices, voffset, ioffset) {
43947
43991
  // c0 c1 c4 c5
43948
43992
  // |-----| |-----|
43949
43993
  // | | | |
@@ -43981,7 +44025,7 @@
43981
44025
  indices[++ii] = voffset + 13;
43982
44026
  indices[++ii] = voffset + 15;
43983
44027
  };
43984
- var buildRectangleVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
44028
+ var buildRectangleLegacyVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
43985
44029
  // b0 b1 b2
43986
44030
  // |-------|-------|
43987
44031
  // | | |
@@ -43989,22 +44033,21 @@
43989
44033
  // | | |
43990
44034
  // |-------|-------|
43991
44035
  // b6 b7 b8
44036
+ var a = internalTransform.a;
44037
+ var b = internalTransform.b;
44038
+ var c = internalTransform.c;
44039
+ var d = internalTransform.d;
44040
+ var tx = internalTransform.tx;
44041
+ var ty = internalTransform.ty;
43992
44042
  var s = strokeAlign * strokeWidth;
43993
44043
  var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
43994
44044
  var sy = sizeY * 0.5 + (0 <= sizeY ? +s : -s);
43995
- var work = RECTANGLE_WORK_POINT;
43996
- work.set(originX - sx, originY - sy);
43997
- internalTransform.apply(work, work);
43998
- var b0x = work.x;
43999
- var b0y = work.y;
44000
- work.set(originX, originY - sy);
44001
- internalTransform.apply(work, work);
44002
- var b1x = work.x;
44003
- var b1y = work.y;
44004
- work.set(originX - sx, originY);
44005
- internalTransform.apply(work, work);
44006
- var b3x = work.x;
44007
- var b3y = work.y;
44045
+ var b0x = a * (originX - sx) + c * (originY - sy) + tx;
44046
+ var b0y = b * (originX - sx) + d * (originY - sy) + ty;
44047
+ var b1x = a * originX + c * (originY - sy) + tx;
44048
+ var b1y = b * originX + d * (originY - sy) + ty;
44049
+ var b3x = a * (originX - sx) + c * originY + tx;
44050
+ var b3y = b * (originX - sx) + d * originY + ty;
44008
44051
  var d01x = b1x - b0x;
44009
44052
  var d01y = b1y - b0y;
44010
44053
  var d03x = b3x - b0x;
@@ -44069,7 +44112,7 @@
44069
44112
  worldSize[0] = toLength(b0x, b0y, b1x, b1y);
44070
44113
  worldSize[1] = toLength(b0x, b0y, b3x, b3y);
44071
44114
  };
44072
- var buildRectangleStep = function (voffset, steps, strokeWidth, strokeSide, strokeStyle, worldSize) {
44115
+ var buildRectangleLegacyStep = function (voffset, steps, strokeWidth, strokeSide, strokeStyle, worldSize) {
44073
44116
  var scaleInvariant = toScaleInvariant(strokeStyle);
44074
44117
  var ax = worldSize[0];
44075
44118
  var ay = worldSize[1];
@@ -44197,7 +44240,7 @@
44197
44240
  steps[++is] = c11;
44198
44241
  steps[++is] = 0;
44199
44242
  };
44200
- var buildRectangleUv = function (uvs, voffset, textureUvs) {
44243
+ var buildRectangleLegacyUv = function (uvs, voffset, textureUvs) {
44201
44244
  // b0 b1 b2
44202
44245
  // |-------|-------|
44203
44246
  // | | |
@@ -46345,8 +46388,8 @@
46345
46388
  var ioffset = this.indexOffset;
46346
46389
  var pointCountReserved = this.pointCountReserved;
46347
46390
  if (0 < pointCountReserved) {
46348
- buildRectangleIndex(indices, voffset, ioffset);
46349
- copyIndex(indices, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, pointCountReserved);
46391
+ buildRectangleLegacyIndex(indices, voffset, ioffset);
46392
+ copyIndex(indices, RECTANGLE_LEGACY_VERTEX_COUNT, ioffset, RECTANGLE_LEGACY_INDEX_COUNT, pointCountReserved);
46350
46393
  }
46351
46394
  this.inited |= BuilderFlag.INDEX;
46352
46395
  };
@@ -46355,7 +46398,7 @@
46355
46398
  if (points instanceof EShapeLineOfAnyPointsImpl) {
46356
46399
  var buffer = this.buffer;
46357
46400
  this.updateVertexStepAndUv(buffer, shape, points);
46358
- this.updateLineOfAnyColor(buffer, shape, points, RECTANGLE_VERTEX_COUNT);
46401
+ this.updateLineOfAnyColor(buffer, shape, points, RECTANGLE_LEGACY_VERTEX_COUNT);
46359
46402
  }
46360
46403
  };
46361
46404
  BuilderLineOfRectangles.prototype.updateVertexStepAndUv = function (buffer, shape, points) {
@@ -46420,17 +46463,17 @@
46420
46463
  var pointSizeX = pointSize.getX(0);
46421
46464
  var pointSizeY = pointSize.getY(0);
46422
46465
  // Vertices
46423
- buildRectangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
46424
- copyVertex(vertices, internalTransform, voffset, RECTANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
46466
+ buildRectangleLegacyVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
46467
+ copyVertex(vertices, internalTransform, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
46425
46468
  // Steps
46426
46469
  if (isNotInited || isVertexChanged || isTransformChanged) {
46427
- buildRectangleStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
46428
- copyStep(steps, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
46470
+ buildRectangleLegacyStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
46471
+ copyStep(steps, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount);
46429
46472
  }
46430
46473
  // UVs
46431
46474
  if (isNotInited || isVertexChanged || isTextureChanged) {
46432
- buildRectangleUv(uvs, voffset, textureUvs);
46433
- copyUvs(uvs, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
46475
+ buildRectangleLegacyUv(uvs, voffset, textureUvs);
46476
+ copyUvs(uvs, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount);
46434
46477
  }
46435
46478
  }
46436
46479
  else {
@@ -46440,23 +46483,23 @@
46440
46483
  var py = pointsValues[ip + 1] + pointOffset.getY(i);
46441
46484
  var pointSizeX = pointSize.getX(i);
46442
46485
  var pointSizeY = pointSize.getY(i);
46443
- var iv = voffset + i * RECTANGLE_VERTEX_COUNT;
46486
+ var iv = voffset + i * RECTANGLE_LEGACY_VERTEX_COUNT;
46444
46487
  // Vertices
46445
- buildRectangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
46488
+ buildRectangleLegacyVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
46446
46489
  // Steps
46447
46490
  if (isNotInited || isVertexChanged || isTransformChanged) {
46448
- buildRectangleStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
46491
+ buildRectangleLegacyStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
46449
46492
  }
46450
46493
  // UVs
46451
46494
  if (isNotInited || isVertexChanged || isTextureChanged) {
46452
- buildRectangleUv(uvs, iv, textureUvs);
46495
+ buildRectangleLegacyUv(uvs, iv, textureUvs);
46453
46496
  }
46454
46497
  }
46455
46498
  }
46456
46499
  // Fill the rest
46457
46500
  var pointCountReserved = this.pointCountReserved;
46458
- var voffsetReserved = voffset + pointCount * RECTANGLE_VERTEX_COUNT;
46459
- var vcountReserved = RECTANGLE_VERTEX_COUNT * (pointCountReserved - pointCount);
46501
+ var voffsetReserved = voffset + pointCount * RECTANGLE_LEGACY_VERTEX_COUNT;
46502
+ var vcountReserved = RECTANGLE_LEGACY_VERTEX_COUNT * (pointCountReserved - pointCount);
46460
46503
  buildNullVertex(vertices, voffsetReserved, vcountReserved);
46461
46504
  buildNullStep(steps, voffsetReserved, vcountReserved);
46462
46505
  buildNullUv(uvs, voffsetReserved, vcountReserved);
@@ -47023,14 +47066,14 @@
47023
47066
  var BuilderMarkerRectangle = /** @class */ (function (_super) {
47024
47067
  __extends(BuilderMarkerRectangle, _super);
47025
47068
  function BuilderMarkerRectangle(buffer, vertexOffset, indexOffset) {
47026
- var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
47069
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
47027
47070
  _this.pointId = -1;
47028
47071
  return _this;
47029
47072
  }
47030
47073
  BuilderMarkerRectangle.prototype.init = function () {
47031
47074
  var buffer = this.buffer;
47032
47075
  buffer.updateIndices();
47033
- buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47076
+ buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47034
47077
  this.inited |= BuilderFlag.INDEX;
47035
47078
  };
47036
47079
  BuilderMarkerRectangle.prototype.update = function (shape) {
@@ -47091,16 +47134,16 @@
47091
47134
  var internalTransform = ((_a = BuilderMarkerRectangle.WORK) !== null && _a !== void 0 ? _a : (BuilderMarkerRectangle.WORK = new pixi_js.Matrix()));
47092
47135
  internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
47093
47136
  buffer.updateVertices();
47094
- buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
47137
+ buildRectangleLegacyVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
47095
47138
  // Steps
47096
47139
  if (isNotInited || isVertexChanged || isTransformChanged) {
47097
47140
  buffer.updateSteps();
47098
- buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
47141
+ buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
47099
47142
  }
47100
47143
  // UVs
47101
47144
  if (isNotInited || isVertexChanged || isTextureChanged) {
47102
47145
  buffer.updateUvs();
47103
- buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture));
47146
+ buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
47104
47147
  }
47105
47148
  }
47106
47149
  };
@@ -47297,23 +47340,23 @@
47297
47340
  * Copyright (C) 2019 Toshiba Corporation
47298
47341
  * SPDX-License-Identifier: Apache-2.0
47299
47342
  */
47300
- var BuilderRectanglePivoted = /** @class */ (function (_super) {
47301
- __extends(BuilderRectanglePivoted, _super);
47302
- function BuilderRectanglePivoted(buffer, vertexOffset, indexOffset) {
47303
- return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
47343
+ var BuilderRectangleLegacy = /** @class */ (function (_super) {
47344
+ __extends(BuilderRectangleLegacy, _super);
47345
+ function BuilderRectangleLegacy(buffer, vertexOffset, indexOffset) {
47346
+ return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
47304
47347
  }
47305
- BuilderRectanglePivoted.prototype.init = function () {
47348
+ BuilderRectangleLegacy.prototype.init = function () {
47306
47349
  var buffer = this.buffer;
47307
47350
  buffer.updateIndices();
47308
- buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47351
+ buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47309
47352
  this.inited |= BuilderFlag.INDEX;
47310
47353
  };
47311
- BuilderRectanglePivoted.prototype.update = function (shape) {
47354
+ BuilderRectangleLegacy.prototype.update = function (shape) {
47312
47355
  var buffer = this.buffer;
47313
47356
  this.updateVertexStepAndUv(buffer, shape);
47314
47357
  this.updateColor(buffer, shape);
47315
47358
  };
47316
- BuilderRectanglePivoted.prototype.updateVertexStepAndUv = function (buffer, shape) {
47359
+ BuilderRectangleLegacy.prototype.updateVertexStepAndUv = function (buffer, shape) {
47317
47360
  var size = shape.size;
47318
47361
  var sizeX = size.x;
47319
47362
  var sizeY = size.y;
@@ -47348,43 +47391,43 @@
47348
47391
  // Vertices
47349
47392
  var voffset = this.vertexOffset;
47350
47393
  buffer.updateVertices();
47351
- buildRectangleVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
47394
+ buildRectangleLegacyVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
47352
47395
  // Steps
47353
47396
  if (isNotInited || isVertexChanged || isTransformChanged) {
47354
47397
  buffer.updateSteps();
47355
- buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
47398
+ buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
47356
47399
  }
47357
47400
  // UVs
47358
47401
  if (isNotInited || isVertexChanged || isTextureChanged) {
47359
47402
  buffer.updateUvs();
47360
- buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture));
47403
+ buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
47361
47404
  }
47362
47405
  }
47363
47406
  };
47364
- return BuilderRectanglePivoted;
47407
+ return BuilderRectangleLegacy;
47365
47408
  }(BuilderBase));
47366
47409
 
47367
47410
  /*
47368
47411
  * Copyright (C) 2019 Toshiba Corporation
47369
47412
  * SPDX-License-Identifier: Apache-2.0
47370
47413
  */
47371
- var BuilderRectangle = /** @class */ (function (_super) {
47372
- __extends(BuilderRectangle, _super);
47373
- function BuilderRectangle(buffer, vertexOffset, indexOffset) {
47374
- return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
47414
+ var BuilderRectanglePivoted = /** @class */ (function (_super) {
47415
+ __extends(BuilderRectanglePivoted, _super);
47416
+ function BuilderRectanglePivoted(buffer, vertexOffset, indexOffset) {
47417
+ return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
47375
47418
  }
47376
- BuilderRectangle.prototype.init = function () {
47419
+ BuilderRectanglePivoted.prototype.init = function () {
47377
47420
  var buffer = this.buffer;
47378
47421
  buffer.updateIndices();
47379
- buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47422
+ buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
47380
47423
  this.inited |= BuilderFlag.INDEX;
47381
47424
  };
47382
- BuilderRectangle.prototype.update = function (shape) {
47425
+ BuilderRectanglePivoted.prototype.update = function (shape) {
47383
47426
  var buffer = this.buffer;
47384
47427
  this.updateVertexStepAndUv(buffer, shape);
47385
47428
  this.updateColor(buffer, shape);
47386
47429
  };
47387
- BuilderRectangle.prototype.updateVertexStepAndUv = function (buffer, shape) {
47430
+ BuilderRectanglePivoted.prototype.updateVertexStepAndUv = function (buffer, shape) {
47388
47431
  var size = shape.size;
47389
47432
  var sizeX = size.x;
47390
47433
  var sizeY = size.y;
@@ -47419,20 +47462,20 @@
47419
47462
  // Vertices
47420
47463
  var voffset = this.vertexOffset;
47421
47464
  buffer.updateVertices();
47422
- buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
47465
+ buildRectangleLegacyVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
47423
47466
  // Steps
47424
47467
  if (isNotInited || isVertexChanged || isTransformChanged) {
47425
47468
  buffer.updateSteps();
47426
- buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
47469
+ buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
47427
47470
  }
47428
47471
  // UVs
47429
47472
  if (isNotInited || isVertexChanged || isTextureChanged) {
47430
47473
  buffer.updateUvs();
47431
- buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture));
47474
+ buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
47432
47475
  }
47433
47476
  }
47434
47477
  };
47435
- return BuilderRectangle;
47478
+ return BuilderRectanglePivoted;
47436
47479
  }(BuilderBase));
47437
47480
 
47438
47481
  /*
@@ -47704,6 +47747,834 @@
47704
47747
  return null;
47705
47748
  };
47706
47749
 
47750
+ /*
47751
+ * Copyright (C) 2019-2026 Toshiba Corporation
47752
+ * SPDX-License-Identifier: Apache-2.0
47753
+ */
47754
+ var EShapeRectangleTriangulatedImpl = /** @class */ (function () {
47755
+ function EShapeRectangleTriangulatedImpl(parent) {
47756
+ this._id = 0;
47757
+ this._parent = parent;
47758
+ this._width = 0;
47759
+ this._height = 0;
47760
+ this._strokeAlign = 0;
47761
+ this._strokeWidth = 0;
47762
+ this._strokeSide = EShapeStrokeSide.NONE;
47763
+ this._sizeX = 0;
47764
+ this._sizeY = 0;
47765
+ this._vertices = [];
47766
+ this._nvertices = 0;
47767
+ this._distances = [];
47768
+ this._lengths = [];
47769
+ this._clippings = [];
47770
+ this._uvs = [];
47771
+ this._indices = [];
47772
+ this._nindices = 0;
47773
+ this._boundary = [0, 0, 0, 0];
47774
+ }
47775
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "id", {
47776
+ get: function () {
47777
+ this.triangulate();
47778
+ return this._id;
47779
+ },
47780
+ enumerable: false,
47781
+ configurable: true
47782
+ });
47783
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "vertices", {
47784
+ get: function () {
47785
+ this.triangulate();
47786
+ return this._vertices;
47787
+ },
47788
+ enumerable: false,
47789
+ configurable: true
47790
+ });
47791
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nvertices", {
47792
+ get: function () {
47793
+ this.triangulate();
47794
+ return this._nvertices;
47795
+ },
47796
+ enumerable: false,
47797
+ configurable: true
47798
+ });
47799
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "distances", {
47800
+ get: function () {
47801
+ this.triangulate();
47802
+ return this._distances;
47803
+ },
47804
+ enumerable: false,
47805
+ configurable: true
47806
+ });
47807
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "lengths", {
47808
+ get: function () {
47809
+ this.triangulate();
47810
+ return this._lengths;
47811
+ },
47812
+ enumerable: false,
47813
+ configurable: true
47814
+ });
47815
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "clippings", {
47816
+ get: function () {
47817
+ this.triangulate();
47818
+ return this._clippings;
47819
+ },
47820
+ enumerable: false,
47821
+ configurable: true
47822
+ });
47823
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "uvs", {
47824
+ get: function () {
47825
+ this.triangulate();
47826
+ return this._uvs;
47827
+ },
47828
+ enumerable: false,
47829
+ configurable: true
47830
+ });
47831
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "indices", {
47832
+ get: function () {
47833
+ this.triangulate();
47834
+ return this._indices;
47835
+ },
47836
+ enumerable: false,
47837
+ configurable: true
47838
+ });
47839
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nindices", {
47840
+ get: function () {
47841
+ this.triangulate();
47842
+ return this._nindices;
47843
+ },
47844
+ enumerable: false,
47845
+ configurable: true
47846
+ });
47847
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "boundary", {
47848
+ get: function () {
47849
+ this.triangulate();
47850
+ return this._boundary;
47851
+ },
47852
+ enumerable: false,
47853
+ configurable: true
47854
+ });
47855
+ EShapeRectangleTriangulatedImpl.prototype.triangulate = function () {
47856
+ var isNotInitialized = this._id === 0;
47857
+ var parent = this._parent;
47858
+ var size = parent.size;
47859
+ var width = size.x;
47860
+ var height = size.y;
47861
+ var isRectChanged = this._width !== width || this._height !== height;
47862
+ var stroke = parent.stroke;
47863
+ var strokeAlign = stroke.align;
47864
+ var strokeWidth = stroke.enable ? stroke.width : 0;
47865
+ var strokeSide = stroke.side;
47866
+ var isStrokeChanged = this._strokeAlign !== strokeAlign ||
47867
+ this._strokeWidth !== strokeWidth ||
47868
+ this._strokeSide !== strokeSide;
47869
+ var isSizeChanged = false;
47870
+ var sizeX = this._sizeX;
47871
+ var sizeY = this._sizeY;
47872
+ if (isRectChanged || isStrokeChanged) {
47873
+ this._width = width;
47874
+ this._height = height;
47875
+ this._strokeAlign = strokeAlign;
47876
+ this._strokeWidth = strokeWidth;
47877
+ this._strokeSide = strokeSide;
47878
+ var s = strokeAlign * strokeWidth;
47879
+ sizeX = width * 0.5 + (0 <= width ? +s : -s);
47880
+ sizeY = height * 0.5 + (0 <= height ? +s : -s);
47881
+ isSizeChanged = this._sizeX !== sizeX || this._sizeY !== sizeY;
47882
+ }
47883
+ if (isNotInitialized || isSizeChanged || isStrokeChanged) {
47884
+ this._sizeX = sizeX;
47885
+ this._sizeY = sizeY;
47886
+ this.update(sizeX, sizeY, 1.1);
47887
+ }
47888
+ };
47889
+ EShapeRectangleTriangulatedImpl.prototype.update = function (sizeX, sizeY, scale) {
47890
+ // Boundary
47891
+ var ax = Math.abs(sizeX);
47892
+ var ay = Math.abs(sizeY);
47893
+ var boundary = this._boundary;
47894
+ boundary[0] = -ax;
47895
+ boundary[1] = -ay;
47896
+ boundary[2] = +ax;
47897
+ boundary[3] = +ay;
47898
+ // # of vertices and # of indices
47899
+ var nv = 14;
47900
+ var ni = 6;
47901
+ this._nvertices = nv;
47902
+ this._nindices = ni;
47903
+ // ID
47904
+ this._id += 1;
47905
+ //
47906
+ if (sizeX === 0 || sizeY === 0) {
47907
+ this.pad(0, 0, nv, ni, 0);
47908
+ }
47909
+ else {
47910
+ var fx = 1 / sizeX;
47911
+ var fy = 1 / sizeY;
47912
+ switch (this._parent.stroke.side) {
47913
+ case EShapeStrokeSide.NONE:
47914
+ this.updateNone(fx, fy, ax, ay, scale, nv, ni);
47915
+ break;
47916
+ case EShapeStrokeSide.ALL:
47917
+ if (ay <= ax) {
47918
+ this.updateAll0(fx, fy, ax, ay, scale, nv, ni);
47919
+ }
47920
+ else {
47921
+ this.updateAll1(fx, fy, ax, ay, scale, nv, ni);
47922
+ }
47923
+ break;
47924
+ case EShapeStrokeSide.TOP:
47925
+ this.updateTop(fx, fy, ax, ay, scale, nv, ni);
47926
+ break;
47927
+ case EShapeStrokeSide.RIGHT:
47928
+ this.updateRight(fx, fy, ax, ay, scale, nv, ni);
47929
+ break;
47930
+ case EShapeStrokeSide.BOTTOM:
47931
+ this.updateBottom(fx, fy, ax, ay, scale, nv, ni);
47932
+ break;
47933
+ case EShapeStrokeSide.LEFT:
47934
+ this.updateLeft(fx, fy, ax, ay, scale, nv, ni);
47935
+ break;
47936
+ case EShapeStrokeSide.TOP_OR_BOTTOM:
47937
+ this.updateTopBottom(fx, fy, ax, ay, scale, nv, ni);
47938
+ break;
47939
+ case EShapeStrokeSide.LEFT_OR_RIGHT:
47940
+ this.updateLeftRight(fx, fy, ax, ay, scale, nv, ni);
47941
+ break;
47942
+ case EShapeStrokeSide.TOP_OR_RIGHT:
47943
+ if (ay <= ax) {
47944
+ this.updateTopRight0(fx, fy, ax, ay, scale, nv, ni);
47945
+ }
47946
+ else {
47947
+ this.updateTopRight1(fx, fy, ax, ay, scale, nv, ni);
47948
+ }
47949
+ break;
47950
+ case EShapeStrokeSide.TOP_OR_LEFT:
47951
+ if (ay <= ax) {
47952
+ this.updateTopLeft0(fx, fy, ax, ay, scale, nv, ni);
47953
+ }
47954
+ else {
47955
+ this.updateTopLeft1(fx, fy, ax, ay, scale, nv, ni);
47956
+ }
47957
+ break;
47958
+ case EShapeStrokeSide.BOTTOM_OR_RIGHT:
47959
+ if (ay <= ax) {
47960
+ this.updateBottomRight0(fx, fy, ax, ay, scale, nv, ni);
47961
+ }
47962
+ else {
47963
+ this.updateBottomRight1(fx, fy, ax, ay, scale, nv, ni);
47964
+ }
47965
+ break;
47966
+ case EShapeStrokeSide.BOTTOM_OR_LEFT:
47967
+ if (ay <= ax) {
47968
+ this.updateBottomLeft0(fx, fy, ax, ay, scale, nv, ni);
47969
+ }
47970
+ else {
47971
+ this.updateBottomLeft1(fx, fy, ax, ay, scale, nv, ni);
47972
+ }
47973
+ break;
47974
+ case EShapeStrokeSide.NOT_TOP:
47975
+ if (2 * ay <= ax) {
47976
+ this.updateNotTop0(fx, fy, ax, ay, scale, nv, ni);
47977
+ }
47978
+ else {
47979
+ this.updateNotTop1(fx, fy, ax, ay, scale, nv, ni);
47980
+ }
47981
+ break;
47982
+ case EShapeStrokeSide.NOT_RIGHT:
47983
+ if (2 * ax <= ay) {
47984
+ this.updateNotRight0(fx, fy, ax, ay, scale, nv, ni);
47985
+ }
47986
+ else {
47987
+ this.updateNotRight1(fx, fy, ax, ay, scale, nv, ni);
47988
+ }
47989
+ break;
47990
+ case EShapeStrokeSide.NOT_BOTTOM:
47991
+ if (2 * ay <= ax) {
47992
+ this.updateNotBottom0(fx, fy, ax, ay, scale, nv, ni);
47993
+ }
47994
+ else {
47995
+ this.updateNotBottom1(fx, fy, ax, ay, scale, nv, ni);
47996
+ }
47997
+ break;
47998
+ case EShapeStrokeSide.NOT_LEFT:
47999
+ if (2 * ax <= ay) {
48000
+ this.updateNotLeft0(fx, fy, ax, ay, scale, nv, ni);
48001
+ }
48002
+ else {
48003
+ this.updateNotLeft1(fx, fy, ax, ay, scale, nv, ni);
48004
+ }
48005
+ break;
48006
+ }
48007
+ }
48008
+ };
48009
+ /**
48010
+ * Fills the unused tail with degenerated triangles and trims the arrays
48011
+ * so that the buffers always hold exactly `nv` vertices and `ni` triangles.
48012
+ */
48013
+ EShapeRectangleTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, fd) {
48014
+ var vertices = this._vertices;
48015
+ var distances = this._distances;
48016
+ var lengths = this._lengths;
48017
+ var clippings = this._clippings;
48018
+ var uvs = this._uvs;
48019
+ var indices = this._indices;
48020
+ for (var i = iv; i < nv; ++i) {
48021
+ var i2 = i << 1;
48022
+ vertices[i2] = 0;
48023
+ vertices[i2 + 1] = 0;
48024
+ distances[i] = fd;
48025
+ lengths[i] = 0;
48026
+ clippings[i] = 0;
48027
+ uvs[i2] = 0.5;
48028
+ uvs[i2 + 1] = 0.5;
48029
+ }
48030
+ for (var i = ii, imax = ni * 3; i < imax; ++i) {
48031
+ indices[i] = 0;
48032
+ }
48033
+ var nv2 = nv << 1;
48034
+ vertices.length = nv2;
48035
+ distances.length = nv;
48036
+ lengths.length = nv;
48037
+ clippings.length = nv;
48038
+ uvs.length = nv2;
48039
+ indices.length = ni * 3;
48040
+ };
48041
+ EShapeRectangleTriangulatedImpl.prototype.updateTop = function (fx, fy, ax, ay, scale, nv, ni) {
48042
+ var fdistance = 1 / (2 * ay);
48043
+ this.updateCellTop(-ax, -ay - (scale - 1) / fdistance, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
48044
+ this.pad(4, 6, nv, ni, fdistance);
48045
+ };
48046
+ EShapeRectangleTriangulatedImpl.prototype.updateRight = function (fx, fy, ax, ay, scale, nv, ni) {
48047
+ var fdistance = 1 / (2 * ax);
48048
+ this.updateCellRight(-ax, -ay, +ax + (scale - 1) / fdistance, +ay, fdistance, scale, fx, fy, ax, ay, 0);
48049
+ this.pad(4, 6, nv, ni, fdistance);
48050
+ };
48051
+ EShapeRectangleTriangulatedImpl.prototype.updateBottom = function (fx, fy, ax, ay, scale, nv, ni) {
48052
+ var fdistance = 1 / (2 * ay);
48053
+ this.updateCellBottom(-ax, -ay, +ax, +ay + (scale - 1) / fdistance, fdistance, scale, fx, fy, ax, ay, 0);
48054
+ this.pad(4, 6, nv, ni, fdistance);
48055
+ };
48056
+ EShapeRectangleTriangulatedImpl.prototype.updateLeft = function (fx, fy, ax, ay, scale, nv, ni) {
48057
+ var fdistance = 1 / (2 * ax);
48058
+ this.updateCellLeft(-ax - (scale - 1) / fdistance, -ay, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
48059
+ this.pad(4, 6, nv, ni, fdistance);
48060
+ };
48061
+ EShapeRectangleTriangulatedImpl.prototype.updateLeftRight = function (fx, fy, ax, ay, scale, nv, ni) {
48062
+ var fdistance = 1 / ax;
48063
+ var shift = (scale - 1) / fdistance;
48064
+ this.updateCellLeft(-ax - shift, -ay, 0, +ay, fdistance, scale, fx, fy, ax, ay, 0);
48065
+ this.updateCellRight(0, -ay, +ax + shift, +ay, fdistance, scale, fx, fy, ax, ay, 4);
48066
+ this.pad(8, 12, nv, ni, fdistance);
48067
+ };
48068
+ EShapeRectangleTriangulatedImpl.prototype.updateTopBottom = function (fx, fy, ax, ay, scale, nv, ni) {
48069
+ var fdistance = 1 / ay;
48070
+ var shift = (scale - 1) / fdistance;
48071
+ this.updateCellTop(-ax, -ay - shift, +ax, 0, fdistance, scale, fx, fy, ax, ay, 0);
48072
+ this.updateCellBottom(-ax, 0, +ax, +ay + shift, fdistance, scale, fx, fy, ax, ay, 4);
48073
+ this.pad(8, 12, nv, ni, fdistance);
48074
+ };
48075
+ EShapeRectangleTriangulatedImpl.prototype.updateTopRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
48076
+ var distance = 2 * ay;
48077
+ var fdistance = 1 / distance;
48078
+ var shift = (scale - 1) * distance;
48079
+ var left = -ax;
48080
+ var right = +ax + shift;
48081
+ var top = -ay - shift;
48082
+ var bottom = +ay;
48083
+ var indices = this._indices;
48084
+ var splitX = ax - 2 * ay;
48085
+ this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
48086
+ this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
48087
+ this.updateVertexTop(2, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
48088
+ this.updateVertexTop(3, left, bottom, fdistance, scale, fx, fy, ax, ay);
48089
+ this.updateVertexRight(4, right, top, fdistance, scale, fx, fy, ax, ay);
48090
+ this.updateVertexRight(5, right, bottom, fdistance, scale, fx, fy, ax, ay);
48091
+ this.updateVertexRight(6, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
48092
+ indices[0] = 0;
48093
+ indices[1] = 1;
48094
+ indices[2] = 2;
48095
+ indices[3] = 0;
48096
+ indices[4] = 2;
48097
+ indices[5] = 3;
48098
+ indices[6] = 4;
48099
+ indices[7] = 5;
48100
+ indices[8] = 6;
48101
+ this.pad(7, 9, nv, ni, fdistance);
48102
+ };
48103
+ EShapeRectangleTriangulatedImpl.prototype.updateTopRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
48104
+ var distance = 2 * ax;
48105
+ var fdistance = 1 / distance;
48106
+ var shift = (scale - 1) * distance;
48107
+ var left = -ax;
48108
+ var right = +ax + shift;
48109
+ var top = -ay - shift;
48110
+ var bottom = +ay;
48111
+ var indices = this._indices;
48112
+ var splitY = 2 * ax - ay;
48113
+ this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
48114
+ this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
48115
+ this.updateVertexTop(2, left, splitY, fdistance, scale, fx, fy, ax, ay);
48116
+ this.updateVertexRight(3, right, top, fdistance, scale, fx, fy, ax, ay);
48117
+ this.updateVertexRight(4, right, bottom, fdistance, scale, fx, fy, ax, ay);
48118
+ this.updateVertexRight(5, left, bottom, fdistance, scale, fx, fy, ax, ay);
48119
+ this.updateVertexRight(6, left, splitY, fdistance, scale, fx, fy, ax, ay);
48120
+ indices[0] = 0;
48121
+ indices[1] = 1;
48122
+ indices[2] = 2;
48123
+ indices[3] = 3;
48124
+ indices[4] = 4;
48125
+ indices[5] = 5;
48126
+ indices[6] = 3;
48127
+ indices[7] = 5;
48128
+ indices[8] = 6;
48129
+ this.pad(7, 9, nv, ni, fdistance);
48130
+ };
48131
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
48132
+ var distance = 2 * ay;
48133
+ var fdistance = 1 / distance;
48134
+ var shift = (scale - 1) * distance;
48135
+ var left = -ax - shift;
48136
+ var right = +ax;
48137
+ var top = -ay;
48138
+ var bottom = +ay + shift;
48139
+ var splitX = 2 * ay - ax;
48140
+ this.updateQuadBottom(0, 0, right, bottom, left, bottom, splitX, top, right, top, fdistance, scale, fx, fy, ax, ay);
48141
+ this.updateTriLeft(4, 6, left, bottom, left, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
48142
+ this.pad(7, 9, nv, ni, fdistance);
48143
+ };
48144
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
48145
+ var distance = 2 * ax;
48146
+ var fdistance = 1 / distance;
48147
+ var shift = (scale - 1) * distance;
48148
+ var left = -ax - shift;
48149
+ var right = +ax;
48150
+ var top = -ay;
48151
+ var bottom = +ay + shift;
48152
+ var splitY = ay - 2 * ax;
48153
+ this.updateTriBottom(0, 0, right, bottom, left, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
48154
+ this.updateQuadLeft(3, 3, left, bottom, left, top, right, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
48155
+ this.pad(7, 9, nv, ni, fdistance);
48156
+ };
48157
+ EShapeRectangleTriangulatedImpl.prototype.updateTopLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
48158
+ var distance = 2 * ay;
48159
+ var fdistance = 1 / distance;
48160
+ var shift = (scale - 1) * distance;
48161
+ var left = -ax - shift;
48162
+ var right = +ax;
48163
+ var top = -ay - shift;
48164
+ var bottom = +ay;
48165
+ var splitX = 2 * ay - ax;
48166
+ this.updateQuadTop(0, 0, right, top, left, top, splitX, bottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
48167
+ this.updateTriLeft(4, 6, left, top, left, bottom, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
48168
+ this.pad(7, 9, nv, ni, fdistance);
48169
+ };
48170
+ EShapeRectangleTriangulatedImpl.prototype.updateTopLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
48171
+ var distance = 2 * ax;
48172
+ var fdistance = 1 / distance;
48173
+ var shift = (scale - 1) * distance;
48174
+ var left = -ax - shift;
48175
+ var right = +ax;
48176
+ var top = -ay - shift;
48177
+ var bottom = +ay;
48178
+ var splitY = 2 * ax - ay;
48179
+ this.updateTriTop(0, 0, right, top, left, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
48180
+ this.updateQuadLeft(3, 3, left, top, left, bottom, right, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
48181
+ this.pad(7, 9, nv, ni, fdistance);
48182
+ };
48183
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
48184
+ var distance = 2 * ay;
48185
+ var fdistance = 1 / distance;
48186
+ var shift = (scale - 1) * distance;
48187
+ var left = -ax;
48188
+ var right = +ax + shift;
48189
+ var top = -ay;
48190
+ var bottom = +ay + shift;
48191
+ var splitX = ax - 2 * ay;
48192
+ this.updateQuadBottom(0, 0, left, bottom, right, bottom, splitX, top, left, top, fdistance, scale, fx, fy, ax, ay);
48193
+ this.updateTriRight(4, 6, right, bottom, right, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
48194
+ this.pad(7, 9, nv, ni, fdistance);
48195
+ };
48196
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
48197
+ var distance = 2 * ax;
48198
+ var fdistance = 1 / distance;
48199
+ var shift = (scale - 1) * distance;
48200
+ var left = -ax;
48201
+ var right = +ax + shift;
48202
+ var top = -ay;
48203
+ var bottom = +ay + shift;
48204
+ var splitY = ay - 2 * ax;
48205
+ this.updateTriBottom(0, 0, left, bottom, right, bottom, left, splitY, fdistance, scale, fx, fy, ax, ay);
48206
+ this.updateQuadRight(3, 3, right, bottom, right, top, left, top, left, splitY, fdistance, scale, fx, fy, ax, ay);
48207
+ this.pad(7, 9, nv, ni, fdistance);
48208
+ };
48209
+ EShapeRectangleTriangulatedImpl.prototype.updateNotTop0 = function (fx, fy, ax, ay, scale, nv, ni) {
48210
+ var distance = 2 * ay;
48211
+ var fdistance = 1 / distance;
48212
+ var shift = (scale - 1) * distance;
48213
+ var left = -ax - shift;
48214
+ var right = +ax + shift;
48215
+ var top = -ay;
48216
+ var bottom = +ay + shift;
48217
+ var splitLeft = 2 * ay - ax;
48218
+ var splitRight = ax - 2 * ay;
48219
+ this.updateTriLeft(0, 0, left, top, splitLeft, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
48220
+ this.updateQuadBottom(3, 3, splitLeft, top, splitRight, top, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
48221
+ this.updateTriRight(7, 9, splitRight, top, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
48222
+ this.pad(10, 12, nv, ni, fdistance);
48223
+ };
48224
+ EShapeRectangleTriangulatedImpl.prototype.updateNotTop1 = function (fx, fy, ax, ay, scale, nv, ni) {
48225
+ var distance = ax;
48226
+ var fdistance = 1 / distance;
48227
+ var shift = (scale - 1) * distance;
48228
+ var left = -ax - shift;
48229
+ var right = +ax + shift;
48230
+ var top = -ay;
48231
+ var bottom = +ay + shift;
48232
+ var splitY = ay - ax;
48233
+ this.updateQuadLeft(0, 0, left, top, 0, top, 0, splitY, left, bottom, fdistance, scale, fx, fy, ax, ay);
48234
+ this.updateQuadRight(4, 6, 0, top, right, top, right, bottom, 0, splitY, fdistance, scale, fx, fy, ax, ay);
48235
+ this.updateTriBottom(8, 12, 0, splitY, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
48236
+ this.pad(11, 15, nv, ni, fdistance);
48237
+ };
48238
+ EShapeRectangleTriangulatedImpl.prototype.updateNotBottom0 = function (fx, fy, ax, ay, scale, nv, ni) {
48239
+ var distance = 2 * ay;
48240
+ var fdistance = 1 / distance;
48241
+ var shift = (scale - 1) * distance;
48242
+ var left = -ax - shift;
48243
+ var right = +ax + shift;
48244
+ var top = -ay - shift;
48245
+ var bottom = +ay;
48246
+ var splitLeft = 2 * ay - ax;
48247
+ var splitRight = ax - 2 * ay;
48248
+ this.updateTriLeft(0, 0, left, bottom, splitLeft, bottom, left, top, fdistance, scale, fx, fy, ax, ay);
48249
+ this.updateQuadTop(3, 3, splitLeft, bottom, splitRight, bottom, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
48250
+ this.updateTriRight(7, 9, splitRight, bottom, right, bottom, right, top, fdistance, scale, fx, fy, ax, ay);
48251
+ this.pad(10, 12, nv, ni, fdistance);
48252
+ };
48253
+ EShapeRectangleTriangulatedImpl.prototype.updateNotBottom1 = function (fx, fy, ax, ay, scale, nv, ni) {
48254
+ var distance = ax;
48255
+ var fdistance = 1 / distance;
48256
+ var shift = (scale - 1) * distance;
48257
+ var left = -ax - shift;
48258
+ var right = +ax + shift;
48259
+ var top = -ay - shift;
48260
+ var bottom = +ay;
48261
+ var splitY = ay - ax;
48262
+ this.updateQuadLeft(0, 0, left, bottom, 0, bottom, 0, -splitY, left, top, fdistance, scale, fx, fy, ax, ay);
48263
+ this.updateQuadRight(4, 6, 0, bottom, right, bottom, right, top, 0, -splitY, fdistance, scale, fx, fy, ax, ay);
48264
+ this.updateTriTop(8, 12, 0, -splitY, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
48265
+ this.pad(11, 15, nv, ni, fdistance);
48266
+ };
48267
+ EShapeRectangleTriangulatedImpl.prototype.updateNotLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
48268
+ var distance = 2 * ax;
48269
+ var fdistance = 1 / distance;
48270
+ var shift = (scale - 1) * distance;
48271
+ var left = -ax;
48272
+ var right = +ax + shift;
48273
+ var top = -ay - shift;
48274
+ var bottom = +ay + shift;
48275
+ var splitTop = 2 * ax - ay;
48276
+ var splitBottom = ay - 2 * ax;
48277
+ this.updateTriBottom(0, 0, left, bottom, left, splitBottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
48278
+ this.updateQuadRight(3, 3, left, splitBottom, left, splitTop, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
48279
+ this.updateTriTop(7, 9, left, splitTop, left, top, right, top, fdistance, scale, fx, fy, ax, ay);
48280
+ this.pad(10, 12, nv, ni, fdistance);
48281
+ };
48282
+ EShapeRectangleTriangulatedImpl.prototype.updateNotLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
48283
+ var distance = ay;
48284
+ var fdistance = 1 / distance;
48285
+ var shift = (scale - 1) * distance;
48286
+ var left = -ax;
48287
+ var right = +ax + shift;
48288
+ var top = -ay - shift;
48289
+ var bottom = +ay + shift;
48290
+ var splitX = ax - ay;
48291
+ this.updateQuadBottom(0, 0, left, bottom, left, 0, splitX, 0, right, bottom, fdistance, scale, fx, fy, ax, ay);
48292
+ this.updateQuadTop(4, 6, left, 0, left, top, right, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
48293
+ this.updateTriRight(8, 12, splitX, 0, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
48294
+ this.pad(11, 15, nv, ni, fdistance);
48295
+ };
48296
+ EShapeRectangleTriangulatedImpl.prototype.updateNotRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
48297
+ var distance = 2 * ax;
48298
+ var fdistance = 1 / distance;
48299
+ var shift = (scale - 1) * distance;
48300
+ var left = -ax - shift;
48301
+ var right = +ax;
48302
+ var top = -ay - shift;
48303
+ var bottom = +ay + shift;
48304
+ var stop = 2 * ax - ay;
48305
+ var sbottom = ay - 2 * ax;
48306
+ this.updateTriBottom(0, 0, right, bottom, right, sbottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
48307
+ this.updateQuadLeft(3, 3, right, sbottom, right, stop, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
48308
+ this.updateTriTop(7, 9, right, stop, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
48309
+ this.pad(10, 12, nv, ni, fdistance);
48310
+ };
48311
+ EShapeRectangleTriangulatedImpl.prototype.updateNotRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
48312
+ var distance = ay;
48313
+ var fdistance = 1 / distance;
48314
+ var shift = (scale - 1) * distance;
48315
+ var left = -ax - shift;
48316
+ var right = +ax;
48317
+ var top = -ay - shift;
48318
+ var bottom = +ay + shift;
48319
+ var splitX = ay - ax;
48320
+ this.updateQuadBottom(0, 0, right, bottom, right, 0, splitX, 0, left, bottom, fdistance, scale, fx, fy, ax, ay);
48321
+ this.updateQuadTop(4, 6, right, 0, right, top, left, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
48322
+ this.updateTriLeft(8, 12, splitX, 0, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
48323
+ this.pad(11, 15, nv, ni, fdistance);
48324
+ };
48325
+ EShapeRectangleTriangulatedImpl.prototype.updateTriTop = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
48326
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48327
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48328
+ this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48329
+ this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48330
+ this._indices[ii] = iv;
48331
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48332
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48333
+ };
48334
+ EShapeRectangleTriangulatedImpl.prototype.updateTriRight = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
48335
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48336
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48337
+ this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48338
+ this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48339
+ this._indices[ii] = iv;
48340
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48341
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48342
+ };
48343
+ EShapeRectangleTriangulatedImpl.prototype.updateTriBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
48344
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48345
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48346
+ this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48347
+ this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48348
+ this._indices[ii] = iv;
48349
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48350
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48351
+ };
48352
+ EShapeRectangleTriangulatedImpl.prototype.updateTriLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
48353
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48354
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48355
+ this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48356
+ this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48357
+ this._indices[ii] = iv;
48358
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48359
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48360
+ };
48361
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadTop = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
48362
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48363
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48364
+ this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48365
+ this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48366
+ this.updateVertexTop(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
48367
+ this._indices[ii] = iv;
48368
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48369
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48370
+ this._indices[ii + 3] = iv;
48371
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
48372
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
48373
+ };
48374
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadRight = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
48375
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48376
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48377
+ this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48378
+ this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48379
+ this.updateVertexRight(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
48380
+ this._indices[ii] = iv;
48381
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48382
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48383
+ this._indices[ii + 3] = iv;
48384
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
48385
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
48386
+ };
48387
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
48388
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48389
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48390
+ this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48391
+ this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48392
+ this.updateVertexBottom(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
48393
+ this._indices[ii] = iv;
48394
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48395
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48396
+ this._indices[ii + 3] = iv;
48397
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
48398
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
48399
+ };
48400
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
48401
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
48402
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48403
+ this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
48404
+ this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
48405
+ this.updateVertexLeft(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
48406
+ this._indices[ii] = iv;
48407
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
48408
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
48409
+ this._indices[ii + 3] = iv;
48410
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
48411
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
48412
+ };
48413
+ EShapeRectangleTriangulatedImpl.prototype.updateNone = function (fx, fy, ax, ay, scale, nv, ni) {
48414
+ this.updateCellNone(-ax, -ay, +ax, +ay, 0, scale, fx, fy, ax, ay, 0);
48415
+ this.pad(4, 6, nv, ni, 0);
48416
+ };
48417
+ EShapeRectangleTriangulatedImpl.prototype.updateAll0 = function (fx, fy, ax, ay, scale, nv, ni) {
48418
+ var distance = ay;
48419
+ var fdistance = 1 / distance;
48420
+ var shift = (scale - 1) * distance;
48421
+ var outerLeft = -ax - shift;
48422
+ var outerRight = +ax + shift;
48423
+ var outerTop = -ay - shift;
48424
+ var outerBottom = +ay + shift;
48425
+ var innerLeft = -ax + ay;
48426
+ var innerRight = +ax - ay;
48427
+ this.updateQuadTop(0, 0, outerLeft, outerTop, outerRight, outerTop, innerRight, 0, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
48428
+ this.updateTriRight(4, 6, outerRight, outerTop, outerRight, outerBottom, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
48429
+ this.updateQuadBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, innerLeft, 0, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
48430
+ this.updateTriLeft(11, 15, outerLeft, outerBottom, outerLeft, outerTop, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
48431
+ this.pad(14, 18, nv, ni, fdistance);
48432
+ };
48433
+ EShapeRectangleTriangulatedImpl.prototype.updateAll1 = function (fx, fy, ax, ay, scale, nv, ni) {
48434
+ var distance = ax;
48435
+ var fdistance = 1 / distance;
48436
+ var shift = (scale - 1) * distance;
48437
+ var outerLeft = -ax - shift;
48438
+ var outerRight = +ax + shift;
48439
+ var outerTop = -ay - shift;
48440
+ var outerBottom = +ay + shift;
48441
+ var innerTop = -ay + ax;
48442
+ var innerBottom = +ay - ax;
48443
+ this.updateTriTop(0, 0, outerLeft, outerTop, outerRight, outerTop, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
48444
+ this.updateQuadRight(3, 3, outerRight, outerTop, outerRight, outerBottom, 0, innerBottom, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
48445
+ this.updateTriBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
48446
+ this.updateQuadLeft(10, 12, outerLeft, outerBottom, outerLeft, outerTop, 0, innerTop, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
48447
+ this.pad(14, 18, nv, ni, fdistance);
48448
+ };
48449
+ EShapeRectangleTriangulatedImpl.prototype.updateCellNone = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
48450
+ this.updateVertex(iv, x0, y0, 0, 0, 0, fx, fy);
48451
+ this.updateVertex(iv + 1, x1, y0, 0, 0, 0, fx, fy);
48452
+ this.updateVertex(iv + 2, x1, y1, 0, 0, 0, fx, fy);
48453
+ this.updateVertex(iv + 3, x0, y1, 0, 0, 0, fx, fy);
48454
+ var ii = (iv >> 1) * 3;
48455
+ var indices = this._indices;
48456
+ indices[ii++] = iv;
48457
+ indices[ii++] = iv + 1;
48458
+ indices[ii++] = iv + 2;
48459
+ indices[ii++] = iv;
48460
+ indices[ii++] = iv + 2;
48461
+ indices[ii++] = iv + 3;
48462
+ };
48463
+ EShapeRectangleTriangulatedImpl.prototype.updateCellTop = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
48464
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48465
+ this.updateVertexTop(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
48466
+ this.updateVertexTop(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
48467
+ this.updateVertexTop(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
48468
+ var ii = (iv >> 1) * 3;
48469
+ var indices = this._indices;
48470
+ indices[ii++] = iv;
48471
+ indices[ii++] = iv + 1;
48472
+ indices[ii++] = iv + 2;
48473
+ indices[ii++] = iv;
48474
+ indices[ii++] = iv + 2;
48475
+ indices[ii++] = iv + 3;
48476
+ };
48477
+ EShapeRectangleTriangulatedImpl.prototype.updateCellRight = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
48478
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48479
+ this.updateVertexRight(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
48480
+ this.updateVertexRight(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
48481
+ this.updateVertexRight(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
48482
+ var ii = (iv >> 1) * 3;
48483
+ var indices = this._indices;
48484
+ indices[ii++] = iv;
48485
+ indices[ii++] = iv + 1;
48486
+ indices[ii++] = iv + 2;
48487
+ indices[ii++] = iv;
48488
+ indices[ii++] = iv + 2;
48489
+ indices[ii++] = iv + 3;
48490
+ };
48491
+ EShapeRectangleTriangulatedImpl.prototype.updateCellBottom = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
48492
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48493
+ this.updateVertexBottom(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
48494
+ this.updateVertexBottom(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
48495
+ this.updateVertexBottom(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
48496
+ var ii = (iv >> 1) * 3;
48497
+ var indices = this._indices;
48498
+ indices[ii++] = iv;
48499
+ indices[ii++] = iv + 1;
48500
+ indices[ii++] = iv + 2;
48501
+ indices[ii++] = iv;
48502
+ indices[ii++] = iv + 2;
48503
+ indices[ii++] = iv + 3;
48504
+ };
48505
+ EShapeRectangleTriangulatedImpl.prototype.updateCellLeft = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
48506
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
48507
+ this.updateVertexLeft(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
48508
+ this.updateVertexLeft(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
48509
+ this.updateVertexLeft(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
48510
+ var ii = (iv >> 1) * 3;
48511
+ var indices = this._indices;
48512
+ indices[ii++] = iv;
48513
+ indices[ii++] = iv + 1;
48514
+ indices[ii++] = iv + 2;
48515
+ indices[ii++] = iv;
48516
+ indices[ii++] = iv + 2;
48517
+ indices[ii++] = iv + 3;
48518
+ };
48519
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexTop = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
48520
+ this.updateVertex(vertex, x, y, fdistance, x + ax, Math.min(scale, (y + ay) * -fdistance + 1), fx, fy);
48521
+ };
48522
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexRight = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
48523
+ this.updateVertex(vertex, x, y, fdistance, 2 * ax + y + ay, Math.min(scale, (x - ax) * fdistance + 1), fx, fy);
48524
+ };
48525
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexBottom = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
48526
+ this.updateVertex(vertex, x, y, fdistance, 3 * ax + 2 * ay - x, Math.min(scale, (y - ay) * fdistance + 1), fx, fy);
48527
+ };
48528
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexLeft = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
48529
+ this.updateVertex(vertex, x, y, fdistance, 4 * ax + 3 * ay - y, Math.min(scale, (x + ax) * -fdistance + 1), fx, fy);
48530
+ };
48531
+ EShapeRectangleTriangulatedImpl.prototype.updateVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
48532
+ var vertex2 = vertex << 1;
48533
+ this._vertices[vertex2] = x;
48534
+ this._vertices[vertex2 + 1] = y;
48535
+ this._distances[vertex] = distance;
48536
+ this._lengths[vertex] = length;
48537
+ this._clippings[vertex] = clipping;
48538
+ this._uvs[vertex2] = 0.5 * (x * fx + 1);
48539
+ this._uvs[vertex2 + 1] = 0.5 * (y * fy + 1);
48540
+ };
48541
+ return EShapeRectangleTriangulatedImpl;
48542
+ }());
48543
+
48544
+ /*
48545
+ * Copyright (C) 2019 Toshiba Corporation
48546
+ * SPDX-License-Identifier: Apache-2.0
48547
+ */
48548
+ var EShapeRectangle = /** @class */ (function (_super) {
48549
+ __extends(EShapeRectangle, _super);
48550
+ function EShapeRectangle(type) {
48551
+ if (type === void 0) { type = EShapeType.RECTANGLE; }
48552
+ var _this = _super.call(this, type) || this;
48553
+ _this._triangulated = _this.newTriangulated();
48554
+ return _this;
48555
+ }
48556
+ EShapeRectangle.prototype.newTriangulated = function () {
48557
+ return new EShapeRectangleTriangulatedImpl(this);
48558
+ };
48559
+ Object.defineProperty(EShapeRectangle.prototype, "triangulated", {
48560
+ get: function () {
48561
+ return this._triangulated;
48562
+ },
48563
+ enumerable: false,
48564
+ configurable: true
48565
+ });
48566
+ EShapeRectangle.prototype.clone = function () {
48567
+ return new EShapeRectangle(this.type).copy(this);
48568
+ };
48569
+ EShapeRectangle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
48570
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
48571
+ return hitTestRectangle(this, x, y, ax, ay, sw, ss);
48572
+ }
48573
+ return false;
48574
+ };
48575
+ return EShapeRectangle;
48576
+ }(EShapePrimitive));
48577
+
47707
48578
  /*
47708
48579
  * Copyright (C) 2019 Toshiba Corporation
47709
48580
  * SPDX-License-Identifier: Apache-2.0
@@ -47837,7 +48708,7 @@
47837
48708
  * SPDX-License-Identifier: Apache-2.0
47838
48709
  */
47839
48710
  var createLineOfRectanglesUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
47840
- return createLineOfAnyUploaded(buffer, shape, voffset, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, antialiasWeight, BuilderLineOfRectangles);
48711
+ return createLineOfAnyUploaded(buffer, shape, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, ioffset, RECTANGLE_LEGACY_INDEX_COUNT, antialiasWeight, BuilderLineOfRectangles);
47841
48712
  };
47842
48713
 
47843
48714
  /*
@@ -47869,7 +48740,7 @@
47869
48740
  case EShapePointsMarkerType.TRIANGLE:
47870
48741
  return TRIANGLE_VERTEX_COUNT;
47871
48742
  case EShapePointsMarkerType.RECTANGLE:
47872
- return RECTANGLE_VERTEX_COUNT;
48743
+ return RECTANGLE_LEGACY_VERTEX_COUNT;
47873
48744
  }
47874
48745
  return 0;
47875
48746
  };
@@ -47882,7 +48753,7 @@
47882
48753
  case EShapePointsMarkerType.TRIANGLE:
47883
48754
  return TRIANGLE_INDEX_COUNT;
47884
48755
  case EShapePointsMarkerType.RECTANGLE:
47885
- return RECTANGLE_INDEX_COUNT;
48756
+ return RECTANGLE_LEGACY_INDEX_COUNT;
47886
48757
  }
47887
48758
  return 0;
47888
48759
  };
@@ -49957,16 +50828,16 @@
49957
50828
  * Copyright (C) 2019 Toshiba Corporation
49958
50829
  * SPDX-License-Identifier: Apache-2.0
49959
50830
  */
49960
- var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
50831
+ var createRectangleLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
49961
50832
  var tcount = toTextBufferCount(shape);
49962
50833
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
49963
50834
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
49964
- var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
49965
- var icount = RECTANGLE_INDEX_COUNT + ticount;
50835
+ var vcount = RECTANGLE_LEGACY_VERTEX_COUNT + tvcount;
50836
+ var icount = RECTANGLE_LEGACY_INDEX_COUNT + ticount;
49966
50837
  if (buffer.check(voffset, ioffset, vcount, icount)) {
49967
50838
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
49968
- new BuilderRectanglePivoted(buffer, voffset, ioffset),
49969
- new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
50839
+ new BuilderRectangleLegacy(buffer, voffset, ioffset),
50840
+ new BuilderText(buffer, voffset + RECTANGLE_LEGACY_VERTEX_COUNT, ioffset + RECTANGLE_LEGACY_INDEX_COUNT, tvcount, ticount)
49970
50841
  ]).init(shape);
49971
50842
  }
49972
50843
  return null;
@@ -49976,16 +50847,16 @@
49976
50847
  * Copyright (C) 2019 Toshiba Corporation
49977
50848
  * SPDX-License-Identifier: Apache-2.0
49978
50849
  */
49979
- var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
50850
+ var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
49980
50851
  var tcount = toTextBufferCount(shape);
49981
50852
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
49982
50853
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
49983
- var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
49984
- var icount = RECTANGLE_INDEX_COUNT + ticount;
50854
+ var vcount = RECTANGLE_LEGACY_VERTEX_COUNT + tvcount;
50855
+ var icount = RECTANGLE_LEGACY_INDEX_COUNT + ticount;
49985
50856
  if (buffer.check(voffset, ioffset, vcount, icount)) {
49986
50857
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
49987
- new BuilderRectangle(buffer, voffset, ioffset),
49988
- new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
50858
+ new BuilderRectanglePivoted(buffer, voffset, ioffset),
50859
+ new BuilderText(buffer, voffset + RECTANGLE_LEGACY_VERTEX_COUNT, ioffset + RECTANGLE_LEGACY_INDEX_COUNT, tvcount, ticount)
49989
50860
  ]).init(shape);
49990
50861
  }
49991
50862
  return null;
@@ -51714,7 +52585,7 @@
51714
52585
  return false;
51715
52586
  };
51716
52587
  return EShapeLineOfRectangles;
51717
- }(EShapeRectangle));
52588
+ }(EShapeRectangleLegacy));
51718
52589
 
51719
52590
  /*
51720
52591
  * Copyright (C) 2019 Toshiba Corporation
@@ -52051,6 +52922,14 @@
52051
52922
  return shape;
52052
52923
  };
52053
52924
 
52925
+ /*
52926
+ * Copyright (C) 2019 Toshiba Corporation
52927
+ * SPDX-License-Identifier: Apache-2.0
52928
+ */
52929
+ var deserializeRectangleLegacy = function (item, manager, shape) {
52930
+ return deserializeBase(item, manager, shape || new EShapeRectangleLegacy());
52931
+ };
52932
+
52054
52933
  /*
52055
52934
  * Copyright (C) 2019 Toshiba Corporation
52056
52935
  * SPDX-License-Identifier: Apache-2.0
@@ -52404,7 +53283,7 @@
52404
53283
  * SPDX-License-Identifier: Apache-2.0
52405
53284
  */
52406
53285
  var loadShapeImage = function () {
52407
- EShapeUploadeds[EShapeType.IMAGE] = createRectangleUploaded;
53286
+ EShapeUploadeds[EShapeType.IMAGE] = createPolygonUploaded;
52408
53287
  EShapeDeserializers[EShapeType.IMAGE] = deserializeImage;
52409
53288
  };
52410
53289
 
@@ -52507,11 +53386,21 @@
52507
53386
  * SPDX-License-Identifier: Apache-2.0
52508
53387
  */
52509
53388
  var loadShapeRectangle = function () {
52510
- EShapeUploadeds[EShapeType.RECTANGLE] = createRectangleUploaded;
53389
+ EShapeUploadeds[EShapeType.RECTANGLE] = createPolygonUploaded;
52511
53390
  EShapeDeserializers[EShapeType.RECTANGLE] = deserializeRectangle;
52512
53391
  EShapeCapabilities.set(EShapeType.RECTANGLE, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
52513
53392
  };
52514
53393
 
53394
+ /*
53395
+ * Copyright (C) 2019 Toshiba Corporation
53396
+ * SPDX-License-Identifier: Apache-2.0
53397
+ */
53398
+ var loadShapeRectangleLegacy = function () {
53399
+ EShapeUploadeds[EShapeType.RECTANGLE_LEGACY] = createRectangleLegacyUploaded;
53400
+ EShapeDeserializers[EShapeType.RECTANGLE_LEGACY] = deserializeRectangleLegacy;
53401
+ EShapeCapabilities.set(EShapeType.RECTANGLE_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
53402
+ };
53403
+
52515
53404
  /*
52516
53405
  * Copyright (C) 2019 Toshiba Corporation
52517
53406
  * SPDX-License-Identifier: Apache-2.0
@@ -52580,6 +53469,7 @@
52580
53469
  loadShapeLine();
52581
53470
  loadShapeNull();
52582
53471
  loadShapePolygon();
53472
+ loadShapeRectangleLegacy();
52583
53473
  loadShapeRectanglePivoted();
52584
53474
  loadShapeRectangleRounded();
52585
53475
  loadShapeRectangle();
@@ -84371,6 +85261,8 @@
84371
85261
  loadShapeLine: loadShapeLine,
84372
85262
  loadShapeNull: loadShapeNull,
84373
85263
  loadShapePolygon: loadShapePolygon,
85264
+ loadShapeRectangleLegacy: loadShapeRectangleLegacy,
85265
+ loadShapeRectanglePivoted: loadShapeRectanglePivoted,
84374
85266
  loadShapeRectangleRounded: loadShapeRectangleRounded,
84375
85267
  loadShapeRectangle: loadShapeRectangle,
84376
85268
  loadShapeSemicircle: loadShapeSemicircle,
@@ -84422,6 +85314,13 @@
84422
85314
  buildPolygonStepX: buildPolygonStepX,
84423
85315
  buildPolygonStepY: buildPolygonStepY,
84424
85316
  buildPolygonUv: buildPolygonUv,
85317
+ RECTANGLE_LEGACY_VERTEX_COUNT: RECTANGLE_LEGACY_VERTEX_COUNT,
85318
+ RECTANGLE_LEGACY_INDEX_COUNT: RECTANGLE_LEGACY_INDEX_COUNT,
85319
+ RECTANGLE_LEGACY_WORLD_SIZE: RECTANGLE_LEGACY_WORLD_SIZE,
85320
+ buildRectangleLegacyIndex: buildRectangleLegacyIndex,
85321
+ buildRectangleLegacyVertex: buildRectangleLegacyVertex,
85322
+ buildRectangleLegacyStep: buildRectangleLegacyStep,
85323
+ buildRectangleLegacyUv: buildRectangleLegacyUv,
84425
85324
  RECTANGLE_ROUNDED_VERTEX_COUNT: RECTANGLE_ROUNDED_VERTEX_COUNT,
84426
85325
  RECTANGLE_ROUNDED_INDEX_COUNT: RECTANGLE_ROUNDED_INDEX_COUNT,
84427
85326
  RECTANGLE_ROUNDED_WORLD_SIZE: RECTANGLE_ROUNDED_WORLD_SIZE,
@@ -84429,13 +85328,13 @@
84429
85328
  buildRectangleRoundedVertex: buildRectangleRoundedVertex,
84430
85329
  buildRectangleRoundedStep: buildRectangleRoundedStep,
84431
85330
  buildRectangleRoundedUv: buildRectangleRoundedUv,
84432
- RECTANGLE_VERTEX_COUNT: RECTANGLE_VERTEX_COUNT,
84433
- RECTANGLE_INDEX_COUNT: RECTANGLE_INDEX_COUNT,
84434
- RECTANGLE_WORLD_SIZE: RECTANGLE_WORLD_SIZE,
84435
- buildRectangleIndex: buildRectangleIndex,
84436
- buildRectangleVertex: buildRectangleVertex,
84437
- buildRectangleStep: buildRectangleStep,
84438
- buildRectangleUv: buildRectangleUv,
85331
+ buildRectangleIndex: buildRectangleLegacyIndex,
85332
+ buildRectangleStep: buildRectangleLegacyStep,
85333
+ buildRectangleUv: buildRectangleLegacyUv,
85334
+ buildRectangleVertex: buildRectangleLegacyVertex,
85335
+ RECTANGLE_INDEX_COUNT: RECTANGLE_LEGACY_INDEX_COUNT,
85336
+ RECTANGLE_VERTEX_COUNT: RECTANGLE_LEGACY_VERTEX_COUNT,
85337
+ RECTANGLE_WORLD_SIZE: RECTANGLE_LEGACY_WORLD_SIZE,
84439
85338
  SEMICIRCLE_VERTEX_COUNT: SEMICIRCLE_VERTEX_COUNT,
84440
85339
  SEMICIRCLE_INDEX_COUNT: SEMICIRCLE_INDEX_COUNT,
84441
85340
  SEMICIRCLE_WORLD_SIZE: SEMICIRCLE_WORLD_SIZE,
@@ -84490,9 +85389,10 @@
84490
85389
  BuilderMarkerTriangle: BuilderMarkerTriangle,
84491
85390
  BuilderNull: BuilderNull,
84492
85391
  BuilderPolygon: BuilderPolygon,
85392
+ BuilderRectangleLegacy: BuilderRectangleLegacy,
84493
85393
  BuilderRectanglePivoted: BuilderRectanglePivoted,
84494
85394
  BuilderRectangleRounded: BuilderRectangleRounded,
84495
- BuilderRectangle: BuilderRectangle,
85395
+ BuilderRectangle: BuilderRectangleLegacy,
84496
85396
  BuilderSemicircle: BuilderSemicircle,
84497
85397
  BuilderText: BuilderText,
84498
85398
  BuilderTriangleRounded: BuilderTriangleRounded,
@@ -84526,9 +85426,10 @@
84526
85426
  createNullUploaded: createNullUploaded,
84527
85427
  createPolygonUploaded: createPolygonUploaded,
84528
85428
  createPolygon: createPolygon,
85429
+ createRectangleLegacyUploaded: createRectangleLegacyUploaded,
84529
85430
  createRectanglePivotedUploaded: createRectanglePivotedUploaded,
84530
85431
  createRectangleRoundedUploaded: createRectangleRoundedUploaded,
84531
- createRectangleUploaded: createRectangleUploaded,
85432
+ createRectangleUploaded: createRectangleLegacyUploaded,
84532
85433
  createSemicircleUploaded: createSemicircleUploaded,
84533
85434
  createTriangleRoundedUploaded: createTriangleRoundedUploaded,
84534
85435
  createTriangleUploaded: createTriangleUploaded,
@@ -84558,6 +85459,7 @@
84558
85459
  deserializeLine: deserializeLine,
84559
85460
  deserializeNull: deserializeNull,
84560
85461
  deserializePolygon: deserializePolygon,
85462
+ deserializeRectangleLegacy: deserializeRectangleLegacy,
84561
85463
  deserializeRectanglePivoted: deserializeRectanglePivoted,
84562
85464
  deserializeRectangleRounded: deserializeRectangleRounded,
84563
85465
  deserializeRectangle: deserializeRectangle,
@@ -84623,8 +85525,10 @@
84623
85525
  EShapePolygonTriangulatedImpl: EShapePolygonTriangulatedImpl,
84624
85526
  EShapePolygon: EShapePolygon,
84625
85527
  EShapePrimitive: EShapePrimitive,
85528
+ EShapeRectangleLegacy: EShapeRectangleLegacy,
84626
85529
  EShapeRectanglePivoted: EShapeRectanglePivoted,
84627
85530
  EShapeRectangleRounded: EShapeRectangleRounded,
85531
+ EShapeRectangleTriangulatedImpl: EShapeRectangleTriangulatedImpl,
84628
85532
  EShapeRectangle: EShapeRectangle,
84629
85533
  EShapeSemicircle: EShapeSemicircle,
84630
85534
  EShapeStrokeImpl: EShapeStrokeImpl,