@wcardinal/wcardinal-ui 0.467.1 → 0.469.0-beta.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 (182) hide show
  1. package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +1 -1
  2. package/dist/types/wcardinal/ui/shape/e-shape-capability.d.ts +4 -0
  3. package/dist/types/wcardinal/ui/shape/e-shape-defaults.d.ts +2 -0
  4. package/dist/types/wcardinal/ui/shape/e-shape-type.d.ts +3 -0
  5. package/dist/types/wcardinal/ui/shape/e-shape.d.ts +1 -0
  6. package/dist/types/wcardinal/ui/shape/load/index.d.ts +3 -0
  7. package/dist/types/wcardinal/ui/shape/load/load-shape-fan.d.ts +1 -0
  8. package/dist/types/wcardinal/ui/shape/load/load-shape-semicircle-legacy.d.ts +1 -0
  9. package/dist/types/wcardinal/ui/shape/load/load-shape-triangle-rounded-legacy.d.ts +1 -0
  10. package/dist/types/wcardinal/ui/shape/variant/build-semicircle-legacy.d.ts +9 -0
  11. package/dist/types/wcardinal/ui/shape/variant/build-semicircle.d.ts +1 -9
  12. package/dist/types/wcardinal/ui/shape/variant/build-triangle-rounded-legacy.d.ts +10 -0
  13. package/dist/types/wcardinal/ui/shape/variant/build-triangle-rounded.d.ts +1 -10
  14. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle-legacy.d.ts +10 -0
  15. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +1 -10
  16. package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded-legacy.d.ts +12 -0
  17. package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +1 -12
  18. package/dist/types/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.d.ts +4 -0
  19. package/dist/types/wcardinal/ui/shape/variant/create-semicircle-uploaded.d.ts +1 -4
  20. package/dist/types/wcardinal/ui/shape/variant/create-triangle-rounded-legacy-uploaded.d.ts +4 -0
  21. package/dist/types/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.d.ts +1 -4
  22. package/dist/types/wcardinal/ui/shape/variant/deserialize-fan.d.ts +4 -0
  23. package/dist/types/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.d.ts +4 -0
  24. package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded-legacy.d.ts +4 -0
  25. package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +1 -0
  26. package/dist/types/wcardinal/ui/shape/variant/e-shape-button.d.ts +2 -1
  27. package/dist/types/wcardinal/ui/shape/variant/e-shape-circle-triangulated-impl.d.ts +2 -0
  28. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.d.ts +200 -0
  29. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan-triangulated.d.ts +3 -0
  30. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan.d.ts +26 -0
  31. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +2 -0
  32. package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +2 -0
  33. package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-triangle-roundeds.d.ts +2 -2
  34. package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +2 -0
  35. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-rounded-triangulated-impl.d.ts +18 -18
  36. package/dist/types/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.d.ts +10 -0
  37. package/dist/types/wcardinal/ui/shape/variant/e-shape-semicircle.d.ts +9 -2
  38. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-rounded-legacy.d.ts +7 -0
  39. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated-impl.d.ts +42 -0
  40. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated.d.ts +3 -0
  41. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-rounded.d.ts +4 -0
  42. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.d.ts +1 -1
  43. package/dist/types/wcardinal/ui/shape/variant/hit-test-fan.d.ts +2 -0
  44. package/dist/types/wcardinal/ui/shape/variant/hit-test-triangle-rounded.d.ts +1 -0
  45. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +18 -0
  46. package/dist/types/wcardinal/ui/shape/variant/to-fan-angle-centric.d.ts +4 -0
  47. package/dist/types/wcardinal/ui/shape/variant/to-fan-angle-eccentric.d.ts +5 -0
  48. package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-shape.d.ts +1 -0
  49. package/dist/types/wcardinal/ui/theme/white/e-theme-white-shape.d.ts +1 -0
  50. package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/e-shape-capability.js +6 -1
  52. package/dist/wcardinal/ui/shape/e-shape-capability.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/e-shape-defaults.js +7 -0
  54. package/dist/wcardinal/ui/shape/e-shape-defaults.js.map +1 -1
  55. package/dist/wcardinal/ui/shape/e-shape-type.js +3 -0
  56. package/dist/wcardinal/ui/shape/e-shape-type.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
  58. package/dist/wcardinal/ui/shape/load/index.js +3 -0
  59. package/dist/wcardinal/ui/shape/load/index.js.map +1 -1
  60. package/dist/wcardinal/ui/shape/load/load-shape-all.js +6 -0
  61. package/dist/wcardinal/ui/shape/load/load-shape-all.js.map +1 -1
  62. package/dist/wcardinal/ui/shape/load/load-shape-fan.js +17 -0
  63. package/dist/wcardinal/ui/shape/load/load-shape-fan.js.map +1 -0
  64. package/dist/wcardinal/ui/shape/load/load-shape-semicircle-legacy.js +14 -0
  65. package/dist/wcardinal/ui/shape/load/load-shape-semicircle-legacy.js.map +1 -0
  66. package/dist/wcardinal/ui/shape/load/load-shape-semicircle.js +5 -2
  67. package/dist/wcardinal/ui/shape/load/load-shape-semicircle.js.map +1 -1
  68. package/dist/wcardinal/ui/shape/load/load-shape-triangle-rounded-legacy.js +17 -0
  69. package/dist/wcardinal/ui/shape/load/load-shape-triangle-rounded-legacy.js.map +1 -0
  70. package/dist/wcardinal/ui/shape/load/load-shape-triangle-rounded.js +2 -2
  71. package/dist/wcardinal/ui/shape/load/load-shape-triangle-rounded.js.map +1 -1
  72. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js +4 -0
  73. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js.map +1 -1
  74. package/dist/wcardinal/ui/shape/variant/build-rectangle-rounded-legacy.js +20 -19
  75. package/dist/wcardinal/ui/shape/variant/build-rectangle-rounded-legacy.js.map +1 -1
  76. package/dist/wcardinal/ui/shape/variant/build-semicircle-legacy.js +137 -0
  77. package/dist/wcardinal/ui/shape/variant/build-semicircle-legacy.js.map +1 -0
  78. package/dist/wcardinal/ui/shape/variant/build-semicircle.js +1 -139
  79. package/dist/wcardinal/ui/shape/variant/build-semicircle.js.map +1 -1
  80. package/dist/wcardinal/ui/shape/variant/build-triangle-legacy.js +4 -0
  81. package/dist/wcardinal/ui/shape/variant/build-triangle-legacy.js.map +1 -1
  82. package/dist/wcardinal/ui/shape/variant/build-triangle-rounded-legacy.js +538 -0
  83. package/dist/wcardinal/ui/shape/variant/build-triangle-rounded-legacy.js.map +1 -0
  84. package/dist/wcardinal/ui/shape/variant/build-triangle-rounded.js +5 -536
  85. package/dist/wcardinal/ui/shape/variant/build-triangle-rounded.js.map +1 -1
  86. package/dist/wcardinal/ui/shape/variant/builder-semicircle-legacy.js +76 -0
  87. package/dist/wcardinal/ui/shape/variant/builder-semicircle-legacy.js.map +1 -0
  88. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +1 -71
  89. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
  90. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded-legacy.js +84 -0
  91. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded-legacy.js.map +1 -0
  92. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +1 -79
  93. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
  94. package/dist/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.js +24 -0
  95. package/dist/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.js.map +1 -0
  96. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +1 -19
  97. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
  98. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-legacy-uploaded.js +24 -0
  99. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-legacy-uploaded.js.map +1 -0
  100. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js +1 -19
  101. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js.map +1 -1
  102. package/dist/wcardinal/ui/shape/variant/deserialize-fan.js +12 -0
  103. package/dist/wcardinal/ui/shape/variant/deserialize-fan.js.map +1 -0
  104. package/dist/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.js +10 -0
  105. package/dist/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.js.map +1 -0
  106. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded-legacy.js +10 -0
  107. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded-legacy.js.map +1 -0
  108. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  109. package/dist/wcardinal/ui/shape/variant/e-shape-button.js.map +1 -1
  110. package/dist/wcardinal/ui/shape/variant/e-shape-circle-triangulated-impl.js +134 -199
  111. package/dist/wcardinal/ui/shape/variant/e-shape-circle-triangulated-impl.js.map +1 -1
  112. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +0 -2
  113. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
  114. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-acceptor-edge.js +0 -2
  115. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-acceptor-edge.js.map +1 -1
  116. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.js +724 -0
  117. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.js.map +1 -0
  118. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated.js +6 -0
  119. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated.js.map +1 -0
  120. package/dist/wcardinal/ui/shape/variant/e-shape-fan.js +85 -0
  121. package/dist/wcardinal/ui/shape/variant/e-shape-fan.js.map +1 -0
  122. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +10 -0
  123. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
  124. package/dist/wcardinal/ui/shape/variant/e-shape-group.js +18 -1
  125. package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
  126. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-triangle-roundeds.js +2 -2
  127. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-triangle-roundeds.js.map +1 -1
  128. package/dist/wcardinal/ui/shape/variant/e-shape-polygon.js +3 -4
  129. package/dist/wcardinal/ui/shape/variant/e-shape-polygon.js.map +1 -1
  130. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +10 -0
  131. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
  132. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-rounded-triangulated-impl.js +62 -64
  133. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-rounded-triangulated-impl.js.map +1 -1
  134. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.js +33 -0
  135. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.js.map +1 -0
  136. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle.js +36 -6
  137. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle.js.map +1 -1
  138. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-legacy.js +27 -0
  139. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-legacy.js.map +1 -0
  140. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated-impl.js +437 -0
  141. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated-impl.js.map +1 -0
  142. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated.js +6 -0
  143. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded-triangulated.js.map +1 -0
  144. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded.js +15 -2
  145. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-rounded.js.map +1 -1
  146. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.js +31 -30
  147. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.js.map +1 -1
  148. package/dist/wcardinal/ui/shape/variant/hit-test-fan.js +79 -0
  149. package/dist/wcardinal/ui/shape/variant/hit-test-fan.js.map +1 -0
  150. package/dist/wcardinal/ui/shape/variant/hit-test-triangle-rounded.js +71 -11
  151. package/dist/wcardinal/ui/shape/variant/hit-test-triangle-rounded.js.map +1 -1
  152. package/dist/wcardinal/ui/shape/variant/index.js +18 -0
  153. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  154. package/dist/wcardinal/ui/shape/variant/to-fan-angle-centric.js +11 -0
  155. package/dist/wcardinal/ui/shape/variant/to-fan-angle-centric.js.map +1 -0
  156. package/dist/wcardinal/ui/shape/variant/to-fan-angle-eccentric.js +12 -0
  157. package/dist/wcardinal/ui/shape/variant/to-fan-angle-eccentric.js.map +1 -0
  158. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape.js +3 -0
  159. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape.js.map +1 -1
  160. package/dist/wcardinal/ui/theme/white/e-theme-white-shape.js +3 -0
  161. package/dist/wcardinal/ui/theme/white/e-theme-white-shape.js.map +1 -1
  162. package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
  163. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  164. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  165. package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
  166. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  167. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  168. package/dist/wcardinal-ui-theme-dark.js +4 -1
  169. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  170. package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
  171. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  172. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  173. package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
  174. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  175. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  176. package/dist/wcardinal-ui-theme-white.js +4 -1
  177. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  178. package/dist/wcardinal-ui.cjs.js +2050 -487
  179. package/dist/wcardinal-ui.js +2044 -487
  180. package/dist/wcardinal-ui.min.js +2 -2
  181. package/dist/wcardinal-ui.min.js.map +1 -1
  182. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.1
2
+ Winter Cardinal UI v0.469.0-beta.0
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -61,6 +61,9 @@ var EShapeType = {
61
61
  RECTANGLE_LEGACY: 28,
62
62
  TRIANGLE_LEGACY: 29,
63
63
  RECTANGLE_ROUNDED_LEGACY: 30,
64
+ TRIANGLE_ROUNDED_LEGACY: 31,
65
+ FAN: 32,
66
+ SEMICIRCLE_LEGACY: 33,
64
67
  EXTENSION: 1000
65
68
  };
66
69
 
@@ -1788,6 +1791,13 @@ var EShapeDefaults = /** @class */ (function () {
1788
1791
  enumerable: false,
1789
1792
  configurable: true
1790
1793
  });
1794
+ Object.defineProperty(EShapeDefaults, "ANGLE", {
1795
+ get: function () {
1796
+ return this.THEME.getAngle();
1797
+ },
1798
+ enumerable: false,
1799
+ configurable: true
1800
+ });
1791
1801
  Object.defineProperty(EShapeDefaults, "SIZE_X", {
1792
1802
  get: function () {
1793
1803
  return this.THEME.getSizeX();
@@ -4705,6 +4715,7 @@ var DATA_MAPPING = 0x400000;
4705
4715
  var LINE = 0x800000;
4706
4716
  var LINE_TAIL = 0x1000000;
4707
4717
  var LINE_HEAD = 0x2000000;
4718
+ var ANGLE = 0x4000000;
4708
4719
  var COORDINATE = POSITION | WIDTH$1 | HEIGHT$1 | ROTATION$1 | SKEW;
4709
4720
  var SHAPE = REPLACING | GROUPING | FILL$1 | STROKE$1 | STROKE_STYLE | LINE | LINE_TAIL | LINE_HEAD;
4710
4721
  var LAYER = ORDER_IN_LAYER;
@@ -4713,7 +4724,7 @@ var GROUP = PRIMITIVE | UNGROUPING;
4713
4724
  var EMBEDDED = ID | COORDINATE | REPLACING | GROUPING | TEXT$2 | DATA | ACTION | LAYER | DATA_MAPPING;
4714
4725
  var EMBEDDED_ACCEPTOR_EDGE = ID | COORDINATE | REPLACING | FILL$1 | STROKE$1 | STROKE_STYLE_SCALING | TEXT$2 | TEXTURE | DATA | ACTION | CURSOR$1 | LAYER;
4715
4726
  var CONNECTOR = ID | SHAPE | TEXT$2 | TEXTURE | DATA | ACTION | CURSOR$1 | LAYER | CHILDREN$1;
4716
- var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
4727
+ var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | ANGLE | DATA_MAPPING | UNGROUPING;
4717
4728
  var EShapeCapability = {
4718
4729
  NONE: NONE,
4719
4730
  /**
@@ -4782,6 +4793,10 @@ var EShapeCapability = {
4782
4793
  * Allows shape border radiuses to be modified.
4783
4794
  */
4784
4795
  BORDER_RADIUS: BORDER_RADIUS,
4796
+ /**
4797
+ * Allows shape angles to be modified.
4798
+ */
4799
+ ANGLE: ANGLE,
4785
4800
  /**
4786
4801
  * Allows shape texts to be modified.
4787
4802
  */
@@ -8435,6 +8450,16 @@ var EShapePrimitive = /** @class */ (function (_super) {
8435
8450
  enumerable: false,
8436
8451
  configurable: true
8437
8452
  });
8453
+ Object.defineProperty(EShapePrimitive.prototype, "angle", {
8454
+ get: function () {
8455
+ return 0;
8456
+ },
8457
+ set: function (angle) {
8458
+ // DO NOTHING
8459
+ },
8460
+ enumerable: false,
8461
+ configurable: true
8462
+ });
8438
8463
  Object.defineProperty(EShapePrimitive.prototype, "image", {
8439
8464
  get: function () {
8440
8465
  return this._image;
@@ -11680,7 +11705,6 @@ var EShapeEmbeddedAcceptorEdge = /** @class */ (function (_super) {
11680
11705
  return new EShapeEmbeddedAcceptorEdge(this.type).copy(this);
11681
11706
  };
11682
11707
  EShapeEmbeddedAcceptorEdge.prototype.copy = function (source, part) {
11683
- if (part === void 0) { part = EShapeCopyPart.ALL; }
11684
11708
  _super.prototype.copy.call(this, source, part);
11685
11709
  if (source instanceof EShapeEmbeddedAcceptorEdge) {
11686
11710
  this._subtype = source.subtype;
@@ -12483,6 +12507,16 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
12483
12507
  enumerable: false,
12484
12508
  configurable: true
12485
12509
  });
12510
+ Object.defineProperty(EShapeGroupViewer.prototype, "angle", {
12511
+ get: function () {
12512
+ return 0;
12513
+ },
12514
+ set: function (angle) {
12515
+ // DO NOTHING
12516
+ },
12517
+ enumerable: false,
12518
+ configurable: true
12519
+ });
12486
12520
  Object.defineProperty(EShapeGroupViewer.prototype, "image", {
12487
12521
  get: function () {
12488
12522
  return undefined;
@@ -15310,7 +15344,6 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
15310
15344
  values.length = bodyValuesLength + 4;
15311
15345
  };
15312
15346
  EShapeConnectorLine.prototype.copy = function (source, part) {
15313
- if (part === void 0) { part = EShapeCopyPart.ALL; }
15314
15347
  this.lock(EShapeLockPart.ALL);
15315
15348
  _super.prototype.copy.call(this, source, part);
15316
15349
  if (source instanceof EShapeConnectorLine) {
@@ -32549,6 +32582,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32549
32582
  this._nvertices = 0;
32550
32583
  this._distances = [];
32551
32584
  this._lengths = [];
32585
+ this._lengthShifts = [];
32552
32586
  this._clippings = [];
32553
32587
  this._uvs = [];
32554
32588
  this._indices = [];
@@ -32675,7 +32709,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32675
32709
  boundary[2] = +ax;
32676
32710
  boundary[3] = +ay;
32677
32711
  // # of vertices and # of indices
32678
- var nv = 3 * n - 3;
32712
+ var nv = 4 * n - 4;
32679
32713
  var ni = 2 * n - 4;
32680
32714
  this._nvertices = nv;
32681
32715
  this._nindices = ni;
@@ -32740,83 +32774,56 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32740
32774
  var dangle = (2 * Math.PI) / n;
32741
32775
  var c = Math.cos(dangle);
32742
32776
  var s = Math.sin(dangle);
32743
- // First Edge
32744
- var x0 = 0;
32745
- var y0 = sizeY;
32746
- var u = -s;
32747
- var v = c;
32748
- var su = scale * u;
32749
- var sv = scale * v;
32750
- var x1 = u * sizeX;
32751
- var y1 = v * sizeY;
32752
- var dx = 0.5 * (x1 + x0) - 0;
32753
- var dy = 0.5 * (y1 + y0) - 0;
32754
- var fdistance = 1 / Math.sqrt(dx * dx + dy * dy);
32755
- var lx = x1 - x0;
32756
- var ly = y1 - y0;
32757
- var dl = Math.sqrt(lx * lx + ly * ly);
32758
- var l1 = dl;
32759
- var l2 = 0.5 * dl;
32760
- vertices[0] = 0;
32761
- vertices[1] = scale * sizeY;
32762
- vertices[2] = su * sizeX;
32763
- vertices[3] = sv * sizeY;
32764
- vertices[4] = 0;
32765
- vertices[5] = 0;
32766
- distances[0] = fdistance;
32767
- distances[1] = fdistance;
32768
- distances[2] = fdistance;
32769
- clippings[0] = scale;
32770
- clippings[1] = scale;
32771
- clippings[2] = 0;
32772
- lengths[0] = 0;
32773
- lengths[1] = l1;
32774
- lengths[2] = l2;
32775
- uvs[0] = 0.5;
32776
- uvs[1] = 0.5 * (scale + 1);
32777
- uvs[2] = 0.5 * (su + 1);
32778
- uvs[3] = 0.5 * (sv + 1);
32779
- uvs[4] = 0.5;
32780
- uvs[5] = 0.5;
32781
- indices[0] = 0;
32782
- indices[1] = 1;
32783
- indices[2] = 2;
32784
- // The Other Edges
32785
- var iv1 = 3;
32786
- var iv2 = 6;
32787
- var ii = 3;
32788
- for (var i = 2; i <= n; ++i) {
32789
- var un = c * u - s * v;
32790
- var vn = s * u + c * v;
32791
- u = un;
32792
- v = vn;
32793
- su = scale * u;
32794
- sv = scale * v;
32795
- l1 += dl;
32796
- l2 += dl;
32797
- vertices[iv2 + 0] = su * sizeX;
32798
- vertices[iv2 + 1] = sv * sizeY;
32799
- vertices[iv2 + 2] = 0;
32800
- vertices[iv2 + 3] = 0;
32801
- distances[iv1 + 0] = fdistance;
32802
- distances[iv1 + 1] = fdistance;
32803
- clippings[iv1 + 0] = scale;
32804
- clippings[iv1 + 1] = 0;
32805
- lengths[iv1 + 0] = l1;
32806
- lengths[iv1 + 1] = l2;
32807
- uvs[iv2 + 0] = 0.5 * (su + 1);
32808
- uvs[iv2 + 1] = 0.5 * (sv + 1);
32809
- uvs[iv2 + 2] = 0.5;
32810
- uvs[iv2 + 3] = 0.5;
32811
- indices[ii + 0] = iv1 - 2;
32812
- indices[ii + 1] = iv1;
32813
- indices[ii + 2] = iv1 + 1;
32814
- iv1 += 2;
32815
- iv2 += 4;
32777
+ // Edge length and apothem of the unscaled polygon
32778
+ var ex = -s * sizeX;
32779
+ var ey = (c - 1) * sizeY;
32780
+ var dl = Math.sqrt(ex * ex + ey * ey);
32781
+ var mx = 0.5 * ex;
32782
+ var my = 0.5 * (c + 1) * sizeY;
32783
+ var fdistance = 1 / Math.sqrt(mx * mx + my * my);
32784
+ // Half edge length at clipping = scale
32785
+ var hl = 0.5 * scale * dl;
32786
+ // Each triangle owns its vertices so that the lengths are exact at clipping = 1 on both sides.
32787
+ var u0 = 0;
32788
+ var v0 = scale;
32789
+ var iv = 0;
32790
+ var ii = 0;
32791
+ for (var i = 0; i < n; ++i) {
32792
+ var u1 = c * u0 - s * v0;
32793
+ var v1 = s * u0 + c * v0;
32794
+ var lm = (i + 0.5) * dl;
32795
+ var iv2 = iv << 1;
32796
+ vertices[iv2 + 0] = u0 * sizeX;
32797
+ vertices[iv2 + 1] = v0 * sizeY;
32798
+ vertices[iv2 + 2] = u1 * sizeX;
32799
+ vertices[iv2 + 3] = v1 * sizeY;
32800
+ vertices[iv2 + 4] = 0;
32801
+ vertices[iv2 + 5] = 0;
32802
+ distances[iv + 0] = fdistance;
32803
+ distances[iv + 1] = fdistance;
32804
+ distances[iv + 2] = fdistance;
32805
+ clippings[iv + 0] = scale;
32806
+ clippings[iv + 1] = scale;
32807
+ clippings[iv + 2] = 0;
32808
+ lengths[iv + 0] = lm - hl;
32809
+ lengths[iv + 1] = lm + hl;
32810
+ lengths[iv + 2] = lm;
32811
+ uvs[iv2 + 0] = 0.5 * (u0 + 1);
32812
+ uvs[iv2 + 1] = 0.5 * (v0 + 1);
32813
+ uvs[iv2 + 2] = 0.5 * (u1 + 1);
32814
+ uvs[iv2 + 3] = 0.5 * (v1 + 1);
32815
+ uvs[iv2 + 4] = 0.5;
32816
+ uvs[iv2 + 5] = 0.5;
32817
+ indices[ii + 0] = iv + 0;
32818
+ indices[ii + 1] = iv + 1;
32819
+ indices[ii + 2] = iv + 2;
32820
+ u0 = u1;
32821
+ v0 = v1;
32822
+ iv += 3;
32816
32823
  ii += 3;
32817
32824
  }
32818
32825
  // Degenerate triangles keep the buffer sizes consistent with elongated circles.
32819
- this.pad(iv1, ii, nv, ni, fdistance);
32826
+ this.pad(iv, ii, nv, ni, fdistance);
32820
32827
  };
32821
32828
  /**
32822
32829
  * Precondition: sizeX !== 0 && sizeY !== 0 && abs(sizeY) < abs(sizeX)
@@ -32831,8 +32838,10 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32831
32838
  var dangle = (2 * Math.PI) / n;
32832
32839
  var c = Math.cos(dangle);
32833
32840
  var s = Math.sin(dangle);
32834
- var fx = sizeX / sizeY;
32835
- var fy = sizeY / sizeX;
32841
+ var fx = 1 / sizeX;
32842
+ var fy = 1 / sizeY;
32843
+ var fxy = sizeX * fy;
32844
+ var fyx = sizeY * fx;
32836
32845
  var ileft = n >> 2;
32837
32846
  var iright = ileft * 3;
32838
32847
  var ppx = sizeX * s;
@@ -32841,20 +32850,12 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32841
32850
  var py = sizeY;
32842
32851
  var nx = -sizeX * s;
32843
32852
  var ny = sizeY * c;
32844
- var nnx = nx * c - ny * fx * s;
32845
- var nny = nx * fy * s + ny * c;
32853
+ var nnx = nx * c - ny * fxy * s;
32854
+ var nny = nx * fyx * s + ny * c;
32846
32855
  var sx = this.toSkeletonX(ppx, ppy, px, py, nx, ny);
32847
- vertices[0] = 0;
32848
- vertices[1] = sizeY;
32849
- clippings[0] = -1;
32850
- distances[0] = sx;
32851
- lengths[0] = 0;
32852
- uvs[0] = 0.5;
32853
- uvs[1] = 1;
32854
- var iv = 1;
32856
+ var iv = 0;
32855
32857
  var ii = 0;
32856
- var length = 0;
32857
- var current = 0;
32858
+ var l = 0;
32858
32859
  var maxDistance = 0;
32859
32860
  for (var i = 0; i < n; ++i) {
32860
32861
  var inext = (i + 1) % n;
@@ -32870,59 +32871,38 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32870
32871
  var dy = ny - py;
32871
32872
  var dl = Math.sqrt(dx * dx + dy * dy);
32872
32873
  var fl = 1 / dl;
32873
- var nlength = length + dl;
32874
- var iv1 = iv++;
32875
- var iv2 = iv1 << 1;
32876
- var niv1 = iv++;
32877
- var niv2 = niv1 << 1;
32878
- var ndistance = Math.abs(-dx * py - dy * (nsx - px)) * fl;
32879
- maxDistance = Math.max(maxDistance, ndistance);
32880
- vertices[iv2 + 0] = nx;
32881
- vertices[iv2 + 1] = ny;
32882
- clippings[iv1] = -1 - ndistance;
32883
- distances[iv1] = nsx;
32884
- lengths[iv1] = nlength;
32885
- uvs[iv2 + 0] = 0.5 * (nx / sizeX + 1);
32886
- uvs[iv2 + 1] = 0.5 * (ny / sizeY + 1);
32887
- vertices[niv2 + 0] = nsx;
32888
- vertices[niv2 + 1] = 0;
32889
- clippings[niv1] = ndistance;
32890
- distances[niv1] = 0;
32891
- lengths[niv1] = length + ((nsx - px) * dx - py * dy) * fl;
32892
- uvs[niv2] = 0.5 * (nsx / sizeX + 1);
32893
- uvs[niv2 + 1] = 0.5;
32894
- indices[ii++] = current;
32895
- indices[ii++] = iv1;
32896
- indices[ii++] = niv1;
32897
- distances[current] = sx;
32898
- if (sx === nsx) {
32899
- clippings[current] = -1 - ndistance;
32900
- }
32901
- else {
32902
- var mdistance = Math.abs(-dx * py - dy * (sx - px)) * fl;
32903
- maxDistance = Math.max(maxDistance, mdistance);
32904
- clippings[current] = -1 - mdistance;
32905
- var miv1 = iv++;
32906
- var miv2 = miv1 << 1;
32907
- vertices[miv2] = sx;
32908
- vertices[miv2 + 1] = 0;
32909
- clippings[miv1] = mdistance;
32910
- distances[miv1] = 0;
32911
- lengths[miv1] = length + ((sx - px) * dx - py * dy) * fl;
32912
- uvs[miv2] = 0.5 * (sx / sizeX + 1);
32913
- uvs[miv2 + 1] = 0.5;
32914
- indices[ii++] = current;
32915
- indices[ii++] = niv1;
32916
- indices[ii++] = miv1;
32917
- }
32918
- current = iv1;
32919
- length = nlength;
32874
+ var nl = l + dl;
32875
+ var nd = Math.abs(-dx * py - dy * (nsx - px)) * fl;
32876
+ var md = sx === nsx ? nd : Math.abs(-dx * py - dy * (sx - px)) * fl;
32877
+ maxDistance = Math.max(maxDistance, nd, md);
32878
+ // Each edge owns its vertices so that the lengths are exact at clipping = 1 on both sides.
32879
+ var iva = iv++;
32880
+ var ivb = iv++;
32881
+ var ivn = iv++;
32882
+ var ls0 = ((px - sx) * dx + py * dy) * fl;
32883
+ var ls1 = ((nx - nsx) * dx + ny * dy) * fl;
32884
+ var ls2 = ((nsx - px) * dx - py * dy) * fl;
32885
+ this.writeVertex(iva, px, py, fx, fy, sx, l, -1 - md, ls0);
32886
+ this.writeVertex(ivb, nx, ny, fx, fy, nsx, nl, -1 - nd, ls1);
32887
+ this.writeVertex(ivn, nsx, 0, fx, fy, 0, l + ls2, nd, 0);
32888
+ indices[ii++] = iva;
32889
+ indices[ii++] = ivb;
32890
+ indices[ii++] = ivn;
32891
+ if (sx !== nsx) {
32892
+ var ivm = iv++;
32893
+ var ls3 = ((sx - px) * dx - py * dy) * fl;
32894
+ this.writeVertex(ivm, sx, 0, fx, fy, 0, l + ls3, md, 0);
32895
+ indices[ii++] = iva;
32896
+ indices[ii++] = ivn;
32897
+ indices[ii++] = ivm;
32898
+ }
32899
+ l = nl;
32920
32900
  px = nx;
32921
32901
  py = ny;
32922
32902
  nx = nnx;
32923
32903
  ny = nny;
32924
- nnx = c * nx - s * ny * fx;
32925
- nny = s * nx * fy + c * ny;
32904
+ nnx = c * nx - s * ny * fxy;
32905
+ nny = s * nx * fyx + c * ny;
32926
32906
  sx = nsx;
32927
32907
  }
32928
32908
  var fdistance = 0;
@@ -32930,6 +32910,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32930
32910
  fdistance = 1 / maxDistance;
32931
32911
  }
32932
32912
  var shift = (scale - 1) * maxDistance;
32913
+ var lengthShifts = this._lengthShifts;
32933
32914
  for (var i = 0; i < iv; ++i) {
32934
32915
  var clipping = clippings[i];
32935
32916
  if (0 <= clipping) {
@@ -32942,6 +32923,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32942
32923
  var factor = shift / distance;
32943
32924
  var x = vertices[i2] + (vertices[i2] - distances[i]) * factor;
32944
32925
  var y = vertices[i2 + 1] * (1 + factor);
32926
+ lengths[i] += factor * lengthShifts[i];
32945
32927
  vertices[i2] = x;
32946
32928
  vertices[i2 + 1] = y;
32947
32929
  uvs[i2] = 0.5 * (x / sizeX + 1);
@@ -32978,8 +32960,10 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32978
32960
  var dangle = (2 * Math.PI) / n;
32979
32961
  var c = Math.cos(dangle);
32980
32962
  var s = Math.sin(dangle);
32981
- var fx = sizeX / sizeY;
32982
- var fy = sizeY / sizeX;
32963
+ var fx = 1 / sizeX;
32964
+ var fy = 1 / sizeY;
32965
+ var fxy = sizeX * fy;
32966
+ var fyx = sizeY * fx;
32983
32967
  var itop = 0;
32984
32968
  var ibottom = n >> 1;
32985
32969
  var ppx = sizeX * s;
@@ -32990,20 +32974,12 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
32990
32974
  var py = sizeY;
32991
32975
  var nx = -sizeX * s;
32992
32976
  var ny = sizeY * c;
32993
- var nnx = c * nx - s * ny * fx;
32994
- var nny = s * nx * fy + c * ny;
32977
+ var nnx = c * nx - s * ny * fxy;
32978
+ var nny = s * nx * fyx + c * ny;
32995
32979
  var sy = this.toSkeletonY(pppx, pppy, ppx, ppy, px, py);
32996
- vertices[0] = 0;
32997
- vertices[1] = sizeY;
32998
- clippings[0] = -1;
32999
- distances[0] = sy;
33000
- lengths[0] = 0;
33001
- uvs[0] = 0.5;
33002
- uvs[1] = 1;
33003
- var iv = 1;
32980
+ var iv = 0;
33004
32981
  var ii = 0;
33005
- var length = 0;
33006
- var current = 0;
32982
+ var l = 0;
33007
32983
  var maxDistance = 0;
33008
32984
  for (var i = 0; i < n; ++i) {
33009
32985
  var inext = (i + 1) % n;
@@ -33019,59 +32995,38 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
33019
32995
  var dy = ny - py;
33020
32996
  var dl = Math.sqrt(dx * dx + dy * dy);
33021
32997
  var fl = 1 / dl;
33022
- var nlength = length + dl;
33023
- var iv1 = iv++;
33024
- var iv2 = iv1 << 1;
33025
- var niv1 = iv++;
33026
- var niv2 = niv1 << 1;
33027
- var ndistance = Math.abs(dx * (nsy - py) + dy * px) * fl;
33028
- maxDistance = Math.max(maxDistance, ndistance);
33029
- vertices[iv2 + 0] = nx;
33030
- vertices[iv2 + 1] = ny;
33031
- clippings[iv1] = -1 - ndistance;
33032
- distances[iv1] = nsy;
33033
- lengths[iv1] = nlength;
33034
- uvs[iv2 + 0] = 0.5 * (nx / sizeX + 1);
33035
- uvs[iv2 + 1] = 0.5 * (ny / sizeY + 1);
33036
- vertices[niv2] = 0;
33037
- vertices[niv2 + 1] = nsy;
33038
- clippings[niv1] = ndistance;
33039
- distances[niv1] = 0;
33040
- lengths[niv1] = length + (-px * dx + (nsy - py) * dy) * fl;
33041
- uvs[niv2] = 0.5;
33042
- uvs[niv2 + 1] = 0.5 * (nsy / sizeY + 1);
33043
- indices[ii++] = current;
33044
- indices[ii++] = iv1;
33045
- indices[ii++] = niv1;
33046
- distances[current] = sy;
33047
- if (sy === nsy) {
33048
- clippings[current] = -1 - ndistance;
33049
- }
33050
- else {
33051
- var mdistance = Math.abs(dx * (sy - py) + dy * px) * fl;
33052
- maxDistance = Math.max(maxDistance, mdistance);
33053
- clippings[current] = -1 - mdistance;
33054
- var miv1 = iv++;
33055
- var miv2 = miv1 << 1;
33056
- vertices[miv2] = 0;
33057
- vertices[miv2 + 1] = sy;
33058
- clippings[miv1] = mdistance;
33059
- distances[miv1] = 0;
33060
- lengths[miv1] = length + (-px * dx + (sy - py) * dy) * fl;
33061
- uvs[miv2] = 0.5;
33062
- uvs[miv2 + 1] = 0.5 * (sy / sizeY + 1);
33063
- indices[ii++] = current;
33064
- indices[ii++] = niv1;
33065
- indices[ii++] = miv1;
33066
- }
33067
- current = iv1;
33068
- length = nlength;
32998
+ var nl = l + dl;
32999
+ var nd = Math.abs(dx * (nsy - py) + dy * px) * fl;
33000
+ var md = sy === nsy ? nd : Math.abs(dx * (sy - py) + dy * px) * fl;
33001
+ maxDistance = Math.max(maxDistance, nd, md);
33002
+ // Each edge owns its vertices so that the lengths are exact at clipping = 1 on both sides.
33003
+ var iva = iv++;
33004
+ var ivb = iv++;
33005
+ var ivn = iv++;
33006
+ var ls0 = (px * dx + (py - sy) * dy) * fl;
33007
+ var ls1 = (nx * dx + (ny - nsy) * dy) * fl;
33008
+ var ls2 = (-px * dx + (nsy - py) * dy) * fl;
33009
+ this.writeVertex(iva, px, py, fx, fy, sy, l, -1 - md, ls0);
33010
+ this.writeVertex(ivb, nx, ny, fx, fy, nsy, nl, -1 - nd, ls1);
33011
+ this.writeVertex(ivn, 0, nsy, fx, fy, 0, l + ls2, nd, 0);
33012
+ indices[ii++] = iva;
33013
+ indices[ii++] = ivb;
33014
+ indices[ii++] = ivn;
33015
+ if (sy !== nsy) {
33016
+ var ivm = iv++;
33017
+ var ls3 = (-px * dx + (sy - py) * dy) * fl;
33018
+ this.writeVertex(ivm, 0, sy, fx, fy, 0, l + ls3, md, 0);
33019
+ indices[ii++] = iva;
33020
+ indices[ii++] = ivn;
33021
+ indices[ii++] = ivm;
33022
+ }
33023
+ l = nl;
33069
33024
  px = nx;
33070
33025
  py = ny;
33071
33026
  nx = nnx;
33072
33027
  ny = nny;
33073
- nnx = c * nx - s * ny * fx;
33074
- nny = s * nx * fy + c * ny;
33028
+ nnx = c * nx - s * ny * fxy;
33029
+ nny = s * nx * fyx + c * ny;
33075
33030
  sy = nsy;
33076
33031
  }
33077
33032
  var fdistance = 0;
@@ -33079,6 +33034,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
33079
33034
  fdistance = 1 / maxDistance;
33080
33035
  }
33081
33036
  var shift = (scale - 1) * maxDistance;
33037
+ var lengthShifts = this._lengthShifts;
33082
33038
  for (var i = 0; i < iv; ++i) {
33083
33039
  var clipping = clippings[i];
33084
33040
  if (0 <= clipping) {
@@ -33091,6 +33047,7 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
33091
33047
  var factor = shift / distance;
33092
33048
  var x = vertices[i2] * (1 + factor);
33093
33049
  var y = vertices[i2 + 1] + (vertices[i2 + 1] - distances[i]) * factor;
33050
+ lengths[i] += factor * lengthShifts[i];
33094
33051
  vertices[i2] = x;
33095
33052
  vertices[i2 + 1] = y;
33096
33053
  uvs[i2] = 0.5 * (x / sizeX + 1);
@@ -33114,6 +33071,17 @@ var EShapeCircleTriangulatedImpl = /** @class */ (function () {
33114
33071
  var by = pdy * fp + ndy * fn;
33115
33072
  return py - (px * by) / bx;
33116
33073
  };
33074
+ EShapeCircleTriangulatedImpl.prototype.writeVertex = function (iv, x, y, fx, fy, distance, length, clipping, lengthShift) {
33075
+ var iv2 = iv << 1;
33076
+ this._vertices[iv2] = x;
33077
+ this._vertices[iv2 + 1] = y;
33078
+ this._distances[iv] = distance;
33079
+ this._lengths[iv] = length;
33080
+ this._clippings[iv] = clipping;
33081
+ this._lengthShifts[iv] = lengthShift;
33082
+ this._uvs[iv2] = 0.5 * (x * fx + 1);
33083
+ this._uvs[iv2 + 1] = 0.5 * (y * fy + 1);
33084
+ };
33117
33085
  return EShapeCircleTriangulatedImpl;
33118
33086
  }());
33119
33087
 
@@ -37167,6 +37135,9 @@ var EThemeWhiteShape = /** @class */ (function () {
37167
37135
  EThemeWhiteShape.prototype.getRadius = function () {
37168
37136
  return 0.25;
37169
37137
  };
37138
+ EThemeWhiteShape.prototype.getAngle = function () {
37139
+ return 0.333;
37140
+ };
37170
37141
  EThemeWhiteShape.prototype.getSizeX = function () {
37171
37142
  return 100;
37172
37143
  };
@@ -48370,6 +48341,9 @@ var EThemeDarkShape = /** @class */ (function () {
48370
48341
  EThemeDarkShape.prototype.getRadius = function () {
48371
48342
  return 0.25;
48372
48343
  };
48344
+ EThemeDarkShape.prototype.getAngle = function () {
48345
+ return 0.333;
48346
+ };
48373
48347
  EThemeDarkShape.prototype.getSizeX = function () {
48374
48348
  return 100;
48375
48349
  };
@@ -63352,7 +63326,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
63352
63326
  boundary[3] = +ay;
63353
63327
  // # of vertices and # of indices
63354
63328
  var n = this._n >> 2;
63355
- var nv = 8 * n + 18;
63329
+ var nv = 12 * n + 10;
63356
63330
  var ni = 4 * n + 10;
63357
63331
  this._nvertices = nv;
63358
63332
  this._nindices = ni;
@@ -63982,7 +63956,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
63982
63956
  * Preconditions:
63983
63957
  * * shape.stroke.side === EShapeStrokeSide.TOP_OR_RIGHT
63984
63958
  * * ay <= ax
63985
- * * 5 * N + 5 <= nv
63959
+ * * 6 * N + 3 <= nv
63986
63960
  * * 4 * N + 1 <= ni
63987
63961
  */
63988
63962
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateTopRight0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -63993,7 +63967,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
63993
63967
  * Preconditions:
63994
63968
  * * shape.stroke.side === EShapeStrokeSide.TOP_OR_RIGHT
63995
63969
  * * ax < ay
63996
- * * 5 * N + 5 <= nv
63970
+ * * 6 * N + 3 <= nv
63997
63971
  * * 4 * N + 1 <= ni
63998
63972
  */
63999
63973
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateTopRight1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64125,7 +64099,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64125
64099
  if (ctr) {
64126
64100
  var lo = lot + 2 * ax - r;
64127
64101
  this.writeFan(+ax - r, -ay + r, 0, -1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64128
- iv += 2 * n - 1;
64102
+ iv += 3 * (n - 1);
64129
64103
  ii += 3 * (n - 1);
64130
64104
  }
64131
64105
  this.pad(iv, ii, nv, ni, fd);
@@ -64134,7 +64108,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64134
64108
  * Preconditions:
64135
64109
  * * shape.stroke.side === EShapeStrokeSide.BOTTOM_OR_LEFT
64136
64110
  * * ay <= ax
64137
- * * 5 * N + 5 <= nv
64111
+ * * 6 * N + 3 <= nv
64138
64112
  * * 4 * N + 1 <= ni
64139
64113
  */
64140
64114
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateBottomLeft0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64145,7 +64119,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64145
64119
  * Preconditions:
64146
64120
  * * shape.stroke.side === EShapeStrokeSide.BOTTOM_OR_LEFT
64147
64121
  * * ax < ay
64148
- * * 5 * N + 5 <= nv
64122
+ * * 6 * N + 3 <= nv
64149
64123
  * * 4 * N + 1 <= ni
64150
64124
  */
64151
64125
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateBottomLeft1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64279,7 +64253,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64279
64253
  if (cbl) {
64280
64254
  var lo = lob + 2 * ax - r;
64281
64255
  this.writeFan(-ax + r, +ay - r, 0, 1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64282
- iv += 2 * n - 1;
64256
+ iv += 3 * (n - 1);
64283
64257
  ii += 3 * (n - 1);
64284
64258
  }
64285
64259
  this.pad(iv, ii, nv, ni, fd);
@@ -64296,7 +64270,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64296
64270
  * Preconditions:
64297
64271
  * * shape.stroke.side === EShapeStrokeSide.TOP_OR_LEFT
64298
64272
  * * ay <= ax
64299
- * * 5 * N + 5 <= nv
64273
+ * * 6 * N + 3 <= nv
64300
64274
  * * 4 * N + 1 <= ni
64301
64275
  */
64302
64276
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateTopLeft0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64307,7 +64281,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64307
64281
  * Preconditions:
64308
64282
  * * shape.stroke.side === EShapeStrokeSide.TOP_OR_LEFT
64309
64283
  * * ax < ay
64310
- * * 5 * N + 5 <= nv
64284
+ * * 6 * N + 3 <= nv
64311
64285
  * * 4 * N + 1 <= ni
64312
64286
  */
64313
64287
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateTopLeft1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64453,7 +64427,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64453
64427
  if (ctl) {
64454
64428
  var lo = lol + 2 * ay - r;
64455
64429
  this.writeFan(-ax + r, -ay + r, -1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64456
- iv += 2 * n - 1;
64430
+ iv += 3 * (n - 1);
64457
64431
  ii += 3 * (n - 1);
64458
64432
  }
64459
64433
  this.pad(iv, ii, nv, ni, fd);
@@ -64462,7 +64436,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64462
64436
  * Preconditions:
64463
64437
  * * shape.stroke.side === EShapeStrokeSide.BOTTOM_OR_RIGHT
64464
64438
  * * ay <= ax
64465
- * * 5 * N + 5 <= nv
64439
+ * * 6 * N + 3 <= nv
64466
64440
  * * 4 * N + 1 <= ni
64467
64441
  */
64468
64442
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateBottomRight0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64473,7 +64447,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64473
64447
  * Preconditions:
64474
64448
  * * shape.stroke.side === EShapeStrokeSide.BOTTOM_OR_RIGHT
64475
64449
  * * ax < ay
64476
- * * 5 * N + 5 <= nv
64450
+ * * 6 * N + 3 <= nv
64477
64451
  * * 4 * N + 1 <= ni
64478
64452
  */
64479
64453
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateBottomRight1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64616,7 +64590,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64616
64590
  if (cbr) {
64617
64591
  var lo = lor + 2 * ay - r;
64618
64592
  this.writeFan(+ax - r, +ay - r, 1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64619
- iv += 2 * n - 1;
64593
+ iv += 3 * (n - 1);
64620
64594
  ii += 3 * (n - 1);
64621
64595
  }
64622
64596
  this.pad(iv, ii, nv, ni, fd);
@@ -64625,7 +64599,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64625
64599
  * Preconditions:
64626
64600
  * * shape.stroke.side === EShapeStrokeSide.NOT_TOP
64627
64601
  * * ay <= ax
64628
- * * 6 * N + 12 <= nv
64602
+ * * 8 * N + 8 <= nv
64629
64603
  * * 4 * N + 6 <= ni
64630
64604
  */
64631
64605
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotTop0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64668,13 +64642,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64668
64642
  if (cbl) {
64669
64643
  var lo = lob + 2 * ax - r;
64670
64644
  this.writeFan(-ax + r, +ay - r, 0, 1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64671
- iv += 2 * n - 1;
64645
+ iv += 3 * (n - 1);
64672
64646
  ii += 3 * (n - 1);
64673
64647
  }
64674
64648
  if (cbr) {
64675
64649
  var lo = lor + 2 * ay - r;
64676
64650
  this.writeFan(+ax - r, +ay - r, 1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64677
- iv += 2 * n - 1;
64651
+ iv += 3 * (n - 1);
64678
64652
  ii += 3 * (n - 1);
64679
64653
  }
64680
64654
  this.pad(iv, ii, nv, ni, fd);
@@ -64683,7 +64657,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64683
64657
  * Preconditions:
64684
64658
  * * shape.stroke.side === EShapeStrokeSide.NOT_TOP
64685
64659
  * * ax < ay
64686
- * * 6 * N + 12 <= nv
64660
+ * * 8 * N + 8 <= nv
64687
64661
  * * 4 * N + 6 <= ni
64688
64662
  */
64689
64663
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotTop1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64724,13 +64698,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64724
64698
  if (cbl) {
64725
64699
  var lo = lob + 2 * ax - r;
64726
64700
  this.writeFan(-ax + r, +ay - r, 0, 1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64727
- iv += 2 * n - 1;
64701
+ iv += 3 * (n - 1);
64728
64702
  ii += 3 * (n - 1);
64729
64703
  }
64730
64704
  if (cbr) {
64731
64705
  var lo = lor + 2 * ay - r;
64732
64706
  this.writeFan(+ax - r, +ay - r, 1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64733
- iv += 2 * n - 1;
64707
+ iv += 3 * (n - 1);
64734
64708
  ii += 3 * (n - 1);
64735
64709
  }
64736
64710
  this.pad(iv, ii, nv, ni, fd);
@@ -64808,7 +64782,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64808
64782
  * Preconditions:
64809
64783
  * * shape.stroke.side === EShapeStrokeSide.NOT_BOTTOM
64810
64784
  * * ay <= ax
64811
- * * 6 * N + 12 <= nv
64785
+ * * 8 * N + 8 <= nv
64812
64786
  * * 4 * N + 6 <= ni
64813
64787
  */
64814
64788
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotBottom0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64857,13 +64831,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64857
64831
  if (ctl) {
64858
64832
  var lo = lol + 2 * ay - r;
64859
64833
  this.writeFan(-ax + r, -ay + r, -1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64860
- iv += 2 * n - 1;
64834
+ iv += 3 * (n - 1);
64861
64835
  ii += 3 * (n - 1);
64862
64836
  }
64863
64837
  if (ctr) {
64864
64838
  var lo = lot + 2 * ax - r;
64865
64839
  this.writeFan(+ax - r, -ay + r, 0, -1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64866
- iv += 2 * n - 1;
64840
+ iv += 3 * (n - 1);
64867
64841
  ii += 3 * (n - 1);
64868
64842
  }
64869
64843
  this.pad(iv, ii, nv, ni, fd);
@@ -64872,7 +64846,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64872
64846
  * Preconditions:
64873
64847
  * * shape.stroke.side === EShapeStrokeSide.NOT_BOTTOM
64874
64848
  * * ax < ay
64875
- * * 6 * N + 12 <= nv
64849
+ * * 8 * N + 8 <= nv
64876
64850
  * * 4 * N + 6 <= ni
64877
64851
  */
64878
64852
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotBottom1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -64920,13 +64894,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
64920
64894
  if (ctl) {
64921
64895
  var lo = lol + 2 * ay - r;
64922
64896
  this.writeFan(-ax + r, -ay + r, -1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64923
- iv += 2 * n - 1;
64897
+ iv += 3 * (n - 1);
64924
64898
  ii += 3 * (n - 1);
64925
64899
  }
64926
64900
  if (ctr) {
64927
64901
  var lo = lot + 2 * ax - r;
64928
64902
  this.writeFan(+ax - r, -ay + r, 0, -1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
64929
- iv += 2 * n - 1;
64903
+ iv += 3 * (n - 1);
64930
64904
  ii += 3 * (n - 1);
64931
64905
  }
64932
64906
  this.pad(iv, ii, nv, ni, fd);
@@ -65001,7 +64975,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65001
64975
  * Preconditions:
65002
64976
  * * shape.stroke.side === EShapeStrokeSide.NOT_LEFT
65003
64977
  * * ay <= ax
65004
- * * 6 * N + 12 <= nv
64978
+ * * 8 * N + 8 <= nv
65005
64979
  * * 4 * N + 6 <= ni
65006
64980
  */
65007
64981
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotLeft0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65048,13 +65022,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65048
65022
  if (ctr) {
65049
65023
  var lo = lot + 2 * ax - r;
65050
65024
  this.writeFan(+ax - r, -ay + r, 0, -1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65051
- iv += 2 * n - 1;
65025
+ iv += 3 * (n - 1);
65052
65026
  ii += 3 * (n - 1);
65053
65027
  }
65054
65028
  if (cbr) {
65055
65029
  var lo = lor + 2 * ay - r;
65056
65030
  this.writeFan(+ax - r, +ay - r, 1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65057
- iv += 2 * n - 1;
65031
+ iv += 3 * (n - 1);
65058
65032
  ii += 3 * (n - 1);
65059
65033
  }
65060
65034
  this.pad(iv, ii, nv, ni, fd);
@@ -65063,7 +65037,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65063
65037
  * Preconditions:
65064
65038
  * * shape.stroke.side === EShapeStrokeSide.NOT_LEFT
65065
65039
  * * ax < ay
65066
- * * 6 * N + 12 <= nv
65040
+ * * 8 * N + 8 <= nv
65067
65041
  * * 4 * N + 6 <= ni
65068
65042
  */
65069
65043
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotLeft1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65111,13 +65085,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65111
65085
  if (ctr) {
65112
65086
  var lo = lot + 2 * ax - r;
65113
65087
  this.writeFan(+ax - r, -ay + r, 0, -1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65114
- iv += 2 * n - 1;
65088
+ iv += 3 * (n - 1);
65115
65089
  ii += 3 * (n - 1);
65116
65090
  }
65117
65091
  if (cbr) {
65118
65092
  var lo = lor + 2 * ay - r;
65119
65093
  this.writeFan(+ax - r, +ay - r, 1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65120
- iv += 2 * n - 1;
65094
+ iv += 3 * (n - 1);
65121
65095
  ii += 3 * (n - 1);
65122
65096
  }
65123
65097
  this.pad(iv, ii, nv, ni, fd);
@@ -65192,7 +65166,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65192
65166
  * Preconditions:
65193
65167
  * * shape.stroke.side === EShapeStrokeSide.NOT_RIGHT
65194
65168
  * * ay <= ax
65195
- * * 6 * N + 12 <= nv
65169
+ * * 8 * N + 8 <= nv
65196
65170
  * * 4 * N + 6 <= ni
65197
65171
  */
65198
65172
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotRight0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65233,13 +65207,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65233
65207
  if (ctl) {
65234
65208
  var lo = lol + 2 * ay - r;
65235
65209
  this.writeFan(-ax + r, -ay + r, -1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65236
- iv += 2 * n - 1;
65210
+ iv += 3 * (n - 1);
65237
65211
  ii += 3 * (n - 1);
65238
65212
  }
65239
65213
  if (cbl) {
65240
65214
  var lo = lob + 2 * ax - r;
65241
65215
  this.writeFan(-ax + r, +ay - r, 0, 1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65242
- iv += 2 * n - 1;
65216
+ iv += 3 * (n - 1);
65243
65217
  ii += 3 * (n - 1);
65244
65218
  }
65245
65219
  this.pad(iv, ii, nv, ni, fd);
@@ -65248,7 +65222,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65248
65222
  * Preconditions:
65249
65223
  * * shape.stroke.side === EShapeStrokeSide.NOT_RIGHT
65250
65224
  * * ax < ay
65251
- * * 6 * N + 12 <= nv
65225
+ * * 8 * N + 8 <= nv
65252
65226
  * * 4 * N + 6 <= ni
65253
65227
  */
65254
65228
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateNotRight1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65290,13 +65264,13 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65290
65264
  if (ctl) {
65291
65265
  var lo = lol + 2 * ay - r;
65292
65266
  this.writeFan(-ax + r, -ay + r, -1, 0, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65293
- iv += 2 * n - 1;
65267
+ iv += 3 * (n - 1);
65294
65268
  ii += 3 * (n - 1);
65295
65269
  }
65296
65270
  if (cbl) {
65297
65271
  var lo = lob + 2 * ax - r;
65298
65272
  this.writeFan(-ax + r, +ay - r, 0, 1, lo, iv, ii, n, r, rs, fd, scale, fx, fy);
65299
- iv += 2 * n - 1;
65273
+ iv += 3 * (n - 1);
65300
65274
  ii += 3 * (n - 1);
65301
65275
  }
65302
65276
  this.pad(iv, ii, nv, ni, fd);
@@ -65371,7 +65345,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65371
65345
  * Preconditions:
65372
65346
  * * shape.stroke.side === EShapeStrokeSide.ALL or NONE
65373
65347
  * * ay <= ax
65374
- * * 8 * N + 18 <= nv
65348
+ * * 12 * N + 10 <= nv
65375
65349
  * * 4 * N + 10 <= ni
65376
65350
  */
65377
65351
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateAll0 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65416,10 +65390,10 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65416
65390
  iv += 5;
65417
65391
  ii += 9;
65418
65392
  var rs = r + fs;
65419
- var l = 2 * ax + lot;
65393
+ var l = 2 * ax + lot - r;
65420
65394
  if (ctr) {
65421
65395
  this.writeFan(x4, y1, 0, -1, l, iv, ii, n, r, rs, fd, s, fx, fy);
65422
- iv += 2 * n - 1;
65396
+ iv += 3 * (n - 1);
65423
65397
  ii += 3 * (n - 1);
65424
65398
  l += 2 * ay + lc;
65425
65399
  }
@@ -65428,7 +65402,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65428
65402
  }
65429
65403
  if (cbr) {
65430
65404
  this.writeFan(x4, y4, 1, 0, l, iv, ii, n, r, rs, fd, s, fx, fy);
65431
- iv += 2 * n - 1;
65405
+ iv += 3 * (n - 1);
65432
65406
  ii += 3 * (n - 1);
65433
65407
  l += 2 * ax + lc;
65434
65408
  }
@@ -65437,7 +65411,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65437
65411
  }
65438
65412
  if (cbl) {
65439
65413
  this.writeFan(x1, y4, 0, 1, l, iv, ii, n, r, rs, fd, s, fx, fy);
65440
- iv += 2 * n - 1;
65414
+ iv += 3 * (n - 1);
65441
65415
  ii += 3 * (n - 1);
65442
65416
  l += 2 * ay + lc;
65443
65417
  }
@@ -65446,7 +65420,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65446
65420
  }
65447
65421
  if (ctl) {
65448
65422
  this.writeFan(x1, y1, -1, 0, l, iv, ii, n, r, rs, fd, s, fx, fy);
65449
- iv += 2 * n - 1;
65423
+ iv += 3 * (n - 1);
65450
65424
  ii += 3 * (n - 1);
65451
65425
  }
65452
65426
  this.pad(iv, ii, nv, ni, fd);
@@ -65455,7 +65429,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65455
65429
  * Preconditions:
65456
65430
  * * shape.stroke.side === EShapeStrokeSide.ALL or NONE
65457
65431
  * * ax < ay
65458
- * * 8 * N + 18 <= nv
65432
+ * * 12 * N + 10 <= nv
65459
65433
  * * 4 * N + 10 <= ni
65460
65434
  */
65461
65435
  EShapeRectangleRoundedTriangulatedImpl.prototype.updateAll1 = function (fx, fy, ax, ay, scale, radius, corner, nv, ni) {
@@ -65500,10 +65474,10 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65500
65474
  this.writeHexaLeft(iv, ii, lol, cbl ? x1 : ol, cbl ? y4 : y5, ol, y4, ol, y1, ctl ? x1 : ol, ctl ? y1 : y0, 0, y2, 0, y3, fd, s, fx, fy, ax, ay);
65501
65475
  iv += 6;
65502
65476
  ii += 12;
65503
- var l = 2 * ax + lot;
65477
+ var l = 2 * ax + lot - r;
65504
65478
  if (ctr) {
65505
65479
  this.writeFan(x4, y1, 0, -1, l, iv, ii, n, r, rs, fd, s, fx, fy);
65506
- iv += 1 + 2 * (n - 1);
65480
+ iv += 3 * (n - 1);
65507
65481
  ii += 3 * (n - 1);
65508
65482
  l += 2 * ay + lc;
65509
65483
  }
@@ -65512,7 +65486,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65512
65486
  }
65513
65487
  if (cbr) {
65514
65488
  this.writeFan(x4, y4, 1, 0, l, iv, ii, n, r, rs, fd, s, fx, fy);
65515
- iv += 1 + 2 * (n - 1);
65489
+ iv += 3 * (n - 1);
65516
65490
  ii += 3 * (n - 1);
65517
65491
  l += 2 * ax + lc;
65518
65492
  }
@@ -65521,7 +65495,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65521
65495
  }
65522
65496
  if (cbl) {
65523
65497
  this.writeFan(x1, y4, 0, 1, l, iv, ii, n, r, rs, fd, s, fx, fy);
65524
- iv += 1 + 2 * (n - 1);
65498
+ iv += 3 * (n - 1);
65525
65499
  ii += 3 * (n - 1);
65526
65500
  l += 2 * ay + lc;
65527
65501
  }
@@ -65530,7 +65504,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65530
65504
  }
65531
65505
  if (ctl) {
65532
65506
  this.writeFan(x1, y1, -1, 0, l, iv, ii, n, r, rs, fd, s, fx, fy);
65533
- iv += 1 + 2 * (n - 1);
65507
+ iv += 3 * (n - 1);
65534
65508
  ii += 3 * (n - 1);
65535
65509
  }
65536
65510
  this.pad(iv, ii, nv, ni, fd);
@@ -65803,29 +65777,27 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65803
65777
  var dangle = (Math.PI * 0.5) / (n - 1);
65804
65778
  var c = Math.cos(dangle);
65805
65779
  var s = Math.sin(dangle);
65806
- var dl = 0.5 * r * dangle;
65780
+ var dl = r * dangle;
65781
+ // Rim vertices at radius rs sit dl / 2 * (rs / r) from the chord midpoint, so the length is exact at radius r.
65782
+ var dlm = 0.5 * dl * (rs / r - 1);
65783
+ var cc = 1 - r * fd;
65784
+ var indices = this._indices;
65807
65785
  var dx = rs * cos0;
65808
65786
  var dy = rs * sin0;
65809
- var iv0 = iv++;
65810
65787
  var l = lo;
65811
- this.writeVertex(iv0, cx + dx, cy + dy, fd, lo, scale, fx, fy);
65812
- var indices = this._indices;
65813
- var cc = 1 - r * fd;
65814
65788
  for (var i = 0; i < n - 1; ++i) {
65815
- var iv1 = iv++;
65816
- l += dl;
65817
- this.writeVertex(iv1, cx, cy, fd, l, cc, fx, fy);
65818
- var iv2 = iv++;
65819
- l += dl;
65820
65789
  var ndx = c * dx - s * dy;
65821
65790
  var ndy = s * dx + c * dy;
65822
- this.writeVertex(iv2, cx + ndx, cy + ndy, fd, l, scale, fx, fy);
65791
+ this.writeVertex(iv + 0, cx + dx, cy + dy, fd, l - dlm, scale, fx, fy);
65792
+ this.writeVertex(iv + 1, cx + ndx, cy + ndy, fd, l + dl + dlm, scale, fx, fy);
65793
+ this.writeVertex(iv + 2, cx, cy, fd, l + 0.5 * dl, cc, fx, fy);
65794
+ indices[ii++] = iv + 2;
65795
+ indices[ii++] = iv + 0;
65796
+ indices[ii++] = iv + 1;
65797
+ iv += 3;
65798
+ l += dl;
65823
65799
  dx = ndx;
65824
65800
  dy = ndy;
65825
- indices[ii++] = iv1;
65826
- indices[ii++] = iv0;
65827
- indices[ii++] = iv2;
65828
- iv0 = iv2;
65829
65801
  }
65830
65802
  };
65831
65803
  EShapeRectangleRoundedTriangulatedImpl.prototype.writeVertexTop = function (vertex, x, y, lengthOffset, fdistance, scale, fx, fy, ax, ay) {
@@ -67471,6 +67443,10 @@ var BuilderLine = /** @class */ (function (_super) {
67471
67443
  return BuilderLine;
67472
67444
  }(BuilderBase));
67473
67445
 
67446
+ /*
67447
+ * Copyright (C) 2019 Toshiba Corporation
67448
+ * SPDX-License-Identifier: Apache-2.0
67449
+ */
67474
67450
  var TRIANGLE_LEGACY_VERTEX_COUNT = 7;
67475
67451
  var TRIANGLE_LEGACY_INDEX_COUNT = 3;
67476
67452
  var TRIANGLE_LEGACY_WORLD_SIZE = [0, 0, 0];
@@ -67948,6 +67924,10 @@ var BuilderNull = /** @class */ (function () {
67948
67924
  return BuilderNull;
67949
67925
  }());
67950
67926
 
67927
+ /*
67928
+ * Copyright (C) 2019 Toshiba Corporation
67929
+ * SPDX-License-Identifier: Apache-2.0
67930
+ */
67951
67931
  var RECTANGLE_LEGACY_VERTEX_COUNT = 16;
67952
67932
  var RECTANGLE_LEGACY_INDEX_COUNT = 8;
67953
67933
  var RECTANGLE_LEGACY_WORLD_SIZE = [0, 0];
@@ -70091,6 +70071,918 @@ var loadShapeEmbedded = function () {
70091
70071
  EShapeCapabilities.set(EShapeType.EMBEDDED_ACCEPTOR_EDGE, EShapeCapability.EMBEDDED_ACCEPTOR_EDGE);
70092
70072
  };
70093
70073
 
70074
+ /*
70075
+ * Copyright (C) 2019-2026 Toshiba Corporation
70076
+ * SPDX-License-Identifier: Apache-2.0
70077
+ */
70078
+ /**
70079
+ * Converts an angle ratio to the half central angle of a fan in [0, PI / 2].
70080
+ */
70081
+ var toFanAngleCentric = function (angle) {
70082
+ return Math.PI * Math.max(0, Math.min(0.5, angle));
70083
+ };
70084
+
70085
+ /*
70086
+ * Copyright (C) 2019-2026 Toshiba Corporation
70087
+ * SPDX-License-Identifier: Apache-2.0
70088
+ */
70089
+ /**
70090
+ * Converts the half central angle of fans to the eccentric angle of the arc end points
70091
+ * of the fan whose arc is on the ellipse with the semi-axes (w, h).
70092
+ */
70093
+ var toFanAngleEccentric = function (w, h, theta) {
70094
+ return Math.atan((h / w) * Math.tan(theta));
70095
+ };
70096
+
70097
+ /*
70098
+ * Copyright (C) 2019-2026 Toshiba Corporation
70099
+ * SPDX-License-Identifier: Apache-2.0
70100
+ */
70101
+ /**
70102
+ * Triangulates a fan whose arc is on the ellipse with the semi-axes (w, h) centered at the origin O.
70103
+ * The vertices are computed in the frame where w and h are positive and flipped at the end.
70104
+ *
70105
+ * ## Points
70106
+ *
70107
+ * - O: the apex of the fan, the origin
70108
+ * - A, B: the end points of the arc, (-w sin(ea), -h cos(ea)) and (+w sin(ea), -h cos(ea))
70109
+ * - C: the point where the area of the fan becomes zero when the fan shrinks, (0, -h / (1 + sin(ca)))
70110
+ * - P[k]: the points on the arc, k in [0, 2N] (P[0] = A, P[N] is the top, P[2N] = B)
70111
+ * - Q[k]: the points on the medial axis of the fan, which are on the normal of the arc at P[k]
70112
+ * and equidistant from the arc and the straight sides (Q[0] = A, Q[N] = C, Q[2N] = B)
70113
+ * - R[k]: the points P[k] shifted outward for the anti-aliasing
70114
+ * - O': the point O shifted outward for the anti-aliasing
70115
+ *
70116
+ * ## Stroke sides
70117
+ *
70118
+ * The clipping of a vertex is 1 on the outline and decreases toward the inside by (the distance from the outline) * fd,
70119
+ * where the outline is the arc and/or the straight sides depending on the stroke side.
70120
+ *
70121
+ * - ALL (and NONE): the stroke is at the arc and the straight sides.
70122
+ * The fan is triangulated into the strip P[k], P[k + 1], Q[k + 1], Q[k] and
70123
+ * the two polygons O', A', Q[0], ..., Q[N] and O', B', Q[2N], ..., Q[N] at the bottom.
70124
+ * - TOP: the stroke is only at the arc.
70125
+ * For a circle and a semi-ellipse, Q[k] are the points on the axis, which gives the exact fan with the strip only.
70126
+ * For the other ellipses, Q[k] are on the medial axis as ALL, and the two polygons
70127
+ * O, Q[0], ..., Q[N] and O, Q[2N], ..., Q[N] are added at the bottom without the stroke and the anti-aliasing.
70128
+ * - BOTTOM: the stroke is only at the straight sides.
70129
+ * It is the same as a polygon. Two triangle fans from C cover the area between the arc and the segments CA and CB,
70130
+ * and two quads O', A', A, C and O', B', B, C cover the rest.
70131
+ */
70132
+ var EShapeFanTriangulatedImpl = /** @class */ (function () {
70133
+ function EShapeFanTriangulatedImpl(parent) {
70134
+ this._id = 0;
70135
+ this._parent = parent;
70136
+ this._width = 0;
70137
+ this._height = 0;
70138
+ this._strokeAlign = 0;
70139
+ this._strokeWidth = 0;
70140
+ this._strokeSideTop = true;
70141
+ this._strokeSideBottom = true;
70142
+ this._angle = 0;
70143
+ this._sizeX = 0;
70144
+ this._sizeY = 0;
70145
+ this._vertices = [];
70146
+ this._nvertices = 0;
70147
+ this._distances = [];
70148
+ this._lengths = [];
70149
+ this._clippings = [];
70150
+ this._uvs = [];
70151
+ this._indices = [];
70152
+ this._nindices = 0;
70153
+ this._boundary = [0, 0, 0, 0];
70154
+ }
70155
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "id", {
70156
+ get: function () {
70157
+ this.triangulate();
70158
+ return this._id;
70159
+ },
70160
+ enumerable: false,
70161
+ configurable: true
70162
+ });
70163
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "vertices", {
70164
+ get: function () {
70165
+ this.triangulate();
70166
+ return this._vertices;
70167
+ },
70168
+ enumerable: false,
70169
+ configurable: true
70170
+ });
70171
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "nvertices", {
70172
+ get: function () {
70173
+ this.triangulate();
70174
+ return this._nvertices;
70175
+ },
70176
+ enumerable: false,
70177
+ configurable: true
70178
+ });
70179
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "distances", {
70180
+ get: function () {
70181
+ this.triangulate();
70182
+ return this._distances;
70183
+ },
70184
+ enumerable: false,
70185
+ configurable: true
70186
+ });
70187
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "lengths", {
70188
+ get: function () {
70189
+ this.triangulate();
70190
+ return this._lengths;
70191
+ },
70192
+ enumerable: false,
70193
+ configurable: true
70194
+ });
70195
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "clippings", {
70196
+ get: function () {
70197
+ this.triangulate();
70198
+ return this._clippings;
70199
+ },
70200
+ enumerable: false,
70201
+ configurable: true
70202
+ });
70203
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "uvs", {
70204
+ get: function () {
70205
+ this.triangulate();
70206
+ return this._uvs;
70207
+ },
70208
+ enumerable: false,
70209
+ configurable: true
70210
+ });
70211
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "indices", {
70212
+ get: function () {
70213
+ this.triangulate();
70214
+ return this._indices;
70215
+ },
70216
+ enumerable: false,
70217
+ configurable: true
70218
+ });
70219
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "nindices", {
70220
+ get: function () {
70221
+ this.triangulate();
70222
+ return this._nindices;
70223
+ },
70224
+ enumerable: false,
70225
+ configurable: true
70226
+ });
70227
+ Object.defineProperty(EShapeFanTriangulatedImpl.prototype, "boundary", {
70228
+ get: function () {
70229
+ this.triangulate();
70230
+ return this._boundary;
70231
+ },
70232
+ enumerable: false,
70233
+ configurable: true
70234
+ });
70235
+ EShapeFanTriangulatedImpl.prototype.triangulate = function () {
70236
+ var isNotInitialized = this._id === 0;
70237
+ var parent = this._parent;
70238
+ var size = parent.size;
70239
+ var width = size.x;
70240
+ var height = size.y;
70241
+ var isRectChanged = this._width !== width || this._height !== height;
70242
+ var stroke = parent.stroke;
70243
+ var strokeAlign = stroke.align;
70244
+ var strokeSideTop = (stroke.side & EShapeStrokeSide.TOP) !== 0;
70245
+ var strokeSideBottom = (stroke.side & EShapeStrokeSide.BOTTOM) !== 0;
70246
+ var strokeWidth = stroke.enable && (strokeSideTop || strokeSideBottom) ? stroke.width : 0;
70247
+ var isStrokeChanged = this._strokeAlign !== strokeAlign || this._strokeWidth !== strokeWidth;
70248
+ var isStrokeSideChanged = this._strokeSideTop !== strokeSideTop || this._strokeSideBottom !== strokeSideBottom;
70249
+ var angle = parent.angle;
70250
+ var isAngleChanged = this._angle !== angle;
70251
+ var isSizeChanged = false;
70252
+ var sizeX = this._sizeX;
70253
+ var sizeY = this._sizeY;
70254
+ if (isRectChanged || isStrokeChanged) {
70255
+ this._width = width;
70256
+ this._height = height;
70257
+ this._strokeAlign = strokeAlign;
70258
+ this._strokeWidth = strokeWidth;
70259
+ var s = strokeAlign * strokeWidth;
70260
+ sizeX = width * 0.5 + (0 <= width ? +s : -s);
70261
+ sizeY = height * 0.5 + (0 <= height ? +s : -s);
70262
+ isSizeChanged = this._sizeX !== sizeX || this._sizeY !== sizeY;
70263
+ }
70264
+ if (isNotInitialized || isSizeChanged || isStrokeSideChanged || isAngleChanged) {
70265
+ this._sizeX = sizeX;
70266
+ this._sizeY = sizeY;
70267
+ this._strokeSideTop = strokeSideTop;
70268
+ this._strokeSideBottom = strokeSideBottom;
70269
+ this._angle = angle;
70270
+ this.update(sizeX, sizeY, angle, strokeSideTop, strokeSideBottom);
70271
+ }
70272
+ };
70273
+ EShapeFanTriangulatedImpl.prototype.update = function (sx, sy, angle, sst, ssb) {
70274
+ // The number of the arc segments is 2n and the number of the points on the arc is m.
70275
+ var n = EShapeDefaults.CIRCLE_SEGMENT_COUNT >> 2;
70276
+ var m = 2 * n + 1;
70277
+ var nv = 2 * m + 2 * (n + 3);
70278
+ var ni = 4 * n + 2 * (n + 1);
70279
+ this._nvertices = nv;
70280
+ this._nindices = ni;
70281
+ this._id += 1;
70282
+ // The eccentric angle ea of A and B, and the sine and cosine of it
70283
+ var ax = Math.abs(sx);
70284
+ var ay = Math.abs(sy);
70285
+ if (ax <= 0 || ay <= 0) {
70286
+ this.updateEmpty(ax, ay, nv, ni);
70287
+ return;
70288
+ }
70289
+ var ca = toFanAngleCentric(angle);
70290
+ var ea = toFanAngleEccentric(ax, ay, ca);
70291
+ var sea = Math.sin(ea);
70292
+ var cea = Math.cos(ea);
70293
+ var bx = ax * sea;
70294
+ var by = ay * cea;
70295
+ var bz = bx * bx + by * by;
70296
+ if (bx <= 0 || bz <= 0) {
70297
+ this.updateEmpty(ax, ay, nv, ni);
70298
+ return;
70299
+ }
70300
+ // The sine and cosine of the geometric half central angle
70301
+ var oa = Math.sqrt(bz);
70302
+ var st = bx / oa;
70303
+ var ct = by / oa;
70304
+ // The factors of the UVs and the signs of the flipping
70305
+ var fx = 1 / bx;
70306
+ var fy = 1 / ay;
70307
+ var gx = Math.sign(sx);
70308
+ var gy = Math.sign(sy);
70309
+ if (!sst && ssb) {
70310
+ this.updateBottom(ax, ay, n, ea, sea, cea, bx, by, st, ct, fx, fy, gx, gy, nv, ni);
70311
+ }
70312
+ else {
70313
+ this.updateArc(ax, ay, n, ea, sea, cea, bx, oa, st, ct, fx, fy, gx, gy, sst, ssb, nv, ni);
70314
+ }
70315
+ };
70316
+ /**
70317
+ * Fills the empty fan, which has no vertices to draw.
70318
+ */
70319
+ EShapeFanTriangulatedImpl.prototype.updateEmpty = function (w, h, nv, ni) {
70320
+ var boundary = this._boundary;
70321
+ boundary[0] = -w;
70322
+ boundary[1] = -h;
70323
+ boundary[2] = +w;
70324
+ boundary[3] = +h;
70325
+ this.pad(0, 0, nv, ni, 0);
70326
+ };
70327
+ EShapeFanTriangulatedImpl.prototype.updateArc = function (w, h, n, ea, sea, cea, bx, oa, st, ct, fx, fy, gx, gy, sst, ssb, nv, ni) {
70328
+ var m = 2 * n + 1;
70329
+ // sided: the straight sides are the outline, which has the stroke and the anti-aliasing
70330
+ // capped: the polygons are added at the bottom to cover the sector with the hard straight sides
70331
+ // chained: Q is on the medial axis. Otherwise, Q is on the axis x = 0 (w <= h) or y = 0 (h < w)
70332
+ // For a circle and a semi-ellipse, Q on the axis gives the exact fan.
70333
+ var sided = !sst || ssb;
70334
+ var isExact = Math.abs(w - h) <= 1e-9 * w || Math.PI * 0.5 <= ea;
70335
+ var capped = !sided && !isExact;
70336
+ var chained = sided || capped;
70337
+ this.computeArcPoints(w, h, n, ea, sea, cea);
70338
+ this.computeArcNormals(w, h, n, ea);
70339
+ var dmax = this.computeMedialPoints(w, h, n, st, ct, chained);
70340
+ if (capped) {
70341
+ // The distance field of the arc must cover O, which is the farthest point from the arc,
70342
+ // because the clipping in the polygons at the bottom is interpolated from the arc to O.
70343
+ dmax = Math.max(dmax, h <= w ? h : oa);
70344
+ }
70345
+ if (dmax <= 0) {
70346
+ this.updateEmpty(w, h, nv, ni);
70347
+ return;
70348
+ }
70349
+ var boundary = this._boundary;
70350
+ boundary[0] = -bx;
70351
+ boundary[1] = -h;
70352
+ boundary[2] = +bx;
70353
+ boundary[3] = 0;
70354
+ var fd = 1 / dmax;
70355
+ var fs = (EShapeFanTriangulatedImpl.SCALE - 1) * dmax;
70356
+ this.computeRimPoints(w, h, n, fs, st, ct, sea, cea, sided);
70357
+ // Strip: 2m vertices and 2 * 3 * (m - 1) indices
70358
+ this.writeStrip(m, fd, fx, fy, gx, gy);
70359
+ var iv = 2 * m;
70360
+ var ii = 6 * (m - 1);
70361
+ // Polygons at the bottom: left (sign = -1) and right (sign = +1)
70362
+ if (sided) {
70363
+ for (var sign = -1; sign <= 1; sign += 2) {
70364
+ var count = this.writeSidePolygon(iv, ii, sign, n, w, oa, st, ct, fs, fd, fx, fy, gx, gy);
70365
+ iv += count;
70366
+ ii += 3 * (count - 2);
70367
+ }
70368
+ }
70369
+ else if (capped) {
70370
+ var co = Math.max(0, 1 - (w >= h ? h : oa) * fd);
70371
+ for (var sign = -1; sign <= 1; sign += 2) {
70372
+ var count = this.writeCapPolygon(iv, ii, sign, n, w, co, fd, fx, fy, gx, gy);
70373
+ iv += count;
70374
+ ii += 3 * (count - 2);
70375
+ }
70376
+ }
70377
+ this.pad(iv, ii, nv, ni, fd);
70378
+ };
70379
+ /**
70380
+ * Computes P[k], the points on the arc, in the work arrays.
70381
+ *
70382
+ * The sine and cosine of the angle are updated by the rotation to avoid calling Math.sin and Math.cos in the loop.
70383
+ * The points are symmetric with respect to the axis x = 0, so only the left half is computed
70384
+ * and the right half is mirrored from it.
70385
+ */
70386
+ EShapeFanTriangulatedImpl.prototype.computeArcPoints = function (w, h, n, ea, sea, cea) {
70387
+ var m = 2 * n + 1;
70388
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70389
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70390
+ var da = ea / n;
70391
+ var cda = Math.cos(da);
70392
+ var sda = Math.sin(da);
70393
+ var s = -sea;
70394
+ var c = cea;
70395
+ for (var k = 0; k <= n; ++k) {
70396
+ // Use the exact values at the center to prevent the accumulation of the errors.
70397
+ if (k === n) {
70398
+ s = 0;
70399
+ c = 1;
70400
+ }
70401
+ px[k] = w * s;
70402
+ py[k] = -h * c;
70403
+ // Rotate by da
70404
+ var ns = s * cda + c * sda;
70405
+ c = c * cda - s * sda;
70406
+ s = ns;
70407
+ }
70408
+ for (var k = 0; k < n; ++k) {
70409
+ px[m - 1 - k] = -px[k];
70410
+ py[m - 1 - k] = py[k];
70411
+ }
70412
+ };
70413
+ /**
70414
+ * Computes the unit inward normals of the arc, the speeds of the arc, and the arc lengths at P[k].
70415
+ *
70416
+ * The normal at P is Np = (-h x / w, -w y / h), whose magnitude is the speed of the arc.
70417
+ * The speed is used to approximate the arc length without extra square roots.
70418
+ */
70419
+ EShapeFanTriangulatedImpl.prototype.computeArcNormals = function (w, h, n, ea) {
70420
+ var m = 2 * n + 1;
70421
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70422
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70423
+ var nx = EShapeFanTriangulatedImpl.WORK_NORMAL_X;
70424
+ var ny = EShapeFanTriangulatedImpl.WORK_NORMAL_Y;
70425
+ var speeds = EShapeFanTriangulatedImpl.WORK_SPEED;
70426
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70427
+ var da = ea / n;
70428
+ var hw = h / w;
70429
+ var wh = w / h;
70430
+ var l = 0;
70431
+ var previous = 0;
70432
+ for (var k = 0; k <= n; ++k) {
70433
+ var dx = -hw * px[k];
70434
+ var dy = -wh * py[k];
70435
+ var speed = Math.sqrt(dx * dx + dy * dy);
70436
+ nx[k] = dx / speed;
70437
+ ny[k] = dy / speed;
70438
+ speeds[k] = speed;
70439
+ if (0 < k) {
70440
+ l += 0.5 * da * (previous + speed);
70441
+ }
70442
+ previous = speed;
70443
+ ls[k] = l;
70444
+ }
70445
+ for (var k = 0; k < n; ++k) {
70446
+ var j = m - 1 - k;
70447
+ nx[j] = -nx[k];
70448
+ ny[j] = ny[k];
70449
+ speeds[j] = speeds[k];
70450
+ ls[j] = 2 * ls[n] - ls[k];
70451
+ }
70452
+ };
70453
+ /**
70454
+ * Computes Q[k], the points on the normals, and their distances from P[k], and returns the maximum distance.
70455
+ *
70456
+ * If chained is true, Q is the point on the medial axis, that is, the point on the normal
70457
+ * whose distance to the arc is equal to the distance to the straight sides.
70458
+ * The distance delta is obtained from delta = -(n . P) - delta (n . normal) for the outward unit normals n of the sides.
70459
+ * The clamps keep Q on the same side of the axis x = 0 as P and before the center of curvature,
70460
+ * otherwise adjacent normals cross each other, which happens for tall ellipses.
70461
+ *
70462
+ * Otherwise, the normal is extended until it reaches x = 0 if w <= h, otherwise y = 0.
70463
+ */
70464
+ EShapeFanTriangulatedImpl.prototype.computeMedialPoints = function (w, h, n, st, ct, chained) {
70465
+ var m = 2 * n + 1;
70466
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70467
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70468
+ var nx = EShapeFanTriangulatedImpl.WORK_NORMAL_X;
70469
+ var ny = EShapeFanTriangulatedImpl.WORK_NORMAL_Y;
70470
+ var speeds = EShapeFanTriangulatedImpl.WORK_SPEED;
70471
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70472
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70473
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70474
+ var u = w <= h ? w / h : h / w;
70475
+ var dmax = 0;
70476
+ for (var k = 0; k <= n; ++k) {
70477
+ var x = px[k];
70478
+ var y = py[k];
70479
+ var nnx = nx[k];
70480
+ var nny = ny[k];
70481
+ var speed = speeds[k];
70482
+ var delta = Infinity;
70483
+ if (chained) {
70484
+ var da = 1 + -ct * nnx + st * nny;
70485
+ if (1e-9 < da) {
70486
+ delta = Math.min(delta, (ct * x - st * y) / da);
70487
+ }
70488
+ var db = 1 + ct * nnx + st * nny;
70489
+ if (1e-9 < db) {
70490
+ delta = Math.min(delta, (-ct * x - st * y) / db);
70491
+ }
70492
+ if (k !== n && 1e-12 < Math.abs(nnx)) {
70493
+ delta = Math.min(delta, -x / nnx);
70494
+ }
70495
+ delta = Math.max(0, Math.min(delta, (speed * speed * speed) / (w * h)));
70496
+ }
70497
+ // The distance between P and Q
70498
+ var d = void 0;
70499
+ if (Number.isFinite(delta)) {
70500
+ d = delta;
70501
+ }
70502
+ else {
70503
+ d = u * speed;
70504
+ }
70505
+ qx[k] = x + d * nnx;
70506
+ qy[k] = y + d * nny;
70507
+ qd[k] = d;
70508
+ dmax = Math.max(dmax, d);
70509
+ }
70510
+ for (var k = 0; k < n; ++k) {
70511
+ var j = m - 1 - k;
70512
+ qx[j] = -qx[k];
70513
+ qy[j] = qy[k];
70514
+ qd[j] = qd[k];
70515
+ }
70516
+ return dmax;
70517
+ };
70518
+ /**
70519
+ * Computes R[k], the points on the arc shifted outward by fs, and their lengths.
70520
+ * If the straight sides are the outline, the end points are shifted
70521
+ * to the intersections of the shifted arc and the shifted straight sides.
70522
+ */
70523
+ EShapeFanTriangulatedImpl.prototype.computeRimPoints = function (w, h, n, fs, st, ct, sea, cea, sided) {
70524
+ var m = 2 * n + 1;
70525
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70526
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70527
+ var nx = EShapeFanTriangulatedImpl.WORK_NORMAL_X;
70528
+ var ny = EShapeFanTriangulatedImpl.WORK_NORMAL_Y;
70529
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70530
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70531
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70532
+ var rl = EShapeFanTriangulatedImpl.WORK_RIM_L;
70533
+ for (var k = 0; k < m; ++k) {
70534
+ var x = px[k] - fs * nx[k];
70535
+ var y = py[k] - fs * ny[k];
70536
+ var l = ls[k];
70537
+ if (sided && (k === 0 || k === m - 1)) {
70538
+ var sign = k === 0 ? -1 : +1;
70539
+ // The miter of the outward normal of the arc (n1) and that of the straight side (n2)
70540
+ var n1x = -nx[k];
70541
+ var n1y = -ny[k];
70542
+ var n2x = sign * ct;
70543
+ var n2y = st;
70544
+ var miter = fs / Math.max(1 + n1x * n2x + n1y * n2y, 0.05);
70545
+ x = px[k] + miter * (n1x + n2x);
70546
+ y = py[k] + miter * (n1y + n2y);
70547
+ // The length is shifted along the tangent (tx, ty) / speed
70548
+ var tx = w * cea;
70549
+ var ty = sign * h * sea;
70550
+ l +=
70551
+ ((x - px[k]) * tx + (y - py[k]) * ty) / EShapeFanTriangulatedImpl.WORK_SPEED[0];
70552
+ }
70553
+ rx[k] = x;
70554
+ ry[k] = y;
70555
+ rl[k] = l;
70556
+ }
70557
+ };
70558
+ /**
70559
+ * Writes the strip P[k], P[k + 1], Q[k + 1], Q[k] with the vertices R[k] and Q[k].
70560
+ */
70561
+ EShapeFanTriangulatedImpl.prototype.writeStrip = function (m, fd, fx, fy, gx, gy) {
70562
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70563
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70564
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70565
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70566
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70567
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70568
+ var rl = EShapeFanTriangulatedImpl.WORK_RIM_L;
70569
+ var scale = EShapeFanTriangulatedImpl.SCALE;
70570
+ var indices = this._indices;
70571
+ var iv = 0;
70572
+ var ii = 0;
70573
+ for (var k = 0; k < m; ++k) {
70574
+ this.writeVertex(iv++, rx[k], ry[k], rl[k], scale, fd, fx, fy, gx, gy);
70575
+ this.writeVertex(iv++, qx[k], qy[k], ls[k], 1 - qd[k] * fd, fd, fx, fy, gx, gy);
70576
+ if (k < m - 1) {
70577
+ var a = 2 * k;
70578
+ indices[ii++] = a;
70579
+ indices[ii++] = a + 2;
70580
+ indices[ii++] = a + 3;
70581
+ indices[ii++] = a;
70582
+ indices[ii++] = a + 3;
70583
+ indices[ii++] = a + 1;
70584
+ }
70585
+ }
70586
+ };
70587
+ /**
70588
+ * Writes the polygon O', R[end], Q[end], ..., Q[N] where the end is 0 for the left (sign = -1)
70589
+ * and 2N for the right (sign = +1). The straight side OA (or OB) is the outline of the polygon.
70590
+ * Returns the number of the written vertices.
70591
+ *
70592
+ * The chain of Q ends at the first point on the axis because the following points go back along the axis.
70593
+ * Q is not always on the medial axis where it is clamped,
70594
+ * so the clipping must not be less than the one of the arc.
70595
+ *
70596
+ * The clipping and the length are computed from the straight side:
70597
+ * the outward unit normal is (sign * ct, st) and the length is oa + arc + (-st, sign * ct) . p.
70598
+ */
70599
+ EShapeFanTriangulatedImpl.prototype.writeSidePolygon = function (iv, ii, sign, n, w, oa, st, ct, fs, fd, fx, fy, gx, gy) {
70600
+ var m = 2 * n + 1;
70601
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70602
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70603
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70604
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70605
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70606
+ var l0 = oa + EShapeFanTriangulatedImpl.WORK_ARC_L[m - 1];
70607
+ var nx = sign * ct;
70608
+ var ly = sign * ct;
70609
+ var eps = 1e-9 * w;
70610
+ var end = sign < 0 ? 0 : m - 1;
70611
+ var count = 0;
70612
+ this.writeSideVertex(iv + count++, 0, fs / st, -Infinity, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70613
+ this.writeSideVertex(iv + count++, rx[end], ry[end], -Infinity, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70614
+ for (var j = 0; j <= n; ++j) {
70615
+ var k = sign < 0 ? j : m - 1 - j;
70616
+ var floor = 1 - qd[k] * fd;
70617
+ this.writeSideVertex(iv + count++, qx[k], qy[k], floor, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70618
+ if (Math.abs(qx[k]) <= eps) {
70619
+ break;
70620
+ }
70621
+ }
70622
+ this.writeFan(ii, iv, count);
70623
+ return count;
70624
+ };
70625
+ /**
70626
+ * Writes the polygon O, Q[end], ..., Q[N] where the end is 0 for the left (sign = -1)
70627
+ * and 2N for the right (sign = +1). The straight sides are hard edges without the stroke.
70628
+ * Returns the number of the written vertices.
70629
+ *
70630
+ * The clipping of O is given by co, and the length of O is the one of the end point.
70631
+ */
70632
+ EShapeFanTriangulatedImpl.prototype.writeCapPolygon = function (iv, ii, sign, n, w, co, fd, fx, fy, gx, gy) {
70633
+ var m = 2 * n + 1;
70634
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70635
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70636
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70637
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70638
+ var eps = 1e-9 * w;
70639
+ var end = sign < 0 ? 0 : m - 1;
70640
+ this.writeVertex(iv, 0, 0, ls[end], co, fd, fx, fy, gx, gy);
70641
+ var count = 1;
70642
+ for (var j = 0; j <= n; ++j) {
70643
+ var k = sign < 0 ? j : m - 1 - j;
70644
+ var clipping = 1 - qd[k] * fd;
70645
+ this.writeVertex(iv + count++, qx[k], qy[k], ls[k], clipping, fd, fx, fy, gx, gy);
70646
+ if (Math.abs(qx[k]) <= eps) {
70647
+ break;
70648
+ }
70649
+ }
70650
+ this.writeFan(ii, iv, count);
70651
+ return count;
70652
+ };
70653
+ /**
70654
+ * The clipping is 1 - (the distance from the straight side) / d where d is the distance from C to OA (or OB).
70655
+ */
70656
+ EShapeFanTriangulatedImpl.prototype.updateBottom = function (w, h, n, ea, sea, cea, bx, by, st, ct, fx, fy, gx, gy, nv, ni) {
70657
+ var boundary = this._boundary;
70658
+ boundary[0] = -bx;
70659
+ boundary[1] = -h;
70660
+ boundary[2] = +bx;
70661
+ boundary[3] = 0;
70662
+ var yc = h / (1 + st);
70663
+ var fd = (1 + st) / (h * st);
70664
+ var fs = (EShapeFanTriangulatedImpl.SCALE - 1) / fd;
70665
+ this.computeArcPoints(w, h, n, ea, sea, cea);
70666
+ // Triangle fans from C to the arc: left (sign = -1) and right (sign = +1)
70667
+ var iv = 0;
70668
+ var ii = 0;
70669
+ for (var sign = -1; sign <= 1; sign += 2) {
70670
+ var count = this.writeBottomFan(iv, ii, sign, n, yc, st, ct, fd, fx, fy, gx, gy);
70671
+ iv += count;
70672
+ ii += 3 * (count - 2);
70673
+ }
70674
+ // Quads at the bottom: O', A', A, C and O', B', B, C
70675
+ for (var sign = -1; sign <= 1; sign += 2) {
70676
+ var count = this.writeBottomQuad(iv, ii, sign, bx, by, yc, fs, st, ct, fd, fx, fy, gx, gy);
70677
+ iv += count;
70678
+ ii += 3 * (count - 2);
70679
+ }
70680
+ this.pad(iv, ii, nv, ni, fd);
70681
+ };
70682
+ /**
70683
+ * Writes the triangle fan from C to the arc of the left half (sign = -1) or the right half (sign = +1).
70684
+ * Returns the number of the written vertices.
70685
+ *
70686
+ * The clipping is 1 + fd * (n . p) where n is the outward unit normal of the straight side,
70687
+ * and the length is the distance along the straight side measured from O.
70688
+ * The side OA has n = (-ct, st) and l = (-st, -ct), and the side OB has n = (ct, st) and l = (st, -ct).
70689
+ */
70690
+ EShapeFanTriangulatedImpl.prototype.writeBottomFan = function (iv, ii, sign, n, yc, st, ct, fd, fx, fy, gx, gy) {
70691
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70692
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70693
+ var nx = sign * ct;
70694
+ var lx = sign * st;
70695
+ var count = 0;
70696
+ this.writeSideVertex(iv + count++, 0, -yc, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70697
+ for (var j = 0; j <= n; ++j) {
70698
+ var k = sign < 0 ? j : n + j;
70699
+ this.writeSideVertex(iv + count++, px[k], py[k], 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70700
+ }
70701
+ this.writeFan(ii, iv, count);
70702
+ return count;
70703
+ };
70704
+ /**
70705
+ * Writes the quad O', A', A, C (sign = -1) or O', B', B, C (sign = +1) at the bottom.
70706
+ * O' is shifted outward by fs / st, and A' (B') is shifted outward by fs perpendicular to the straight side.
70707
+ * Returns the number of the written vertices.
70708
+ */
70709
+ EShapeFanTriangulatedImpl.prototype.writeBottomQuad = function (iv, ii, sign, bx, by, yc, fs, st, ct, fd, fx, fy, gx, gy) {
70710
+ var nx = sign * ct;
70711
+ var lx = sign * st;
70712
+ this.writeSideVertex(iv, 0, fs / st, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70713
+ this.writeSideVertex(iv + 1, sign * (bx + fs * ct), -by + fs * st, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70714
+ this.writeSideVertex(iv + 2, sign * bx, -by, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70715
+ this.writeSideVertex(iv + 3, 0, -yc, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70716
+ this.writeFan(ii, iv, 4);
70717
+ return 4;
70718
+ };
70719
+ // ----------------------------------------------------------------------------------------
70720
+ // Writers
70721
+ // ----------------------------------------------------------------------------------------
70722
+ /**
70723
+ * Writes a vertex whose clipping and length are computed from the parameters of a straight side.
70724
+ * The clipping is 1 + fd * (nx * x + ny * y), which is not less than the given floor,
70725
+ * and the length is l0 + lx * x + ly * y.
70726
+ */
70727
+ EShapeFanTriangulatedImpl.prototype.writeSideVertex = function (vertex, x, y, floor, nx, ny, l0, lx, ly, fd, fx, fy, gx, gy) {
70728
+ var clipping = Math.max(floor, 1 + fd * (nx * x + ny * y));
70729
+ var length = l0 + lx * x + ly * y;
70730
+ this.writeVertex(vertex, x, y, length, clipping, fd, fx, fy, gx, gy);
70731
+ };
70732
+ /**
70733
+ * Writes the indices of a triangle fan from the first vertex.
70734
+ * The number of the written indices is 3 * (count - 2).
70735
+ */
70736
+ EShapeFanTriangulatedImpl.prototype.writeFan = function (ii, iv, count) {
70737
+ var indices = this._indices;
70738
+ for (var i = 1; i < count - 1; ++i) {
70739
+ indices[ii++] = iv;
70740
+ indices[ii++] = iv + i;
70741
+ indices[ii++] = iv + i + 1;
70742
+ }
70743
+ };
70744
+ /**
70745
+ * Writes a vertex.
70746
+ *
70747
+ * @param x - The X coordinate in the frame where the sizes are positive
70748
+ * @param y - The Y coordinate in the frame where the sizes are positive
70749
+ * @param fd - The inverse of the distance where the clipping decreases from 1 to 0
70750
+ * @param fx - The factor to convert x to the UV
70751
+ * @param fy - The factor to convert y to the UV
70752
+ * @param gx - The sign of the X size, which flips the vertex
70753
+ * @param gy - The sign of the Y size, which flips the vertex
70754
+ */
70755
+ EShapeFanTriangulatedImpl.prototype.writeVertex = function (vertex, x, y, length, clipping, fd, fx, fy, gx, gy) {
70756
+ var vertex2 = vertex << 1;
70757
+ this._vertices[vertex2] = gx * x;
70758
+ this._vertices[vertex2 + 1] = gy * y;
70759
+ this._distances[vertex] = fd;
70760
+ this._lengths[vertex] = length;
70761
+ this._clippings[vertex] = clipping;
70762
+ this._uvs[vertex2] = 0.5 * (x * fx + 1);
70763
+ this._uvs[vertex2 + 1] = 1 + y * fy;
70764
+ };
70765
+ /**
70766
+ * Fills the unused tail with degenerated triangles and trims the arrays
70767
+ * so that the buffers always hold exactly `nv` vertices and `ni` triangles.
70768
+ */
70769
+ EShapeFanTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, distance) {
70770
+ for (var i = iv; i < nv; ++i) {
70771
+ var vertex2 = i << 1;
70772
+ this._vertices[vertex2] = 0;
70773
+ this._vertices[vertex2 + 1] = 0;
70774
+ this._distances[i] = distance;
70775
+ this._lengths[i] = 0;
70776
+ this._clippings[i] = 0;
70777
+ this._uvs[vertex2] = 0.5;
70778
+ this._uvs[vertex2 + 1] = 0.5;
70779
+ }
70780
+ for (var i = ii; i < ni * 3; ++i) {
70781
+ this._indices[i] = 0;
70782
+ }
70783
+ this._vertices.length = nv * 2;
70784
+ this._distances.length = nv;
70785
+ this._lengths.length = nv;
70786
+ this._clippings.length = nv;
70787
+ this._uvs.length = nv * 2;
70788
+ this._indices.length = ni * 3;
70789
+ };
70790
+ /** The ratio of the outer edge, where the clipping is 1, to the edge of the anti-aliasing */
70791
+ EShapeFanTriangulatedImpl.SCALE = 1.1;
70792
+ // Work arrays shared by all the instances because they are used only in a single synchronous triangulation.
70793
+ // All of them are indexed by k, which is in [0, 2N].
70794
+ /** P: the points on the arc */
70795
+ EShapeFanTriangulatedImpl.WORK_ARC_X = [];
70796
+ EShapeFanTriangulatedImpl.WORK_ARC_Y = [];
70797
+ /** The arc lengths measured from P[0] */
70798
+ EShapeFanTriangulatedImpl.WORK_ARC_L = [];
70799
+ /** The unit inward normals of the arc */
70800
+ EShapeFanTriangulatedImpl.WORK_NORMAL_X = [];
70801
+ EShapeFanTriangulatedImpl.WORK_NORMAL_Y = [];
70802
+ /** The magnitudes of the tangents, that is, the speeds of the arc */
70803
+ EShapeFanTriangulatedImpl.WORK_SPEED = [];
70804
+ /** Q: the points on the normals */
70805
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_X = [];
70806
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_Y = [];
70807
+ /** The distances from P to Q */
70808
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_D = [];
70809
+ /** R: the points on the arc shifted outward, and their lengths */
70810
+ EShapeFanTriangulatedImpl.WORK_RIM_X = [];
70811
+ EShapeFanTriangulatedImpl.WORK_RIM_Y = [];
70812
+ EShapeFanTriangulatedImpl.WORK_RIM_L = [];
70813
+ return EShapeFanTriangulatedImpl;
70814
+ }());
70815
+
70816
+ /*
70817
+ * Copyright (C) 2019-2026 Toshiba Corporation
70818
+ * SPDX-License-Identifier: Apache-2.0
70819
+ */
70820
+ /**
70821
+ * Tests whether the point is in the fan shrunk by `sa` at the arc and by `ss` at the straight sides.
70822
+ *
70823
+ * @param st - The sine of the half central angle
70824
+ * @param ct - The cosine of the half central angle
70825
+ */
70826
+ var isInFan = function (x, y, ax, ay, st, ct, sa, ss) {
70827
+ var wx = ax - sa;
70828
+ var wy = ay - sa;
70829
+ if (wx <= 0 || wy <= 0) {
70830
+ return false;
70831
+ }
70832
+ var ex = x * wy;
70833
+ var ey = y * wx;
70834
+ if (wx * wy * wx * wy < ex * ex + ey * ey) {
70835
+ return false;
70836
+ }
70837
+ var ay1 = st * y;
70838
+ return -ct * x + ay1 <= -ss && ct * x + ay1 <= -ss;
70839
+ };
70840
+ var hitTestFanFill = function (shape, x, y, bx, by) {
70841
+ var fill = shape.fill;
70842
+ if (fill.enable) {
70843
+ var percent = Math.max(0, Math.min(1, fill.percent));
70844
+ if (1 <= percent) {
70845
+ return true;
70846
+ }
70847
+ // The fill is relative to the bounding box [-bx, +bx] x [-by, 0] of the fan.
70848
+ switch (fill.direction) {
70849
+ case EShapeFillDirection.TOP:
70850
+ return y + by <= percent * by;
70851
+ case EShapeFillDirection.RIGHT:
70852
+ return (1 - percent) * (2 * bx) <= x + bx;
70853
+ case EShapeFillDirection.BOTTOM:
70854
+ return (1 - percent) * by <= y + by;
70855
+ case EShapeFillDirection.LEFT:
70856
+ return x + bx <= percent * (2 * bx);
70857
+ }
70858
+ }
70859
+ return false;
70860
+ };
70861
+ var hitTestFan = function (shape, x, y, ax, ay, sw, ss) {
70862
+ var ca = toFanAngleCentric(shape.angle);
70863
+ if (ca <= 0 || ax <= 0 || ay <= 0) {
70864
+ return false;
70865
+ }
70866
+ var ea = toFanAngleEccentric(ax, ay, ca);
70867
+ var bx = ax * Math.sin(ea);
70868
+ var st = Math.sin(ca);
70869
+ var ct = Math.cos(ca);
70870
+ var fill = shape.fill;
70871
+ var strokeSide = shape.stroke.side;
70872
+ var strokeSideTop = (strokeSide & EShapeStrokeSide.TOP) !== 0;
70873
+ var strokeSideBottom = (strokeSide & EShapeStrokeSide.BOTTOM) !== 0;
70874
+ var strokeWidth = strokeSideTop || strokeSideBottom ? sw : 0;
70875
+ if ((fill.enable || 0 < strokeWidth) && isInFan(x, y, ax, ay, st, ct, 0, 0)) {
70876
+ if (fill.enable && hitTestFanFill(shape, x, y, bx, ay)) {
70877
+ return true;
70878
+ }
70879
+ if (0 < strokeWidth) {
70880
+ var s = strokeWidth * ss;
70881
+ var arc = strokeSideTop ? s : 0;
70882
+ var sides = strokeSideBottom ? s : 0;
70883
+ if (!isInFan(x, y, ax, ay, st, ct, arc, sides)) {
70884
+ return true;
70885
+ }
70886
+ }
70887
+ }
70888
+ return false;
70889
+ };
70890
+
70891
+ /*
70892
+ * Copyright (C) 2019-2026 Toshiba Corporation
70893
+ * SPDX-License-Identifier: Apache-2.0
70894
+ */
70895
+ var EShapeFan = /** @class */ (function (_super) {
70896
+ __extends(EShapeFan, _super);
70897
+ function EShapeFan(type) {
70898
+ if (type === void 0) { type = EShapeType.FAN; }
70899
+ var _this = _super.call(this, type) || this;
70900
+ _this._angle = _this.newAngle();
70901
+ _this._triangulated = _this.newTriangulated();
70902
+ return _this;
70903
+ }
70904
+ EShapeFan.prototype.newAngle = function () {
70905
+ return EShapeDefaults.ANGLE;
70906
+ };
70907
+ EShapeFan.prototype.newTriangulated = function () {
70908
+ return new EShapeFanTriangulatedImpl(this);
70909
+ };
70910
+ Object.defineProperty(EShapeFan.prototype, "triangulated", {
70911
+ get: function () {
70912
+ return this._triangulated;
70913
+ },
70914
+ enumerable: false,
70915
+ configurable: true
70916
+ });
70917
+ Object.defineProperty(EShapeFan.prototype, "angle", {
70918
+ /**
70919
+ * The ratio of the half central angle of the fan to PI. Must be in [0, 0.5].
70920
+ * 0.5 results in a semicircle.
70921
+ */
70922
+ get: function () {
70923
+ return this._angle;
70924
+ },
70925
+ set: function (angle) {
70926
+ if (this._angle !== angle) {
70927
+ this._angle = angle;
70928
+ this.updateUploaded();
70929
+ }
70930
+ },
70931
+ enumerable: false,
70932
+ configurable: true
70933
+ });
70934
+ EShapeFan.prototype.toHitTestStrokeShift = function (strokeWidth, strokeScale, strokeAlign) {
70935
+ if ((this.stroke.side & EShapeStrokeSide.TOP_OR_BOTTOM) !== 0) {
70936
+ return _super.prototype.toHitTestStrokeShift.call(this, strokeWidth, strokeScale, strokeAlign);
70937
+ }
70938
+ return 0;
70939
+ };
70940
+ EShapeFan.prototype.copy = function (source, part) {
70941
+ this.lock(EShapeLockPart.ALL);
70942
+ _super.prototype.copy.call(this, source, part);
70943
+ if ((part == null || part & EShapeCopyPart.STYLE) && source instanceof EShapeFan) {
70944
+ this._angle = source._angle;
70945
+ }
70946
+ this.unlock(EShapeLockPart.ALL, true);
70947
+ return this;
70948
+ };
70949
+ EShapeFan.prototype.clone = function () {
70950
+ return new EShapeFan(this.type).copy(this);
70951
+ };
70952
+ EShapeFan.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
70953
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
70954
+ return hitTestFan(this, x, y, ax, ay, sw, ss);
70955
+ }
70956
+ return false;
70957
+ };
70958
+ EShapeFan.prototype.serialize = function (manager) {
70959
+ var result = _super.prototype.serialize.call(this, manager);
70960
+ result[15] = this._angle;
70961
+ return result;
70962
+ };
70963
+ return EShapeFan;
70964
+ }(EShapePrimitive));
70965
+
70966
+ /*
70967
+ * Copyright (C) 2019-2026 Toshiba Corporation
70968
+ * SPDX-License-Identifier: Apache-2.0
70969
+ */
70970
+ var deserializeFan = function (item, manager, shape) {
70971
+ shape = shape || new EShapeFan();
70972
+ shape.angle = item[15];
70973
+ return deserializeBase(item, manager, shape);
70974
+ };
70975
+
70976
+ /*
70977
+ * Copyright (C) 2019-2026 Toshiba Corporation
70978
+ * SPDX-License-Identifier: Apache-2.0
70979
+ */
70980
+ var loadShapeFan = function () {
70981
+ EShapeUploadeds[EShapeType.FAN] = createPolygonUploaded;
70982
+ EShapeDeserializers[EShapeType.FAN] = deserializeFan;
70983
+ EShapeCapabilities.set(EShapeType.FAN, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE | EShapeCapability.ANGLE);
70984
+ };
70985
+
70094
70986
  /*
70095
70987
  * Copyright (C) 2019 Toshiba Corporation
70096
70988
  * SPDX-License-Identifier: Apache-2.0
@@ -70727,7 +71619,7 @@ var EShapeGroup = /** @class */ (function (_super) {
70727
71619
  if (0 < children.length) {
70728
71620
  return children[children.length - 1].radius;
70729
71621
  }
70730
- return 0.5;
71622
+ return EShapeDefaults.RADIUS;
70731
71623
  },
70732
71624
  set: function (radius) {
70733
71625
  var children = this.children;
@@ -70738,6 +71630,23 @@ var EShapeGroup = /** @class */ (function (_super) {
70738
71630
  enumerable: false,
70739
71631
  configurable: true
70740
71632
  });
71633
+ Object.defineProperty(EShapeGroup.prototype, "angle", {
71634
+ get: function () {
71635
+ var children = this.children;
71636
+ if (0 < children.length) {
71637
+ return children[children.length - 1].angle;
71638
+ }
71639
+ return EShapeDefaults.ANGLE;
71640
+ },
71641
+ set: function (angle) {
71642
+ var children = this.children;
71643
+ for (var i = 0, imax = children.length; i < imax; ++i) {
71644
+ children[i].angle = angle;
71645
+ }
71646
+ },
71647
+ enumerable: false,
71648
+ configurable: true
71649
+ });
70741
71650
  Object.defineProperty(EShapeGroup.prototype, "image", {
70742
71651
  get: function () {
70743
71652
  var children = this.children;
@@ -72744,12 +73653,15 @@ var loadShapeLineOfCircles = function () {
72744
73653
  EShapeDeserializers[EShapeType.LINE_OF_CIRCLES] = deserializeLineOfCircles;
72745
73654
  };
72746
73655
 
73656
+ /*
73657
+ * Copyright (C) 2019 Toshiba Corporation
73658
+ * SPDX-License-Identifier: Apache-2.0
73659
+ */
72747
73660
  var RECTANGLE_ROUNDED_LEGACY_VERTEX_COUNT = 44;
72748
73661
  var RECTANGLE_ROUNDED_LEGACY_INDEX_COUNT = 24;
72749
73662
  var RECTANGLE_ROUNDED_LEGACY_WORLD_SIZE = [
72750
73663
  0, 0, 0, 0, 0
72751
73664
  ];
72752
- var RECTANGLE_ROUNDED_LEGACY_WORK_POINT = new pixi_js.Point();
72753
73665
  var buildRectangleRoundedLegacyIndex = function (indices, voffset, ioffset) {
72754
73666
  // c0 c1 c4 c5
72755
73667
  // |---| |---|
@@ -72863,22 +73775,21 @@ var buildRectangleRoundedLegacyVertex = function (vertices, voffset, originX, or
72863
73775
  var sy = sizeY * 0.5 + (0 <= sizeY ? +s : -s);
72864
73776
  var ax = Math.abs(sx);
72865
73777
  var ay = Math.abs(sy);
72866
- var a = radius * Math.min(ax, ay);
72867
- var rx = a / ax;
72868
- var ry = a / ay;
72869
- var work = RECTANGLE_ROUNDED_LEGACY_WORK_POINT;
72870
- work.set(originX - sx, originY - sy);
72871
- internalTransform.apply(work, work);
72872
- var b0x = work.x;
72873
- var b0y = work.y;
72874
- work.set(originX, originY - sy);
72875
- internalTransform.apply(work, work);
72876
- var b1x = work.x;
72877
- var b1y = work.y;
72878
- work.set(originX - sx, originY);
72879
- internalTransform.apply(work, work);
72880
- var b3x = work.x;
72881
- var b3y = work.y;
73778
+ var az = radius * Math.min(ax, ay);
73779
+ var rx = az / ax;
73780
+ var ry = az / ay;
73781
+ var a = internalTransform.a;
73782
+ var b = internalTransform.b;
73783
+ var c = internalTransform.c;
73784
+ var d = internalTransform.d;
73785
+ var tx = internalTransform.tx;
73786
+ var ty = internalTransform.ty;
73787
+ var b0x = a * (originX - sx) + c * (originY - sy) + tx;
73788
+ var b0y = b * (originX - sx) + d * (originY - sy) + ty;
73789
+ var b1x = a * originX + c * (originY - sy) + tx;
73790
+ var b1y = b * originX + d * (originY - sy) + ty;
73791
+ var b3x = a * (originX - sx) + c * originY + tx;
73792
+ var b3y = b * (originX - sx) + d * originY + ty;
72882
73793
  var d01x = b1x - b0x;
72883
73794
  var d01y = b1y - b0y;
72884
73795
  var d03x = b3x - b0x;
@@ -73104,7 +74015,7 @@ var buildRectangleRoundedLegacyVertex = function (vertices, voffset, originX, or
73104
74015
  // World size
73105
74016
  worldSize[0] = ax;
73106
74017
  worldSize[1] = ay;
73107
- worldSize[2] = a;
74018
+ worldSize[2] = az;
73108
74019
  worldSize[3] = rx;
73109
74020
  worldSize[4] = ry;
73110
74021
  };
@@ -74232,13 +75143,16 @@ var loadShapeLineOfRectangles = function () {
74232
75143
  EShapeCapabilities.set(EShapeType.LINE_OF_RECTANGLES, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
74233
75144
  };
74234
75145
 
74235
- var TRIANGLE_ROUNDED_VERTEX_COUNT = 22;
74236
- var TRIANGLE_ROUNDED_INDEX_COUNT = 15;
74237
- var TRIANGLE_ROUNDED_WORLD_SIZE = [
75146
+ /*
75147
+ * Copyright (C) 2019 Toshiba Corporation
75148
+ * SPDX-License-Identifier: Apache-2.0
75149
+ */
75150
+ var TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT = 22;
75151
+ var TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT = 15;
75152
+ var TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE = [
74238
75153
  0, 0, 0, 0, 0
74239
75154
  ];
74240
- var TRIANGLE_ROUNDED_WORK_POINT = new pixi_js.Point();
74241
- var buildTriangleRoundedIndex = function (indices, voffset, ioffset) {
75155
+ var buildTriangleRoundedLegacyIndex = function (indices, voffset, ioffset) {
74242
75156
  // Top corner
74243
75157
  var ii = ioffset * 3 - 1;
74244
75158
  indices[++ii] = voffset + 0;
@@ -74292,7 +75206,7 @@ var buildTriangleRoundedIndex = function (indices, voffset, ioffset) {
74292
75206
  indices[++ii] = voffset + 21;
74293
75207
  indices[++ii] = voffset + 13;
74294
75208
  };
74295
- var buildTriangleRoundedVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, radius, internalTransform, worldSize) {
75209
+ var buildTriangleRoundedLegacyVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, radius, internalTransform, worldSize) {
74296
75210
  // Calculate the transformed positions
74297
75211
  var s = strokeAlign * strokeWidth;
74298
75212
  var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
@@ -74302,23 +75216,24 @@ var buildTriangleRoundedVertex = function (vertices, voffset, originX, originY,
74302
75216
  var ry = (sw * radius) / (2 * sy);
74303
75217
  var rz = (0.5 * (sz - sw) * radius) / sz;
74304
75218
  var rx = (ry * sz) / (2 * sx);
74305
- var work = TRIANGLE_ROUNDED_WORK_POINT;
74306
- work.set(originX, originY - sy);
74307
- internalTransform.apply(work, work);
74308
- var x1 = work.x;
74309
- var y1 = work.y;
74310
- work.set(originX, originY);
74311
- internalTransform.apply(work, work);
74312
- var tx = work.x;
74313
- var ty = work.y;
74314
- work.set(originX + sx, originY);
74315
- internalTransform.apply(work, work);
74316
- var dx = tx - x1;
74317
- var dy = ty - y1;
74318
- var x4 = work.x + dx;
74319
- var y4 = work.y + dy;
74320
- var x7 = tx + (tx - work.x) + dx;
74321
- var y7 = ty + (ty - work.y) + dy;
75219
+ var a = internalTransform.a;
75220
+ var b = internalTransform.b;
75221
+ var c = internalTransform.c;
75222
+ var d = internalTransform.d;
75223
+ var tx = internalTransform.tx;
75224
+ var ty = internalTransform.ty;
75225
+ var x1 = a * originX + c * (originY - sy) + tx;
75226
+ var y1 = b * originX + d * (originY - sy) + ty;
75227
+ var ox = a * originX + c * originY + tx;
75228
+ var oy = b * originX + d * originY + ty;
75229
+ var dx = ox - x1;
75230
+ var dy = oy - y1;
75231
+ var wx = a * (originX + sx) + c * originY + tx;
75232
+ var wy = b * (originX + sx) + d * originY + ty;
75233
+ var x4 = wx + dx;
75234
+ var y4 = wy + dy;
75235
+ var x7 = ox + (ox - wx) + dx;
75236
+ var y7 = oy + (oy - wy) + dy;
74322
75237
  var dx14 = x4 - x1;
74323
75238
  var dy14 = y4 - y1;
74324
75239
  var x2 = x1 + rz * dx14;
@@ -74337,10 +75252,8 @@ var buildTriangleRoundedVertex = function (vertices, voffset, originX, originY,
74337
75252
  var y8 = y7 + ry * dy71;
74338
75253
  var x9 = x1 - rz * dx71;
74339
75254
  var y9 = y1 - rz * dy71;
74340
- work.set(originX, originY + sy - sw); // Incenter of a triangle
74341
- internalTransform.apply(work, work);
74342
- var x0 = work.x;
74343
- var y0 = work.y;
75255
+ var x0 = a * originX + c * (originY + sy - sw) + tx;
75256
+ var y0 = b * originX + d * (originY + sy - sw) + ty;
74344
75257
  var x10 = x1 + radius * (x0 - x1);
74345
75258
  var y10 = y1 + radius * (y0 - y1);
74346
75259
  var x11 = x4 + radius * (x0 - x4);
@@ -74348,8 +75261,8 @@ var buildTriangleRoundedVertex = function (vertices, voffset, originX, originY,
74348
75261
  var x12 = x7 + radius * (x0 - x7);
74349
75262
  var y12 = y7 + radius * (y0 - y7);
74350
75263
  // World size
74351
- var xb = tx + dx;
74352
- var yb = ty + dy;
75264
+ var xb = ox + dx;
75265
+ var yb = oy + dy;
74353
75266
  worldSize[0] = toLength(xb, yb, x0, y0);
74354
75267
  worldSize[1] = rx;
74355
75268
  worldSize[2] = ry;
@@ -74406,7 +75319,7 @@ var buildTriangleRoundedVertex = function (vertices, voffset, originX, originY,
74406
75319
  vertices[++iv] = x9;
74407
75320
  vertices[++iv] = y9;
74408
75321
  };
74409
- var buildTriangleRoundedStep = function (steps, voffset, strokeWidth, strokeStyle, corner, radius, worldSize) {
75322
+ var buildTriangleRoundedLegacyStep = function (steps, voffset, strokeWidth, strokeStyle, corner, radius, worldSize) {
74410
75323
  var scaleInvariant = toScaleInvariant(strokeStyle);
74411
75324
  var s = worldSize[0];
74412
75325
  var sr = radius * s;
@@ -74677,7 +75590,7 @@ var buildTriangleRoundedStep = function (steps, voffset, strokeWidth, strokeStyl
74677
75590
  steps[++is] = c10;
74678
75591
  steps[++is] = 0;
74679
75592
  };
74680
- var buildTriangleRoundedUv = function (uvs, voffset, textureUvs, radius, worldSize) {
75593
+ var buildTriangleRoundedLegacyUv = function (uvs, voffset, textureUvs, radius, worldSize) {
74681
75594
  var x0 = textureUvs.x0;
74682
75595
  var x1 = textureUvs.x1;
74683
75596
  var x2 = textureUvs.x2;
@@ -74783,8 +75696,8 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
74783
75696
  var ioffset = this.indexOffset;
74784
75697
  var pointCountReserved = this.pointCountReserved;
74785
75698
  if (0 < pointCountReserved) {
74786
- buildTriangleRoundedIndex(buffer.indices, voffset, ioffset);
74787
- copyIndex(buffer.indices, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
75699
+ buildTriangleRoundedLegacyIndex(buffer.indices, voffset, ioffset);
75700
+ copyIndex(buffer.indices, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT, pointCountReserved);
74788
75701
  }
74789
75702
  this.inited |= BuilderFlag.INDEX;
74790
75703
  };
@@ -74793,7 +75706,7 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
74793
75706
  if (points instanceof EShapeLineOfAnyPointsImpl) {
74794
75707
  var buffer = this.buffer;
74795
75708
  this.updateVertexStepAndUv(buffer, shape, points);
74796
- this.updateLineOfAnyColor(buffer, shape, points, TRIANGLE_ROUNDED_VERTEX_COUNT);
75709
+ this.updateLineOfAnyColor(buffer, shape, points, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT);
74797
75710
  }
74798
75711
  };
74799
75712
  BuilderLineOfTriangleRoundeds.prototype.updateVertexStepAndUv = function (buffer, shape, points) {
@@ -74871,17 +75784,17 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
74871
75784
  var pointSizeX = pointSize.getX(0);
74872
75785
  var pointSizeY = pointSize.getY(0);
74873
75786
  // Vertices
74874
- buildTriangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
74875
- copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
75787
+ buildTriangleRoundedLegacyVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
75788
+ copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
74876
75789
  // Steps
74877
75790
  if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
74878
- buildTriangleRoundedStep(steps, voffset, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
74879
- copyStep(steps, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
75791
+ buildTriangleRoundedLegacyStep(steps, voffset, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
75792
+ copyStep(steps, voffset, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, pointCount);
74880
75793
  }
74881
75794
  // UVs
74882
75795
  if (isNotInited || isVertexChanged || isTextureChanged) {
74883
- buildTriangleRoundedUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
74884
- copyUvs(uvs, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
75796
+ buildTriangleRoundedLegacyUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
75797
+ copyUvs(uvs, voffset, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, pointCount);
74885
75798
  }
74886
75799
  }
74887
75800
  else {
@@ -74891,23 +75804,23 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
74891
75804
  var py = pointsValues[ip + 1] + pointOffset.getY(i);
74892
75805
  var pointSizeX = pointSize.getX(i);
74893
75806
  var pointSizeY = pointSize.getY(i);
74894
- var iv = voffset + i * TRIANGLE_ROUNDED_VERTEX_COUNT;
75807
+ var iv = voffset + i * TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
74895
75808
  // Vertices
74896
- buildTriangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
75809
+ buildTriangleRoundedLegacyVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
74897
75810
  // Steps
74898
75811
  if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
74899
- buildTriangleRoundedStep(steps, iv, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
75812
+ buildTriangleRoundedLegacyStep(steps, iv, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
74900
75813
  }
74901
75814
  // UVs
74902
75815
  if (isNotInited || isVertexChanged || isTextureChanged) {
74903
- buildTriangleRoundedUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
75816
+ buildTriangleRoundedLegacyUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
74904
75817
  }
74905
75818
  }
74906
75819
  }
74907
75820
  // Fill the rest
74908
75821
  var pointCountReserved = this.pointCountReserved;
74909
- var voffsetReserved = voffset + pointCount * TRIANGLE_ROUNDED_VERTEX_COUNT;
74910
- var vcountReserved = TRIANGLE_ROUNDED_VERTEX_COUNT * (pointCountReserved - pointCount);
75822
+ var voffsetReserved = voffset + pointCount * TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
75823
+ var vcountReserved = TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT * (pointCountReserved - pointCount);
74911
75824
  buildNullVertex(vertices, voffsetReserved, vcountReserved);
74912
75825
  buildNullStep(steps, voffsetReserved, vcountReserved);
74913
75826
  buildNullUv(uvs, voffsetReserved, vcountReserved);
@@ -74921,16 +75834,15 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
74921
75834
  * SPDX-License-Identifier: Apache-2.0
74922
75835
  */
74923
75836
  var createLineOfTriangleRoundedsUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
74924
- return createLineOfAnyUploaded(buffer, shape, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, antialiasWeight, BuilderLineOfTriangleRoundeds);
75837
+ return createLineOfAnyUploaded(buffer, shape, voffset, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT, antialiasWeight, BuilderLineOfTriangleRoundeds);
74925
75838
  };
74926
75839
 
74927
75840
  /*
74928
75841
  * Copyright (C) 2019 Toshiba Corporation
74929
75842
  * SPDX-License-Identifier: Apache-2.0
74930
75843
  */
74931
- var containsCorner_ = function (shape, x, y, r, aw, sw, ss) {
74932
- var fill = shape.fill;
74933
- if (fill.enable) {
75844
+ var containsCorner_ = function (x, y, r, aw, sw, ss, filled) {
75845
+ if (filled) {
74934
75846
  if (x * x + y * y <= r * r) {
74935
75847
  return true;
74936
75848
  }
@@ -74948,7 +75860,7 @@ var containsCorner_ = function (shape, x, y, r, aw, sw, ss) {
74948
75860
  }
74949
75861
  return false;
74950
75862
  };
74951
- var containsCorner = function (shape, x, y, x0, y0, x1, y1, x2, y2, x3, y3, r12, r13, aw, radius, sw, ss) {
75863
+ var containsCorner = function (x, y, x0, y0, x1, y1, x2, y2, x3, y3, r12, r13, aw, radius, sw, ss, filled) {
74952
75864
  var xl = x1 + r12 * (x2 - x1) - x0;
74953
75865
  var yl = y1 + r12 * (y2 - y1) - y0;
74954
75866
  var n = Math.sqrt(xl * xl + yl * yl);
@@ -74968,14 +75880,14 @@ var containsCorner = function (shape, x, y, x0, y0, x1, y1, x2, y2, x3, y3, r12,
74968
75880
  var yc = y - y0;
74969
75881
  var dx = (+nry * xc - nrx * yc) * deti;
74970
75882
  var dy = (-nly * xc + nlx * yc) * deti;
74971
- if (containsCorner_(shape, dx, dy, n, aw * radius, sw, ss)) {
75883
+ if (containsCorner_(dx, dy, n, aw * radius, sw, ss, filled)) {
74972
75884
  return true;
74973
75885
  }
74974
75886
  }
74975
75887
  }
74976
75888
  return false;
74977
75889
  };
74978
- var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
75890
+ var hitTestTriangleRoundedImpl = function (shape, x, y, ax, ay, sw, ss, filled) {
74979
75891
  var a = (2 * ay) / ax;
74980
75892
  if (hitTestTriangleFilled(x, y, a, -ay, +ay)) {
74981
75893
  var az = Math.sqrt(ax * ax + 4 * ay * ay);
@@ -75002,7 +75914,7 @@ var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
75002
75914
  if (!c0 && !c1 && corner & EShapeCorner.TOP) {
75003
75915
  // Top corner
75004
75916
  var rz = (0.5 * (az - aw) * radius) / az;
75005
- if (containsCorner(shape, x, y, x10, y10, x1, y1, x7, y7, x4, y4, rz, rz, aw, radius, sw, ss)) {
75917
+ if (containsCorner(x, y, x10, y10, x1, y1, x7, y7, x4, y4, rz, rz, aw, radius, sw, ss, filled)) {
75006
75918
  return true;
75007
75919
  }
75008
75920
  }
@@ -75010,7 +75922,7 @@ var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
75010
75922
  // Bottom-left corner
75011
75923
  var ry = (aw * radius) / (2 * ay);
75012
75924
  var rx = (ry * az) / (2 * ax);
75013
- if (containsCorner(shape, x, y, x12, y12, x7, y7, x4, y4, x1, y1, rx, ry, aw, radius, sw, ss)) {
75925
+ if (containsCorner(x, y, x12, y12, x7, y7, x4, y4, x1, y1, rx, ry, aw, radius, sw, ss, filled)) {
75014
75926
  return true;
75015
75927
  }
75016
75928
  }
@@ -75018,14 +75930,13 @@ var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
75018
75930
  // Bottom-right corner
75019
75931
  var ry = (aw * radius) / (2 * ay);
75020
75932
  var rx = (ry * az) / (2 * ax);
75021
- if (containsCorner(shape, x, y, x11, y11, x4, y4, x1, y1, x7, y7, ry, rx, aw, radius, sw, ss)) {
75933
+ if (containsCorner(x, y, x11, y11, x4, y4, x1, y1, x7, y7, ry, rx, aw, radius, sw, ss, filled)) {
75022
75934
  return true;
75023
75935
  }
75024
75936
  }
75025
75937
  else {
75026
75938
  // Others
75027
- var fill = shape.fill;
75028
- if (fill.enable) {
75939
+ if (filled) {
75029
75940
  return true;
75030
75941
  }
75031
75942
  else {
@@ -75043,27 +75954,88 @@ var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
75043
75954
  }
75044
75955
  return false;
75045
75956
  };
75957
+ var hitTestTriangleRoundedLegacy = function (shape, x, y, ax, ay, sw, ss) {
75958
+ return hitTestTriangleRoundedImpl(shape, x, y, ax, ay, sw, ss, shape.fill.enable);
75959
+ };
75960
+ /**
75961
+ * Returns true if the point is in the cone with the apex (cx, cy) spanned by the unit normals n1 and n2
75962
+ * but outside the circle of radius `rho`, that is, in the part cut off by a rounded corner.
75963
+ */
75964
+ var isCutByCorner = function (x, y, cx, cy, n1x, n1y, n2x, n2y, rho) {
75965
+ var dx = x - cx;
75966
+ var dy = y - cy;
75967
+ var det = n1x * n2y - n1y * n2x;
75968
+ var a = (dx * n2y - dy * n2x) / det;
75969
+ var b = (n1x * dy - n1y * dx) / det;
75970
+ return 0 <= a && 0 <= b && rho * rho < dx * dx + dy * dy;
75971
+ };
75972
+ /**
75973
+ * Tests whether the point is in the rounded triangle shrunk by `s`.
75974
+ * Sharp corners and corners whose radius is not larger than `s` stay sharp.
75975
+ */
75976
+ var hitTestTriangleRoundedInset = function (shape, x, y, ax, ay, s) {
75977
+ var az = Math.sqrt(ax * ax + 4 * ay * ay);
75978
+ // The outward unit normals of the left side (nlx, nly) and the right side (-nlx, nly)
75979
+ var nlx = (-2 * ay) / az;
75980
+ var nly = -ax / az;
75981
+ var yt = y + ay;
75982
+ if (-s < nlx * x + nly * yt || -s < -nlx * x + nly * yt || ay - s < y) {
75983
+ return false;
75984
+ }
75985
+ var radius = shape.radius;
75986
+ var aw = (2 * ax * ay) / (ax + az);
75987
+ var rho = radius * aw - s;
75988
+ if (0 < rho) {
75989
+ var corner = shape.corner;
75990
+ var cby = ay - radius * aw;
75991
+ if (corner & EShapeCorner.TOP &&
75992
+ isCutByCorner(x, y, 0, -ay + radius * (2 * ay - aw), nlx, nly, -nlx, nly, rho)) {
75993
+ return false;
75994
+ }
75995
+ if (corner & EShapeCorner.BOTTOM_RIGHT &&
75996
+ isCutByCorner(x, y, ax * (1 - radius), cby, -nlx, nly, 0, 1, rho)) {
75997
+ return false;
75998
+ }
75999
+ if (corner & EShapeCorner.BOTTOM_LEFT &&
76000
+ isCutByCorner(x, y, -ax * (1 - radius), cby, nlx, nly, 0, 1, rho)) {
76001
+ return false;
76002
+ }
76003
+ }
76004
+ return true;
76005
+ };
76006
+ var hitTestTriangleRounded = function (shape, x, y, ax, ay, sw, ss) {
76007
+ var fill = shape.fill;
76008
+ if ((fill.enable || 0 < sw) && hitTestTriangleRoundedInset(shape, x, y, ax, ay, 0)) {
76009
+ if (fill.enable && hitTestFill(x, y, ax, ay, fill)) {
76010
+ return true;
76011
+ }
76012
+ if (0 < sw && !hitTestTriangleRoundedInset(shape, x, y, ax, ay, sw * ss)) {
76013
+ return true;
76014
+ }
76015
+ }
76016
+ return false;
76017
+ };
75046
76018
 
75047
76019
  /*
75048
76020
  * Copyright (C) 2019 Toshiba Corporation
75049
76021
  * SPDX-License-Identifier: Apache-2.0
75050
76022
  */
75051
- var EShapeTriangleRounded = /** @class */ (function (_super) {
75052
- __extends(EShapeTriangleRounded, _super);
75053
- function EShapeTriangleRounded(type) {
75054
- if (type === void 0) { type = EShapeType.TRIANGLE_ROUNDED; }
76023
+ var EShapeTriangleRoundedLegacy = /** @class */ (function (_super) {
76024
+ __extends(EShapeTriangleRoundedLegacy, _super);
76025
+ function EShapeTriangleRoundedLegacy(type) {
76026
+ if (type === void 0) { type = EShapeType.TRIANGLE_ROUNDED_LEGACY; }
75055
76027
  return _super.call(this, type) || this;
75056
76028
  }
75057
- EShapeTriangleRounded.prototype.clone = function () {
75058
- return new EShapeTriangleRounded(this.type).copy(this);
76029
+ EShapeTriangleRoundedLegacy.prototype.clone = function () {
76030
+ return new EShapeTriangleRoundedLegacy(this.type).copy(this);
75059
76031
  };
75060
- EShapeTriangleRounded.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
76032
+ EShapeTriangleRoundedLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
75061
76033
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
75062
- return hitTestTriangleRounded(this, x, y, ax, ay, sw, ss);
76034
+ return hitTestTriangleRoundedLegacy(this, x, y, ax, ay, sw, ss);
75063
76035
  }
75064
76036
  return false;
75065
76037
  };
75066
- return EShapeTriangleRounded;
76038
+ return EShapeTriangleRoundedLegacy;
75067
76039
  }(EShapePrimitive));
75068
76040
 
75069
76041
  /*
@@ -75110,7 +76082,7 @@ var EShapeLineOfTriangleRoundeds = /** @class */ (function (_super) {
75110
76082
  return false;
75111
76083
  };
75112
76084
  return EShapeLineOfTriangleRoundeds;
75113
- }(EShapeTriangleRounded));
76085
+ }(EShapeTriangleRoundedLegacy));
75114
76086
 
75115
76087
  /*
75116
76088
  * Copyright (C) 2019 Toshiba Corporation
@@ -75412,7 +76384,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75412
76384
  boundary[2] = +ax;
75413
76385
  boundary[3] = +ay;
75414
76386
  // # of vertices and # of indices
75415
- var nv = 7;
76387
+ var nv = 9;
75416
76388
  var ni = 3;
75417
76389
  this._nvertices = nv;
75418
76390
  this._nindices = ni;
@@ -75467,11 +76439,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75467
76439
  // vertices (-sx, sy) and (sx, sy). The signs of sx and
75468
76440
  // sy intentionally preserve horizontal and vertical reflections.
75469
76441
  // The sloped edge spans ax horizontally and 2 * ay vertically.
75470
- var side = Math.sqrt(ax * ax + 4 * ay * ay);
75471
- // The base is horizontal, so its length is twice the half-width.
75472
- var base = 2 * ax;
75473
- // Length values are measured along the triangle perimeter.
75474
- var perimeter = 2 * side + base;
76442
+ var b = Math.sqrt(ax * ax + 4 * ay * ay);
75475
76443
  // The incenter lies on the vertical center line. This is its y-coordinate.
75476
76444
  // Along the median, the distances from the top vertex to the incenter and
75477
76445
  // from the incenter to the base are in the ratio 2 * side : base.
@@ -75483,42 +76451,47 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75483
76451
  // cy = ay (2 side - 2 ax) / (2 side + 2 ax)
75484
76452
  // cy = ay (side - ax) / (side + ax)
75485
76453
  var cx = 0;
75486
- var cy = (sy * (side - ax)) / (side + ax);
76454
+ var cy = (sy * (b - ax)) / (b + ax);
75487
76455
  // The distance from the incenter to every edge is the inradius.
75488
76456
  // Since 0 <= (side - ax) / (side + ax) <= 1, the incenter remains
75489
76457
  // between the apex and the base even when sy is negative.
75490
- var distance = Math.abs(sy - cy);
75491
- var fdistance = 1 / distance;
76458
+ var d = Math.abs(sy - cy);
76459
+ var fd = 1 / d;
75492
76460
  // Expand the triangle around its incenter for anti-aliasing and strokes.
75493
- // The outer vertices are shared where their interpolated attributes match.
75494
76461
  var x0 = 0;
75495
76462
  var y0 = cy + scale * (-sy - cy);
75496
76463
  var x1 = scale * sx;
75497
76464
  var y1 = cy + scale * (sy - cy);
75498
76465
  var x2 = -x1;
75499
76466
  var y2 = y1;
75500
- // Top-to-right edge cell. The inner vertex carries the fill attributes.
75501
- this.updateVertex(0, x0, y0, fdistance, 0, scale, fx, fy);
75502
- this.updateVertex(1, x1, y1, fdistance, side, scale, fx, fy);
75503
- this.updateVertex(2, cx, cy, fdistance, side - ax, 0, fx, fy);
76467
+ // Each cell has its own vertices because `length` is the arc length projected onto
76468
+ // the cell's edge. It is `lc` at the incenter (the tangent point) and
76469
+ // `lc + scale * (l - lc)` at the outer vertices so that it equals `l` at clipping = 1.
75504
76470
  var indices = this._indices;
75505
- indices[0] = 0;
75506
- indices[1] = 1;
75507
- indices[2] = 2;
75508
- // Right-to-left base edge cell. The right and left outer vertices are reused.
75509
- this.updateVertex(3, x2, y2, fdistance, side + base, scale, fx, fy);
75510
- this.updateVertex(4, cx, cy, fdistance, side + ax, 0, fx, fy);
75511
- indices[3] = 1;
75512
- indices[4] = 3;
75513
- indices[5] = 4;
75514
- // Left-to-top edge cell. The top vertex is duplicated for the perimeter seam.
75515
- this.updateVertex(5, x0, y0, fdistance, perimeter, scale, fx, fy);
75516
- this.updateVertex(6, cx, cy, fdistance, perimeter - (side - ax), 0, fx, fy);
75517
- indices[6] = 3;
75518
- indices[7] = 5;
75519
- indices[8] = 6;
75520
- };
75521
- EShapeTriangleTriangulatedImpl.prototype.updateVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
76471
+ // Top-to-right edge cell
76472
+ var l0 = 0;
76473
+ var l1 = l0 + b;
76474
+ var lc0 = b - ax;
76475
+ this.writeVertex(0, x0, y0, fd, lc0 + scale * (l0 - lc0), scale, fx, fy);
76476
+ this.writeVertex(1, x1, y1, fd, lc0 + scale * (l1 - lc0), scale, fx, fy);
76477
+ this.writeVertex(2, cx, cy, fd, lc0, 0, fx, fy);
76478
+ // Right-to-left base edge cell
76479
+ var l2 = l1 + 2 * ax;
76480
+ var lc1 = b + ax;
76481
+ this.writeVertex(3, x1, y1, fd, lc1 + scale * (l1 - lc1), scale, fx, fy);
76482
+ this.writeVertex(4, x2, y2, fd, lc1 + scale * (l2 - lc1), scale, fx, fy);
76483
+ this.writeVertex(5, cx, cy, fd, lc1, 0, fx, fy);
76484
+ // Left-to-top edge cell
76485
+ var l3 = l2 + b;
76486
+ var lc2 = b + 3 * ax;
76487
+ this.writeVertex(6, x2, y2, fd, lc2 + scale * (l2 - lc2), scale, fx, fy);
76488
+ this.writeVertex(7, x0, y0, fd, lc2 + scale * (l3 - lc2), scale, fx, fy);
76489
+ this.writeVertex(8, cx, cy, fd, lc2, 0, fx, fy);
76490
+ for (var i = 0; i < 9; ++i) {
76491
+ indices[i] = i;
76492
+ }
76493
+ };
76494
+ EShapeTriangleTriangulatedImpl.prototype.writeVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
75522
76495
  var vertex2 = vertex << 1;
75523
76496
  this._vertices[vertex2] = x;
75524
76497
  this._vertices[vertex2 + 1] = y;
@@ -77529,14 +78502,13 @@ var EShapePolygon = /** @class */ (function (_super) {
77529
78502
  return new EShapePolygon(this.type).copy(this);
77530
78503
  };
77531
78504
  EShapePolygon.prototype.copy = function (source, part) {
77532
- if (part === void 0) { part = EShapeCopyPart.ALL; }
77533
78505
  this.lock(EShapeLockPart.ALL);
77534
- var result = _super.prototype.copy.call(this, source, part);
77535
- if (part & EShapeCopyPart.POINTS && source instanceof EShapePolygon) {
78506
+ _super.prototype.copy.call(this, source, part);
78507
+ if ((part == null || part & EShapeCopyPart.POINTS) && source instanceof EShapePolygon) {
77536
78508
  this._triangulated.copy(source._triangulated);
77537
78509
  }
77538
78510
  this.unlock(EShapeLockPart.ALL, true);
77539
- return result;
78511
+ return this;
77540
78512
  };
77541
78513
  EShapePolygon.prototype.serialize = function (manager) {
77542
78514
  var result = _super.prototype.serialize.call(this, manager);
@@ -77873,11 +78845,84 @@ var loadShapeRectangleRoundedLegacy = function () {
77873
78845
  EShapeCapabilities.set(EShapeType.RECTANGLE_ROUNDED_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE | EShapeCapability.BORDER_RADIUS);
77874
78846
  };
77875
78847
 
77876
- var SEMICIRCLE_VERTEX_COUNT = 6;
77877
- var SEMICIRCLE_INDEX_COUNT = 4;
77878
- var SEMICIRCLE_WORLD_SIZE = [0, 0];
77879
- var SEMICIRCLE_WORK_POINT = new pixi_js.Point();
77880
- var buildSemicircleIndex = function (indices, voffset, ioffset) {
78848
+ /*
78849
+ * Copyright (C) 2019-2026 Toshiba Corporation
78850
+ * SPDX-License-Identifier: Apache-2.0
78851
+ */
78852
+ /**
78853
+ * A semicircle shape.
78854
+ */
78855
+ var EShapeSemicircle = /** @class */ (function (_super) {
78856
+ __extends(EShapeSemicircle, _super);
78857
+ function EShapeSemicircle(type) {
78858
+ if (type === void 0) { type = EShapeType.SEMICIRCLE; }
78859
+ var _this = _super.call(this, type) || this;
78860
+ _this._triangulated = _this.newTriangulated();
78861
+ return _this;
78862
+ }
78863
+ EShapeSemicircle.prototype.newStroke = function () {
78864
+ return new EShapeStrokeImpl(this, true, EShapeDefaults.STROKE_COLOR, EShapeDefaults.STROKE_ALPHA, EShapeDefaults.STROKE_WIDTH, EShapeDefaults.STROKE_ALIGN, EShapeDefaults.STROKE_SIDE & ~EShapeStrokeSide.BOTTOM, EShapeDefaults.STROKE_STYLE);
78865
+ };
78866
+ EShapeSemicircle.prototype.newTriangulated = function () {
78867
+ return new EShapeFanTriangulatedImpl(this);
78868
+ };
78869
+ Object.defineProperty(EShapeSemicircle.prototype, "triangulated", {
78870
+ get: function () {
78871
+ return this._triangulated;
78872
+ },
78873
+ enumerable: false,
78874
+ configurable: true
78875
+ });
78876
+ Object.defineProperty(EShapeSemicircle.prototype, "angle", {
78877
+ get: function () {
78878
+ return 0.5;
78879
+ },
78880
+ set: function (angle) {
78881
+ // DO NOTHING
78882
+ },
78883
+ enumerable: false,
78884
+ configurable: true
78885
+ });
78886
+ EShapeSemicircle.prototype.toHitTestStrokeShift = function (strokeWidth, strokeScale, strokeAlign) {
78887
+ if ((this.stroke.side & EShapeStrokeSide.TOP_OR_BOTTOM) !== 0) {
78888
+ return _super.prototype.toHitTestStrokeShift.call(this, strokeWidth, strokeScale, strokeAlign);
78889
+ }
78890
+ return 0;
78891
+ };
78892
+ EShapeSemicircle.prototype.clone = function () {
78893
+ return new EShapeSemicircle(this.type).copy(this);
78894
+ };
78895
+ EShapeSemicircle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
78896
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
78897
+ return hitTestFan(this, x, y, ax, ay, sw, ss);
78898
+ }
78899
+ return false;
78900
+ };
78901
+ return EShapeSemicircle;
78902
+ }(EShapePrimitive));
78903
+
78904
+ /*
78905
+ * Copyright (C) 2019 Toshiba Corporation
78906
+ * SPDX-License-Identifier: Apache-2.0
78907
+ */
78908
+ var deserializeSemicircle = function (item, manager, shape) {
78909
+ return deserializeBase(item, manager, shape || new EShapeSemicircle());
78910
+ };
78911
+
78912
+ /*
78913
+ * Copyright (C) 2019 Toshiba Corporation
78914
+ * SPDX-License-Identifier: Apache-2.0
78915
+ */
78916
+ var loadShapeSemicircle = function () {
78917
+ EShapeUploadeds[EShapeType.SEMICIRCLE] = createPolygonUploaded;
78918
+ EShapeDeserializers[EShapeType.SEMICIRCLE] = deserializeSemicircle;
78919
+ EShapeCapabilities.set(EShapeType.SEMICIRCLE, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
78920
+ };
78921
+
78922
+ var SEMICIRCLE_LEGACY_VERTEX_COUNT = 6;
78923
+ var SEMICIRCLE_LEGACY_INDEX_COUNT = 4;
78924
+ var SEMICIRCLE_LEGACY_WORLD_SIZE = [0, 0];
78925
+ var buildSemicircleLegacyIndex = function (indices, voffset, ioffset) {
77881
78926
  var ii = ioffset * 3 - 1;
77882
78927
  indices[++ii] = voffset;
77883
78928
  indices[++ii] = voffset + 1;
@@ -77892,7 +78937,7 @@ var buildSemicircleIndex = function (indices, voffset, ioffset) {
77892
78937
  indices[++ii] = voffset + 5;
77893
78938
  indices[++ii] = voffset + 4;
77894
78939
  };
77895
- var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
78940
+ var buildSemicircleLegacyVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
77896
78941
  // Calculate the transformed positions
77897
78942
  //
77898
78943
  // 0 1 2
@@ -77900,24 +78945,23 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77900
78945
  // |3 |4 |5
77901
78946
  // |-------|-------|
77902
78947
  //
77903
- var work = SEMICIRCLE_WORK_POINT;
77904
78948
  var s = strokeAlign * strokeWidth;
77905
78949
  var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
77906
78950
  var sy = sizeY * 0.5 + (0 <= sizeY ? +s : -s);
77907
- work.set(-sx + originX, -sy + originY);
77908
- internalTransform.apply(work, work);
77909
- var x0 = work.x;
77910
- var y0 = work.y;
77911
- work.set(0 + originX, -sy + originY);
77912
- internalTransform.apply(work, work);
77913
- var x1 = work.x;
77914
- var y1 = work.y;
78951
+ var a = internalTransform.a;
78952
+ var b = internalTransform.b;
78953
+ var c = internalTransform.c;
78954
+ var d = internalTransform.d;
78955
+ var tx = internalTransform.tx;
78956
+ var ty = internalTransform.ty;
78957
+ var x0 = a * (-sx + originX) + c * (-sy + originY) + tx;
78958
+ var y0 = b * (-sx + originX) + d * (-sy + originY) + ty;
78959
+ var x1 = a * originX + c * (-sy + originY) + tx;
78960
+ var y1 = b * originX + d * (-sy + originY) + ty;
77915
78961
  var dx = x1 - x0;
77916
78962
  var dy = y1 - y0;
77917
- work.set(originX, originY);
77918
- internalTransform.apply(work, work);
77919
- var x4 = work.x;
77920
- var y4 = work.y;
78963
+ var x4 = a * originX + c * originY + tx;
78964
+ var y4 = b * originX + d * originY + ty;
77921
78965
  var x3 = x4 - dx;
77922
78966
  var y3 = y4 - dy;
77923
78967
  // Vertices
@@ -77937,7 +78981,7 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77937
78981
  worldSize[0] = toLength(x0, y0, x1, y1);
77938
78982
  worldSize[1] = toLength(x0, y0, x3, y3);
77939
78983
  };
77940
- var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
78984
+ var buildSemicircleLegacyStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
77941
78985
  var scaleInvariant = toScaleInvariant(strokeStyle);
77942
78986
  var ws0 = worldSize[0];
77943
78987
  var ws1 = worldSize[1];
@@ -77984,7 +79028,7 @@ var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, wo
77984
79028
  steps[++is] = c10;
77985
79029
  steps[++is] = 0;
77986
79030
  };
77987
- var buildSemicircleUv = function (uvs, voffset, textureUvs) {
79031
+ var buildSemicircleLegacyUv = function (uvs, voffset, textureUvs) {
77988
79032
  var x0 = textureUvs.x0;
77989
79033
  var x1 = textureUvs.x1;
77990
79034
  var x2 = textureUvs.x2;
@@ -78013,25 +79057,25 @@ var buildSemicircleUv = function (uvs, voffset, textureUvs) {
78013
79057
  * Copyright (C) 2019 Toshiba Corporation
78014
79058
  * SPDX-License-Identifier: Apache-2.0
78015
79059
  */
78016
- var BuilderSemicircle = /** @class */ (function (_super) {
78017
- __extends(BuilderSemicircle, _super);
78018
- function BuilderSemicircle(buffer, vertexOffset, indexOffset) {
78019
- return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
79060
+ var BuilderSemicircleLegacy = /** @class */ (function (_super) {
79061
+ __extends(BuilderSemicircleLegacy, _super);
79062
+ function BuilderSemicircleLegacy(buffer, vertexOffset, indexOffset) {
79063
+ return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_LEGACY_VERTEX_COUNT, SEMICIRCLE_LEGACY_INDEX_COUNT) || this;
78020
79064
  }
78021
- BuilderSemicircle.prototype.init = function () {
79065
+ BuilderSemicircleLegacy.prototype.init = function () {
78022
79066
  var buffer = this.buffer;
78023
79067
  buffer.updateIndices();
78024
79068
  var voffset = this.vertexOffset;
78025
- buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
79069
+ buildSemicircleLegacyIndex(buffer.indices, voffset, this.indexOffset);
78026
79070
  this.inited |= BuilderFlag.INDEX;
78027
79071
  };
78028
- BuilderSemicircle.prototype.update = function (shape) {
79072
+ BuilderSemicircleLegacy.prototype.update = function (shape) {
78029
79073
  var buffer = this.buffer;
78030
79074
  this.updateVertexAndStep(buffer, shape);
78031
79075
  this.updateColor(buffer, shape);
78032
79076
  this.updateUv(buffer, shape);
78033
79077
  };
78034
- BuilderSemicircle.prototype.updateVertexAndStep = function (buffer, shape) {
79078
+ BuilderSemicircleLegacy.prototype.updateVertexAndStep = function (buffer, shape) {
78035
79079
  var size = shape.size;
78036
79080
  var sizeX = size.x;
78037
79081
  var sizeY = size.y;
@@ -78057,11 +79101,11 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78057
79101
  // Buffer
78058
79102
  buffer.updateVertices();
78059
79103
  buffer.updateSteps();
78060
- buildSemicircleVertex(buffer.vertices, this.vertexOffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, SEMICIRCLE_WORLD_SIZE);
78061
- buildSemicircleStep(buffer.steps, this.vertexOffset, strokeWidth, strokeStyle, SEMICIRCLE_WORLD_SIZE);
79104
+ buildSemicircleLegacyVertex(buffer.vertices, this.vertexOffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, SEMICIRCLE_LEGACY_WORLD_SIZE);
79105
+ buildSemicircleLegacyStep(buffer.steps, this.vertexOffset, strokeWidth, strokeStyle, SEMICIRCLE_LEGACY_WORLD_SIZE);
78062
79106
  }
78063
79107
  };
78064
- BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
79108
+ BuilderSemicircleLegacy.prototype.updateUv = function (buffer, shape) {
78065
79109
  var texture = toTexture(shape);
78066
79110
  var textureTransformId = toTextureTransformId(texture);
78067
79111
  var isNotInited = !(this.inited & BuilderFlag.UV);
@@ -78073,26 +79117,26 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78073
79117
  this.textureTransformId = textureTransformId;
78074
79118
  buffer.updateUvs();
78075
79119
  var textureUvs = toTextureUvs(texture);
78076
- buildSemicircleUv(buffer.uvs, this.vertexOffset, textureUvs);
79120
+ buildSemicircleLegacyUv(buffer.uvs, this.vertexOffset, textureUvs);
78077
79121
  }
78078
79122
  };
78079
- return BuilderSemicircle;
79123
+ return BuilderSemicircleLegacy;
78080
79124
  }(BuilderBase));
78081
79125
 
78082
79126
  /*
78083
79127
  * Copyright (C) 2019 Toshiba Corporation
78084
79128
  * SPDX-License-Identifier: Apache-2.0
78085
79129
  */
78086
- var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
79130
+ var createSemicircleLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
78087
79131
  var tcount = toTextBufferCount(shape);
78088
79132
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
78089
79133
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
78090
- var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
78091
- var icount = SEMICIRCLE_INDEX_COUNT + ticount;
79134
+ var vcount = SEMICIRCLE_LEGACY_VERTEX_COUNT + tvcount;
79135
+ var icount = SEMICIRCLE_LEGACY_INDEX_COUNT + ticount;
78092
79136
  if (buffer.check(voffset, ioffset, vcount, icount)) {
78093
79137
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
78094
- new BuilderSemicircle(buffer, voffset, ioffset),
78095
- new BuilderText(buffer, voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
79138
+ new BuilderSemicircleLegacy(buffer, voffset, ioffset),
79139
+ new BuilderText(buffer, voffset + SEMICIRCLE_LEGACY_VERTEX_COUNT, ioffset + SEMICIRCLE_LEGACY_INDEX_COUNT, tvcount, ticount)
78096
79140
  ]).init(shape);
78097
79141
  }
78098
79142
  return null;
@@ -78115,44 +79159,42 @@ var hitTestSemicircle = function (shape, x, y, ax, ay, sw, ss) {
78115
79159
  */
78116
79160
  /**
78117
79161
  * A semicircle shape.
78118
- *
78119
- * @beta
78120
79162
  */
78121
- var EShapeSemicircle = /** @class */ (function (_super) {
78122
- __extends(EShapeSemicircle, _super);
78123
- function EShapeSemicircle(type) {
78124
- if (type === void 0) { type = EShapeType.SEMICIRCLE; }
79163
+ var EShapeSemicircleLegacy = /** @class */ (function (_super) {
79164
+ __extends(EShapeSemicircleLegacy, _super);
79165
+ function EShapeSemicircleLegacy(type) {
79166
+ if (type === void 0) { type = EShapeType.SEMICIRCLE_LEGACY; }
78125
79167
  var _this = _super.call(this, type) || this;
78126
79168
  _this.stroke.side = EShapeStrokeSide.ALL & ~EShapeStrokeSide.BOTTOM;
78127
79169
  return _this;
78128
79170
  }
78129
- EShapeSemicircle.prototype.clone = function () {
78130
- return new EShapeSemicircle(this.type).copy(this);
79171
+ EShapeSemicircleLegacy.prototype.clone = function () {
79172
+ return new EShapeSemicircleLegacy(this.type).copy(this);
78131
79173
  };
78132
- EShapeSemicircle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
79174
+ EShapeSemicircleLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
78133
79175
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
78134
79176
  return hitTestSemicircle(this, x, y, ax, ay, sw, ss);
78135
79177
  }
78136
79178
  return false;
78137
79179
  };
78138
- return EShapeSemicircle;
79180
+ return EShapeSemicircleLegacy;
78139
79181
  }(EShapePrimitive));
78140
79182
 
78141
79183
  /*
78142
79184
  * Copyright (C) 2019 Toshiba Corporation
78143
79185
  * SPDX-License-Identifier: Apache-2.0
78144
79186
  */
78145
- var deserializeSemicircle = function (item, manager, shape) {
78146
- return deserializeBase(item, manager, shape || new EShapeSemicircle());
79187
+ var deserializeSemicircleLegacy = function (item, manager, shape) {
79188
+ return deserializeBase(item, manager, shape || new EShapeSemicircleLegacy());
78147
79189
  };
78148
79190
 
78149
79191
  /*
78150
79192
  * Copyright (C) 2019 Toshiba Corporation
78151
79193
  * SPDX-License-Identifier: Apache-2.0
78152
79194
  */
78153
- var loadShapeSemicircle = function () {
78154
- EShapeUploadeds[EShapeType.SEMICIRCLE] = createSemicircleUploaded;
78155
- EShapeDeserializers[EShapeType.SEMICIRCLE] = deserializeSemicircle;
79195
+ var loadShapeSemicircleLegacy = function () {
79196
+ EShapeUploadeds[EShapeType.SEMICIRCLE_LEGACY] = createSemicircleLegacyUploaded;
79197
+ EShapeDeserializers[EShapeType.SEMICIRCLE_LEGACY] = deserializeSemicircleLegacy;
78156
79198
  };
78157
79199
 
78158
79200
  /*
@@ -78295,30 +79337,516 @@ var loadShapeTriangleLegacy = function () {
78295
79337
  EShapeDeserializers[EShapeType.TRIANGLE_LEGACY] = deserializeTriangleLegacy;
78296
79338
  };
78297
79339
 
79340
+ /*
79341
+ * Copyright (C) 2019-2026 Toshiba Corporation
79342
+ * SPDX-License-Identifier: Apache-2.0
79343
+ */
79344
+ var EShapeTriangleRoundedTriangulatedImpl = /** @class */ (function () {
79345
+ function EShapeTriangleRoundedTriangulatedImpl(parent) {
79346
+ this._id = 0;
79347
+ this._parent = parent;
79348
+ this._width = 0;
79349
+ this._height = 0;
79350
+ this._strokeAlign = 0;
79351
+ this._strokeWidth = 0;
79352
+ this._sizeX = 0;
79353
+ this._sizeY = 0;
79354
+ this._radius = 0;
79355
+ this._corner = EShapeCorner.NONE;
79356
+ this._vertices = [];
79357
+ this._nvertices = 0;
79358
+ this._distances = [];
79359
+ this._lengths = [];
79360
+ this._clippings = [];
79361
+ this._uvs = [];
79362
+ this._indices = [];
79363
+ this._nindices = 0;
79364
+ this._boundary = [0, 0, 0, 0];
79365
+ }
79366
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "id", {
79367
+ get: function () {
79368
+ this.triangulate();
79369
+ return this._id;
79370
+ },
79371
+ enumerable: false,
79372
+ configurable: true
79373
+ });
79374
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "vertices", {
79375
+ get: function () {
79376
+ this.triangulate();
79377
+ return this._vertices;
79378
+ },
79379
+ enumerable: false,
79380
+ configurable: true
79381
+ });
79382
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "nvertices", {
79383
+ get: function () {
79384
+ this.triangulate();
79385
+ return this._nvertices;
79386
+ },
79387
+ enumerable: false,
79388
+ configurable: true
79389
+ });
79390
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "distances", {
79391
+ get: function () {
79392
+ this.triangulate();
79393
+ return this._distances;
79394
+ },
79395
+ enumerable: false,
79396
+ configurable: true
79397
+ });
79398
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "lengths", {
79399
+ get: function () {
79400
+ this.triangulate();
79401
+ return this._lengths;
79402
+ },
79403
+ enumerable: false,
79404
+ configurable: true
79405
+ });
79406
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "clippings", {
79407
+ get: function () {
79408
+ this.triangulate();
79409
+ return this._clippings;
79410
+ },
79411
+ enumerable: false,
79412
+ configurable: true
79413
+ });
79414
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "uvs", {
79415
+ get: function () {
79416
+ this.triangulate();
79417
+ return this._uvs;
79418
+ },
79419
+ enumerable: false,
79420
+ configurable: true
79421
+ });
79422
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "indices", {
79423
+ get: function () {
79424
+ this.triangulate();
79425
+ return this._indices;
79426
+ },
79427
+ enumerable: false,
79428
+ configurable: true
79429
+ });
79430
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "nindices", {
79431
+ get: function () {
79432
+ this.triangulate();
79433
+ return this._nindices;
79434
+ },
79435
+ enumerable: false,
79436
+ configurable: true
79437
+ });
79438
+ Object.defineProperty(EShapeTriangleRoundedTriangulatedImpl.prototype, "boundary", {
79439
+ get: function () {
79440
+ this.triangulate();
79441
+ return this._boundary;
79442
+ },
79443
+ enumerable: false,
79444
+ configurable: true
79445
+ });
79446
+ EShapeTriangleRoundedTriangulatedImpl.prototype.triangulate = function () {
79447
+ var isNotInitialized = this._id === 0;
79448
+ var parent = this._parent;
79449
+ var size = parent.size;
79450
+ var width = size.x;
79451
+ var height = size.y;
79452
+ var isRectChanged = this._width !== width || this._height !== height;
79453
+ var stroke = parent.stroke;
79454
+ var strokeAlign = stroke.align;
79455
+ var strokeWidth = stroke.enable ? stroke.width : 0;
79456
+ var isStrokeChanged = this._strokeAlign !== strokeAlign || this._strokeWidth !== strokeWidth;
79457
+ var radius = parent.radius;
79458
+ var isRadiusChanged = this._radius !== radius;
79459
+ var corner = parent.corner;
79460
+ var isCornerChanged = this._corner !== corner;
79461
+ var isSizeChanged = false;
79462
+ var sizeX = this._sizeX;
79463
+ var sizeY = this._sizeY;
79464
+ if (isRectChanged || isStrokeChanged) {
79465
+ this._width = width;
79466
+ this._height = height;
79467
+ this._strokeAlign = strokeAlign;
79468
+ this._strokeWidth = strokeWidth;
79469
+ var s = strokeAlign * strokeWidth;
79470
+ sizeX = width * 0.5 + (0 <= width ? +s : -s);
79471
+ sizeY = height * 0.5 + (0 <= height ? +s : -s);
79472
+ isSizeChanged = this._sizeX !== sizeX || this._sizeY !== sizeY;
79473
+ }
79474
+ if (isNotInitialized ||
79475
+ isSizeChanged ||
79476
+ isStrokeChanged ||
79477
+ isRadiusChanged ||
79478
+ isCornerChanged) {
79479
+ this._sizeX = sizeX;
79480
+ this._sizeY = sizeY;
79481
+ this._radius = radius;
79482
+ this._corner = corner;
79483
+ this.update(sizeX, sizeY, radius, corner);
79484
+ }
79485
+ };
79486
+ EShapeTriangleRoundedTriangulatedImpl.prototype.update = function (sx, sy, radius, corner) {
79487
+ var boundary = this._boundary;
79488
+ var ax = Math.abs(sx);
79489
+ var ay = Math.abs(sy);
79490
+ boundary[0] = -ax;
79491
+ boundary[1] = -ay;
79492
+ boundary[2] = +ax;
79493
+ boundary[3] = +ay;
79494
+ var n = EShapeDefaults.CIRCLE_SEGMENT_COUNT >> 2;
79495
+ var nv = 9 * n + 6;
79496
+ var ni = 3 * n + 6;
79497
+ this._nvertices = nv;
79498
+ this._nindices = ni;
79499
+ this._id += 1;
79500
+ if (ax <= 0 || ay <= 0) {
79501
+ this.pad(0, 0, nv, ni, 0);
79502
+ return;
79503
+ }
79504
+ var scale = 1.1;
79505
+ var az = 2 * ay;
79506
+ var b0 = Math.sqrt(ax * ax + az * az);
79507
+ var r0 = (ax * az) / (ax + b0);
79508
+ var r = radius * r0;
79509
+ var fs = (scale - 1) * r0;
79510
+ var rs = r + fs;
79511
+ var r0i = 1 / r0;
79512
+ var rr0 = r * r0i;
79513
+ var a0 = ax * rr0;
79514
+ var b1 = b0 - a0;
79515
+ var b2 = b0 - ax;
79516
+ var b3 = b2 * rr0;
79517
+ var b0i = 1 / b0;
79518
+ var b1b0 = b1 * b0i;
79519
+ var b3b0 = b3 * b0i;
79520
+ var b2b0 = b2 * b0i;
79521
+ var gx = Math.sign(sx);
79522
+ var x0 = -sx;
79523
+ var x1 = -sx + gx * ax * (1 - b1b0);
79524
+ var x2 = -sx + gx * ax * rr0;
79525
+ var x3 = -sx + gx * ax * (1 - b3b0);
79526
+ var x4 = 0;
79527
+ var x6 = -x2;
79528
+ var xl = -sx + gx * ax * (1 - b2b0);
79529
+ var gy = Math.sign(sy);
79530
+ var y0 = -sy;
79531
+ var y1 = -sy + gy * az * b3b0;
79532
+ var y2 = -sy + gy * (az - r0) * rr0;
79533
+ var y3 = -sy + gy * (az - r0);
79534
+ var y4 = -sy + gy * az * b1b0;
79535
+ var y5 = -sy + gy * (az - r);
79536
+ var y6 = +sy;
79537
+ var yc = -sy + gy * az * b2b0;
79538
+ var dlx = xl - x4;
79539
+ var dly = yc - y3;
79540
+ var nlx = dlx * r0i;
79541
+ var nly = dly * r0i;
79542
+ var nrx = -nlx;
79543
+ var nry = nly;
79544
+ var nbx = 0;
79545
+ var nby = gy;
79546
+ var tt = (nrx * (nrx - nlx) + nry * (nry - nly)) / (nry * nlx - nrx * nly);
79547
+ var tl = (nbx * (nbx - nlx) + nby * (nby - nly)) / (nby * nlx - nbx * nly);
79548
+ var sx0 = x0 + (nlx - nly * tl) * fs;
79549
+ var sx1 = x1 + nlx * fs;
79550
+ var sx3 = x3 + nlx * fs;
79551
+ var sx5 = -sx3;
79552
+ var sx7 = -sx1;
79553
+ var sx8 = -sx0;
79554
+ var sy0 = y0 + (nly + nlx * tt) * fs;
79555
+ var sy1 = y1 + nly * fs;
79556
+ var sy4 = y4 + nly * fs;
79557
+ var sy6 = y6 + gy * fs;
79558
+ var fd = r0i;
79559
+ var fx = 1 / sx;
79560
+ var fy = 1 / sy;
79561
+ var ct = 0 < r && !!(corner & EShapeCorner.TOP);
79562
+ var cr = 0 < r && !!(corner & EShapeCorner.BOTTOM_RIGHT);
79563
+ var cl = 0 < r && !!(corner & EShapeCorner.BOTTOM_LEFT);
79564
+ var aapex = ct || cr || cl ? Math.atan2(ax, az) : 0;
79565
+ var gz = gx * gy;
79566
+ var atop = gz * (Math.PI - 2 * aapex);
79567
+ var abottom = gz * (Math.PI * 0.5 + aapex);
79568
+ // Top Fan
79569
+ var iv = 0;
79570
+ var ii = 0;
79571
+ var l = 0;
79572
+ if (ct) {
79573
+ l = this.writeFan(x4, y2, sx3, sy1, atop, nlx, nly, l, r, rs, fd, scale, fx, fy, n, iv, ii);
79574
+ iv += 3 * (n - 1);
79575
+ ii += 3 * (n - 1);
79576
+ }
79577
+ // Right Pentagon
79578
+ var p1x = sx5;
79579
+ var p1y = sy1;
79580
+ var ttx = x3;
79581
+ var tty = y1;
79582
+ if (!ct) {
79583
+ p1x = x4;
79584
+ p1y = sy0;
79585
+ ttx = x4;
79586
+ tty = y0;
79587
+ }
79588
+ var p2x = sx7;
79589
+ var p2y = sy4;
79590
+ var trbx = -x1;
79591
+ var trby = y4;
79592
+ if (!cr) {
79593
+ p2x = sx8;
79594
+ p2y = sy6;
79595
+ trbx = -x0;
79596
+ trby = y6;
79597
+ }
79598
+ var lr = Math.sqrt((trbx + ttx) * (trbx + ttx) + (trby - tty) * (trby - tty));
79599
+ var lrc = Math.sqrt((ttx - xl) * (ttx - xl) + (yc - tty) * (yc - tty));
79600
+ var nlr = l + lr;
79601
+ var tdx = sx * b0i;
79602
+ var tdy = 2 * sy * b0i;
79603
+ var lr1 = l + (p1x + ttx) * tdx + (p1y - tty) * tdy;
79604
+ var lr2 = nlr + (p2x - trbx) * tdx + (p2y - trby) * tdy;
79605
+ var c0 = scale;
79606
+ var c1 = 1 - radius;
79607
+ this.writePenta(ct ? x4 : p1x, ct ? y2 : p1y, p1x, p1y, p2x, p2y, cr ? x6 : p2x, cr ? y5 : p2y, x4, y3, ct ? l : lr1, lr1, lr2, cr ? nlr : lr2, l + lrc, ct ? c1 : c0, c0, c0, cr ? c1 : c0, 0, fd, fx, fy, iv, ii);
79608
+ iv += 5;
79609
+ ii += 9;
79610
+ l = nlr;
79611
+ // Right Fan
79612
+ if (cr) {
79613
+ l = this.writeFan(x6, y5, sx7, sy4, abottom, nrx, nry, l, r, rs, fd, scale, fx, fy, n, iv, ii);
79614
+ iv += 3 * (n - 1);
79615
+ ii += 3 * (n - 1);
79616
+ }
79617
+ // Bottom Pentagon
79618
+ var p3x = x6;
79619
+ var p3y = sy6;
79620
+ var q3x = x6;
79621
+ var q3y = y5;
79622
+ var tbrx = x6;
79623
+ if (!cr) {
79624
+ p3x = sx8;
79625
+ q3x = p3x;
79626
+ q3y = p3y;
79627
+ tbrx = -x0;
79628
+ }
79629
+ var p4x = x2;
79630
+ var p4y = sy6;
79631
+ var q4x = x2;
79632
+ var q4y = y5;
79633
+ var tblx = x2;
79634
+ if (!cl) {
79635
+ p4x = sx0;
79636
+ q4x = p4x;
79637
+ q4y = p4y;
79638
+ tblx = x0;
79639
+ }
79640
+ var lb = Math.abs(tbrx - tblx);
79641
+ var lbc = Math.abs(tbrx - x4);
79642
+ var nlb = l + lb;
79643
+ var lb1 = l - gx * (p3x - tbrx);
79644
+ var lb2 = nlb - gx * (p4x - tblx);
79645
+ this.writePenta(q3x, q3y, p3x, p3y, p4x, p4y, q4x, q4y, x4, y3, cr ? l : lb1, lb1, lb2, cl ? nlb : lb2, l + lbc, cr ? c1 : c0, c0, c0, cl ? c1 : c0, 0, fd, fx, fy, iv, ii);
79646
+ iv += 5;
79647
+ ii += 9;
79648
+ l = nlb;
79649
+ // Left Fan
79650
+ if (cl) {
79651
+ l = this.writeFan(x2, y5, x2, sy6, abottom, nbx, nby, l, r, rs, fd, scale, fx, fy, n, iv, ii);
79652
+ iv += 3 * (n - 1);
79653
+ ii += 3 * (n - 1);
79654
+ }
79655
+ // Left Pentagon
79656
+ var p5x = sx1;
79657
+ var p5y = sy4;
79658
+ var q5x = x2;
79659
+ var q5y = y5;
79660
+ var tlbx = x1;
79661
+ var tlby = y4;
79662
+ if (!cl) {
79663
+ p5x = sx0;
79664
+ p5y = sy6;
79665
+ q5x = p5x;
79666
+ q5y = p5y;
79667
+ tlbx = x0;
79668
+ tlby = y6;
79669
+ }
79670
+ var p6x = sx3;
79671
+ var p6y = sy1;
79672
+ var q6x = x4;
79673
+ var q6y = y2;
79674
+ if (!ct) {
79675
+ p6x = x4;
79676
+ p6y = sy0;
79677
+ q6x = p6x;
79678
+ q6y = p6y;
79679
+ }
79680
+ var ll = Math.sqrt((tlbx - ttx) * (tlbx - ttx) + (tlby - tty) * (tlby - tty));
79681
+ var llc = Math.sqrt((xl - tlbx) * (xl - tlbx) + (yc - tlby) * (yc - tlby));
79682
+ var nll = l + ll;
79683
+ var ll0 = nll + (p6x - ttx) * tdx - (p6y - tty) * tdy;
79684
+ var ll4 = l + (p5x - tlbx) * tdx - (p5y - tlby) * tdy;
79685
+ this.writePenta(p6x, p6y, q6x, q6y, x4, y3, q5x, q5y, p5x, p5y, ll0, ct ? nll : ll0, l + llc, cl ? l : ll4, ll4, c0, ct ? c1 : c0, 0, cl ? c1 : c0, c0, fd, fx, fy, iv, ii);
79686
+ iv += 5;
79687
+ ii += 9;
79688
+ this.pad(iv, ii, nv, ni, fd);
79689
+ };
79690
+ EShapeTriangleRoundedTriangulatedImpl.prototype.writePenta = function (x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, length0, length1, length2, length3, length4, clipping0, clipping1, clipping2, clipping3, clipping4, distance, fx, fy, iv, ii) {
79691
+ this.writeVertex(iv + 0, x0, y0, distance, length0, clipping0, fx, fy);
79692
+ this.writeVertex(iv + 1, x1, y1, distance, length1, clipping1, fx, fy);
79693
+ this.writeVertex(iv + 2, x2, y2, distance, length2, clipping2, fx, fy);
79694
+ this.writeVertex(iv + 3, x3, y3, distance, length3, clipping3, fx, fy);
79695
+ this.writeVertex(iv + 4, x4, y4, distance, length4, clipping4, fx, fy);
79696
+ var indices = this._indices;
79697
+ indices[ii + 0] = iv + 0;
79698
+ indices[ii + 1] = iv + 1;
79699
+ indices[ii + 2] = iv + 2;
79700
+ indices[ii + 3] = iv + 0;
79701
+ indices[ii + 4] = iv + 2;
79702
+ indices[ii + 5] = iv + 3;
79703
+ indices[ii + 6] = iv + 0;
79704
+ indices[ii + 7] = iv + 3;
79705
+ indices[ii + 8] = iv + 4;
79706
+ };
79707
+ EShapeTriangleRoundedTriangulatedImpl.prototype.writeFan = function (cx, cy, x0, y0, dt, nx, ny, l0, r, rs, fd, scale, fx, fy, n, iv, ii) {
79708
+ var m = n - 1;
79709
+ var da = dt / m;
79710
+ var dl = Math.abs(da) * r;
79711
+ // Rim vertices at radius rs sit dl / 2 * (rs / r) from the chord midpoint, so the length is exact at radius r.
79712
+ var dlm = 0.5 * dl * (rs / r - 1);
79713
+ var c0 = scale;
79714
+ var c1 = 1 - r * fd;
79715
+ var indices = this._indices;
79716
+ var l = l0;
79717
+ var xa = x0;
79718
+ var ya = y0;
79719
+ for (var i = 0; i < m; i += 1) {
79720
+ var angle = (i + 1) * da;
79721
+ var ca = Math.cos(angle);
79722
+ var sa = Math.sin(angle);
79723
+ var xb = cx + rs * (nx * ca - ny * sa);
79724
+ var yb = cy + rs * (nx * sa + ny * ca);
79725
+ var nl = l + dl;
79726
+ this.writeVertex(iv + 0, xa, ya, fd, l - dlm, c0, fx, fy);
79727
+ this.writeVertex(iv + 1, xb, yb, fd, nl + dlm, c0, fx, fy);
79728
+ this.writeVertex(iv + 2, cx, cy, fd, l + 0.5 * dl, c1, fx, fy);
79729
+ indices[ii + 0] = iv + 2;
79730
+ indices[ii + 1] = iv + 0;
79731
+ indices[ii + 2] = iv + 1;
79732
+ iv += 3;
79733
+ ii += 3;
79734
+ l = nl;
79735
+ xa = xb;
79736
+ ya = yb;
79737
+ }
79738
+ return l;
79739
+ };
79740
+ EShapeTriangleRoundedTriangulatedImpl.prototype.writeVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
79741
+ var vertex2 = vertex << 1;
79742
+ this._vertices[vertex2] = x;
79743
+ this._vertices[vertex2 + 1] = y;
79744
+ this._distances[vertex] = distance;
79745
+ this._lengths[vertex] = length;
79746
+ this._clippings[vertex] = clipping;
79747
+ this._uvs[vertex2] = 0.5 * (x * fx + 1);
79748
+ this._uvs[vertex2 + 1] = 0.5 * (y * fy + 1);
79749
+ };
79750
+ EShapeTriangleRoundedTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, distance) {
79751
+ for (var i = iv; i < nv; ++i) {
79752
+ var vertex2 = i << 1;
79753
+ this._vertices[vertex2] = 0;
79754
+ this._vertices[vertex2 + 1] = 0;
79755
+ this._distances[i] = distance;
79756
+ this._lengths[i] = 0;
79757
+ this._clippings[i] = 0;
79758
+ this._uvs[vertex2] = 0.5;
79759
+ this._uvs[vertex2 + 1] = 0.5;
79760
+ }
79761
+ for (var i = ii; i < ni * 3; ++i) {
79762
+ this._indices[i] = 0;
79763
+ }
79764
+ this._vertices.length = nv * 2;
79765
+ this._distances.length = nv;
79766
+ this._lengths.length = nv;
79767
+ this._clippings.length = nv;
79768
+ this._uvs.length = nv * 2;
79769
+ this._indices.length = ni * 3;
79770
+ };
79771
+ return EShapeTriangleRoundedTriangulatedImpl;
79772
+ }());
79773
+
79774
+ /*
79775
+ * Copyright (C) 2019-2026 Toshiba Corporation
79776
+ * SPDX-License-Identifier: Apache-2.0
79777
+ */
79778
+ var EShapeTriangleRounded = /** @class */ (function (_super) {
79779
+ __extends(EShapeTriangleRounded, _super);
79780
+ function EShapeTriangleRounded(type) {
79781
+ if (type === void 0) { type = EShapeType.TRIANGLE_ROUNDED; }
79782
+ var _this = _super.call(this, type) || this;
79783
+ _this._triangulated = _this.newTriangulated();
79784
+ return _this;
79785
+ }
79786
+ EShapeTriangleRounded.prototype.newTriangulated = function () {
79787
+ return new EShapeTriangleRoundedTriangulatedImpl(this);
79788
+ };
79789
+ Object.defineProperty(EShapeTriangleRounded.prototype, "triangulated", {
79790
+ get: function () {
79791
+ return this._triangulated;
79792
+ },
79793
+ enumerable: false,
79794
+ configurable: true
79795
+ });
79796
+ EShapeTriangleRounded.prototype.clone = function () {
79797
+ return new EShapeTriangleRounded(this.type).copy(this);
79798
+ };
79799
+ EShapeTriangleRounded.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
79800
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
79801
+ return hitTestTriangleRounded(this, x, y, ax, ay, sw, ss);
79802
+ }
79803
+ return false;
79804
+ };
79805
+ return EShapeTriangleRounded;
79806
+ }(EShapePrimitive));
79807
+
79808
+ /*
79809
+ * Copyright (C) 2019 Toshiba Corporation
79810
+ * SPDX-License-Identifier: Apache-2.0
79811
+ */
79812
+ var deserializeTriangleRounded = function (item, manager, shape) {
79813
+ return deserializeBase(item, manager, shape || new EShapeTriangleRounded());
79814
+ };
79815
+
79816
+ /*
79817
+ * Copyright (C) 2019 Toshiba Corporation
79818
+ * SPDX-License-Identifier: Apache-2.0
79819
+ */
79820
+ var loadShapeTriangleRounded = function () {
79821
+ EShapeUploadeds[EShapeType.TRIANGLE_ROUNDED] = createPolygonUploaded;
79822
+ EShapeDeserializers[EShapeType.TRIANGLE_ROUNDED] = deserializeTriangleRounded;
79823
+ EShapeCapabilities.set(EShapeType.TRIANGLE_ROUNDED, EShapeCapability.PRIMITIVE | EShapeCapability.BORDER_RADIUS);
79824
+ };
79825
+
78298
79826
  /*
78299
79827
  * Copyright (C) 2019 Toshiba Corporation
78300
79828
  * SPDX-License-Identifier: Apache-2.0
78301
79829
  */
78302
- var BuilderTriangleRounded = /** @class */ (function (_super) {
78303
- __extends(BuilderTriangleRounded, _super);
78304
- function BuilderTriangleRounded(buffer, vertexOffset, indexOffset) {
78305
- var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_ROUNDED_VERTEX_COUNT, TRIANGLE_ROUNDED_INDEX_COUNT) || this;
79830
+ var BuilderTriangleRoundedLegacy = /** @class */ (function (_super) {
79831
+ __extends(BuilderTriangleRoundedLegacy, _super);
79832
+ function BuilderTriangleRoundedLegacy(buffer, vertexOffset, indexOffset) {
79833
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT) || this;
78306
79834
  _this.radius = 0;
78307
79835
  _this.corner = 0;
78308
79836
  return _this;
78309
79837
  }
78310
- BuilderTriangleRounded.prototype.init = function () {
79838
+ BuilderTriangleRoundedLegacy.prototype.init = function () {
78311
79839
  var buffer = this.buffer;
78312
79840
  buffer.updateIndices();
78313
- buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
79841
+ buildTriangleRoundedLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
78314
79842
  this.inited |= BuilderFlag.INDEX;
78315
79843
  };
78316
- BuilderTriangleRounded.prototype.update = function (shape) {
79844
+ BuilderTriangleRoundedLegacy.prototype.update = function (shape) {
78317
79845
  var buffer = this.buffer;
78318
79846
  this.updateVertexStepAndUv(buffer, shape);
78319
79847
  this.updateColor(buffer, shape);
78320
79848
  };
78321
- BuilderTriangleRounded.prototype.updateVertexStepAndUv = function (buffer, shape) {
79849
+ BuilderTriangleRoundedLegacy.prototype.updateVertexStepAndUv = function (buffer, shape) {
78322
79850
  var size = shape.size;
78323
79851
  var sizeX = size.x;
78324
79852
  var sizeY = size.y;
@@ -78359,55 +79887,55 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
78359
79887
  this.textureTransformId = textureTransformId;
78360
79888
  var voffset = this.vertexOffset;
78361
79889
  buffer.updateVertices();
78362
- buildTriangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
79890
+ buildTriangleRoundedLegacyVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
78363
79891
  if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
78364
79892
  buffer.updateSteps();
78365
- buildTriangleRoundedStep(buffer.steps, voffset, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
79893
+ buildTriangleRoundedLegacyStep(buffer.steps, voffset, strokeWidth, strokeStyle, corner, radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
78366
79894
  }
78367
79895
  if (isNotInited || isVertexChanged || isTextureChanged) {
78368
79896
  buffer.updateUvs();
78369
- buildTriangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_WORLD_SIZE);
79897
+ buildTriangleRoundedLegacyUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE);
78370
79898
  }
78371
79899
  }
78372
79900
  };
78373
- return BuilderTriangleRounded;
79901
+ return BuilderTriangleRoundedLegacy;
78374
79902
  }(BuilderBase));
78375
79903
 
78376
79904
  /*
78377
79905
  * Copyright (C) 2019 Toshiba Corporation
78378
79906
  * SPDX-License-Identifier: Apache-2.0
78379
79907
  */
78380
- var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
79908
+ var createTriangleRoundedLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
78381
79909
  var tcount = toTextBufferCount(shape);
78382
79910
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
78383
79911
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
78384
- var vcount = TRIANGLE_ROUNDED_VERTEX_COUNT + tvcount;
78385
- var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
79912
+ var vcount = TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT + tvcount;
79913
+ var icount = TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT + ticount;
78386
79914
  if (buffer.check(voffset, ioffset, vcount, icount)) {
78387
79915
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
78388
- new BuilderTriangleRounded(buffer, voffset, ioffset),
78389
- new BuilderText(buffer, voffset + TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
79916
+ new BuilderTriangleRoundedLegacy(buffer, voffset, ioffset),
79917
+ new BuilderText(buffer, voffset + TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT, tvcount, ticount)
78390
79918
  ]).init(shape);
78391
79919
  }
78392
79920
  return null;
78393
79921
  };
78394
79922
 
78395
79923
  /*
78396
- * Copyright (C) 2019 Toshiba Corporation
79924
+ * Copyright (C) 2019-2026 Toshiba Corporation
78397
79925
  * SPDX-License-Identifier: Apache-2.0
78398
79926
  */
78399
- var deserializeTriangleRounded = function (item, manager, shape) {
78400
- return deserializeBase(item, manager, shape || new EShapeTriangleRounded());
79927
+ var deserializeTriangleRoundedLegacy = function (item, manager, shape) {
79928
+ return deserializeBase(item, manager, shape || new EShapeTriangleRoundedLegacy());
78401
79929
  };
78402
79930
 
78403
79931
  /*
78404
79932
  * Copyright (C) 2019 Toshiba Corporation
78405
79933
  * SPDX-License-Identifier: Apache-2.0
78406
79934
  */
78407
- var loadShapeTriangleRounded = function () {
78408
- EShapeUploadeds[EShapeType.TRIANGLE_ROUNDED] = createTriangleRoundedUploaded;
78409
- EShapeDeserializers[EShapeType.TRIANGLE_ROUNDED] = deserializeTriangleRounded;
78410
- EShapeCapabilities.set(EShapeType.TRIANGLE_ROUNDED, EShapeCapability.PRIMITIVE | EShapeCapability.BORDER_RADIUS);
79935
+ var loadShapeTriangleRoundedLegacy = function () {
79936
+ EShapeUploadeds[EShapeType.TRIANGLE_ROUNDED_LEGACY] = createTriangleRoundedLegacyUploaded;
79937
+ EShapeDeserializers[EShapeType.TRIANGLE_ROUNDED_LEGACY] = deserializeTriangleRoundedLegacy;
79938
+ EShapeCapabilities.set(EShapeType.TRIANGLE_ROUNDED_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.BORDER_RADIUS);
78411
79939
  };
78412
79940
 
78413
79941
  /*
@@ -78422,6 +79950,7 @@ var loadShapeAll = function () {
78422
79950
  loadShapeConnectorElbow();
78423
79951
  loadShapeConnectorLine();
78424
79952
  loadShapeEmbedded();
79953
+ loadShapeFan();
78425
79954
  loadShapeGroupShadowed();
78426
79955
  loadShapeGroup();
78427
79956
  loadShapeImage();
@@ -78435,8 +79964,10 @@ var loadShapeAll = function () {
78435
79964
  loadShapeRectangleRoundedLegacy();
78436
79965
  loadShapeRectangleRounded();
78437
79966
  loadShapeRectangle();
79967
+ loadShapeSemicircleLegacy();
78438
79968
  loadShapeSemicircle();
78439
79969
  loadShapeTriangleLegacy();
79970
+ loadShapeTriangleRoundedLegacy();
78440
79971
  loadShapeTriangleRounded();
78441
79972
  loadShapeTriangle();
78442
79973
  loadShapeLineOfCircles();
@@ -109573,11 +111104,12 @@ exports.BuilderRectangleLegacy = BuilderRectangleLegacy;
109573
111104
  exports.BuilderRectanglePivoted = BuilderRectanglePivoted;
109574
111105
  exports.BuilderRectangleRounded = BuilderRectangleRoundedLegacy;
109575
111106
  exports.BuilderRectangleRoundedLegacy = BuilderRectangleRoundedLegacy;
109576
- exports.BuilderSemicircle = BuilderSemicircle;
111107
+ exports.BuilderSemicircle = BuilderSemicircleLegacy;
109577
111108
  exports.BuilderText = BuilderText;
109578
111109
  exports.BuilderTriangle = BuilderTriangleLegacy;
109579
111110
  exports.BuilderTriangleLegacy = BuilderTriangleLegacy;
109580
- exports.BuilderTriangleRounded = BuilderTriangleRounded;
111111
+ exports.BuilderTriangleRounded = BuilderTriangleRoundedLegacy;
111112
+ exports.BuilderTriangleRoundedLegacy = BuilderTriangleRoundedLegacy;
109581
111113
  exports.CIRCLE_INDEX_COUNT = CIRCLE_LEGACY_INDEX_COUNT;
109582
111114
  exports.CIRCLE_LEGACY_INDEX_COUNT = CIRCLE_LEGACY_INDEX_COUNT;
109583
111115
  exports.CIRCLE_LEGACY_VERTEX_COUNT = CIRCLE_LEGACY_VERTEX_COUNT;
@@ -110848,6 +112380,8 @@ exports.EShapeEmbeddedDatum = EShapeEmbeddedDatum;
110848
112380
  exports.EShapeEmbeddedLayer = EShapeEmbeddedLayer;
110849
112381
  exports.EShapeEmbeddedLayerContainer = EShapeEmbeddedLayerContainer;
110850
112382
  exports.EShapeEmbeddeds = EShapeEmbeddeds;
112383
+ exports.EShapeFan = EShapeFan;
112384
+ exports.EShapeFanTriangulatedImpl = EShapeFanTriangulatedImpl;
110851
112385
  exports.EShapeFillDirection = EShapeFillDirection;
110852
112386
  exports.EShapeFillImpl = EShapeFillImpl;
110853
112387
  exports.EShapeGroup = EShapeGroup;
@@ -110915,6 +112449,7 @@ exports.EShapeRuntimeImpl = EShapeRuntimeImpl;
110915
112449
  exports.EShapeRuntimeReset = EShapeRuntimeReset;
110916
112450
  exports.EShapeRuntimes = EShapeRuntimes;
110917
112451
  exports.EShapeSemicircle = EShapeSemicircle;
112452
+ exports.EShapeSemicircleLegacy = EShapeSemicircleLegacy;
110918
112453
  exports.EShapeState = EShapeState;
110919
112454
  exports.EShapeStateSetImplObservable = EShapeStateSetImplObservable;
110920
112455
  exports.EShapeStrokeImpl = EShapeStrokeImpl;
@@ -110933,6 +112468,8 @@ exports.EShapeTransformImpl = EShapeTransformImpl;
110933
112468
  exports.EShapeTriangle = EShapeTriangle;
110934
112469
  exports.EShapeTriangleLegacy = EShapeTriangleLegacy;
110935
112470
  exports.EShapeTriangleRounded = EShapeTriangleRounded;
112471
+ exports.EShapeTriangleRoundedLegacy = EShapeTriangleRoundedLegacy;
112472
+ exports.EShapeTriangleRoundedTriangulatedImpl = EShapeTriangleRoundedTriangulatedImpl;
110936
112473
  exports.EShapeTriangleTriangulatedImpl = EShapeTriangleTriangulatedImpl;
110937
112474
  exports.EShapeType = EShapeType;
110938
112475
  exports.EShapeUploadedImpl = EShapeUploadedImpl;
@@ -111006,9 +112543,12 @@ exports.RECTANGLE_ROUNDED_VERTEX_COUNT = RECTANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
111006
112543
  exports.RECTANGLE_ROUNDED_WORLD_SIZE = RECTANGLE_ROUNDED_LEGACY_WORLD_SIZE;
111007
112544
  exports.RECTANGLE_VERTEX_COUNT = RECTANGLE_LEGACY_VERTEX_COUNT;
111008
112545
  exports.RECTANGLE_WORLD_SIZE = RECTANGLE_LEGACY_WORLD_SIZE;
111009
- exports.SEMICIRCLE_INDEX_COUNT = SEMICIRCLE_INDEX_COUNT;
111010
- exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_VERTEX_COUNT;
111011
- exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_WORLD_SIZE;
112546
+ exports.SEMICIRCLE_INDEX_COUNT = SEMICIRCLE_LEGACY_INDEX_COUNT;
112547
+ exports.SEMICIRCLE_LEGACY_INDEX_COUNT = SEMICIRCLE_LEGACY_INDEX_COUNT;
112548
+ exports.SEMICIRCLE_LEGACY_VERTEX_COUNT = SEMICIRCLE_LEGACY_VERTEX_COUNT;
112549
+ exports.SEMICIRCLE_LEGACY_WORLD_SIZE = SEMICIRCLE_LEGACY_WORLD_SIZE;
112550
+ exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_LEGACY_VERTEX_COUNT;
112551
+ exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_LEGACY_WORLD_SIZE;
111012
112552
  exports.TEXT_FMIN = TEXT_FMIN;
111013
112553
  exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
111014
112554
  exports.TEXT_INDEX_COUNT_SHIFT = TEXT_INDEX_COUNT_SHIFT;
@@ -111018,9 +112558,12 @@ exports.TRIANGLE_INDEX_COUNT = TRIANGLE_LEGACY_INDEX_COUNT;
111018
112558
  exports.TRIANGLE_LEGACY_INDEX_COUNT = TRIANGLE_LEGACY_INDEX_COUNT;
111019
112559
  exports.TRIANGLE_LEGACY_VERTEX_COUNT = TRIANGLE_LEGACY_VERTEX_COUNT;
111020
112560
  exports.TRIANGLE_LEGACY_WORLD_SIZE = TRIANGLE_LEGACY_WORLD_SIZE;
111021
- exports.TRIANGLE_ROUNDED_INDEX_COUNT = TRIANGLE_ROUNDED_INDEX_COUNT;
111022
- exports.TRIANGLE_ROUNDED_VERTEX_COUNT = TRIANGLE_ROUNDED_VERTEX_COUNT;
111023
- exports.TRIANGLE_ROUNDED_WORLD_SIZE = TRIANGLE_ROUNDED_WORLD_SIZE;
112561
+ exports.TRIANGLE_ROUNDED_INDEX_COUNT = TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT;
112562
+ exports.TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT = TRIANGLE_ROUNDED_LEGACY_INDEX_COUNT;
112563
+ exports.TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT = TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
112564
+ exports.TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE = TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE;
112565
+ exports.TRIANGLE_ROUNDED_VERTEX_COUNT = TRIANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
112566
+ exports.TRIANGLE_ROUNDED_WORLD_SIZE = TRIANGLE_ROUNDED_LEGACY_WORLD_SIZE;
111024
112567
  exports.TRIANGLE_VERTEX_COUNT = TRIANGLE_LEGACY_VERTEX_COUNT;
111025
112568
  exports.TRIANGLE_WORLD_SIZE = TRIANGLE_LEGACY_WORLD_SIZE;
111026
112569
  exports.UtilAlpha = UtilAlpha;
@@ -111115,10 +112658,14 @@ exports.buildRectangleRoundedVertex = buildRectangleRoundedLegacyVertex;
111115
112658
  exports.buildRectangleStep = buildRectangleLegacyStep;
111116
112659
  exports.buildRectangleUv = buildRectangleLegacyUv;
111117
112660
  exports.buildRectangleVertex = buildRectangleLegacyVertex;
111118
- exports.buildSemicircleIndex = buildSemicircleIndex;
111119
- exports.buildSemicircleStep = buildSemicircleStep;
111120
- exports.buildSemicircleUv = buildSemicircleUv;
111121
- exports.buildSemicircleVertex = buildSemicircleVertex;
112661
+ exports.buildSemicircleIndex = buildSemicircleLegacyIndex;
112662
+ exports.buildSemicircleLegacyIndex = buildSemicircleLegacyIndex;
112663
+ exports.buildSemicircleLegacyStep = buildSemicircleLegacyStep;
112664
+ exports.buildSemicircleLegacyUv = buildSemicircleLegacyUv;
112665
+ exports.buildSemicircleLegacyVertex = buildSemicircleLegacyVertex;
112666
+ exports.buildSemicircleStep = buildSemicircleLegacyStep;
112667
+ exports.buildSemicircleUv = buildSemicircleLegacyUv;
112668
+ exports.buildSemicircleVertex = buildSemicircleLegacyVertex;
111122
112669
  exports.buildTextIndex = buildTextIndex;
111123
112670
  exports.buildTextStep = buildTextStep;
111124
112671
  exports.buildTextVertex = buildTextVertex;
@@ -111127,10 +112674,14 @@ exports.buildTriangleLegacyIndex = buildTriangleLegacyIndex;
111127
112674
  exports.buildTriangleLegacyStep = buildTriangleLegacyStep;
111128
112675
  exports.buildTriangleLegacyUv = buildTriangleLegacyUv;
111129
112676
  exports.buildTriangleLegacyVertex = buildTriangleLegacyVertex;
111130
- exports.buildTriangleRoundedIndex = buildTriangleRoundedIndex;
111131
- exports.buildTriangleRoundedStep = buildTriangleRoundedStep;
111132
- exports.buildTriangleRoundedUv = buildTriangleRoundedUv;
111133
- exports.buildTriangleRoundedVertex = buildTriangleRoundedVertex;
112677
+ exports.buildTriangleRoundedIndex = buildTriangleRoundedLegacyIndex;
112678
+ exports.buildTriangleRoundedLegacyIndex = buildTriangleRoundedLegacyIndex;
112679
+ exports.buildTriangleRoundedLegacyStep = buildTriangleRoundedLegacyStep;
112680
+ exports.buildTriangleRoundedLegacyUv = buildTriangleRoundedLegacyUv;
112681
+ exports.buildTriangleRoundedLegacyVertex = buildTriangleRoundedLegacyVertex;
112682
+ exports.buildTriangleRoundedStep = buildTriangleRoundedLegacyStep;
112683
+ exports.buildTriangleRoundedUv = buildTriangleRoundedLegacyUv;
112684
+ exports.buildTriangleRoundedVertex = buildTriangleRoundedLegacyVertex;
111134
112685
  exports.buildTriangleStep = buildTriangleLegacyStep;
111135
112686
  exports.buildTriangleUv = buildTriangleLegacyUv;
111136
112687
  exports.buildTriangleVertex = buildTriangleLegacyVertex;
@@ -111163,9 +112714,11 @@ exports.createRectanglePivotedUploaded = createRectanglePivotedUploaded;
111163
112714
  exports.createRectangleRoundedLegacyUploaded = createRectangleRoundedLegacyUploaded;
111164
112715
  exports.createRectangleRoundedUploaded = createRectangleRoundedLegacyUploaded;
111165
112716
  exports.createRectangleUploaded = createRectangleLegacyUploaded;
111166
- exports.createSemicircleUploaded = createSemicircleUploaded;
112717
+ exports.createSemicircleLegacyUploaded = createSemicircleLegacyUploaded;
112718
+ exports.createSemicircleUploaded = createSemicircleLegacyUploaded;
111167
112719
  exports.createTriangleLegacyUploaded = createTriangleLegacyUploaded;
111168
- exports.createTriangleRoundedUploaded = createTriangleRoundedUploaded;
112720
+ exports.createTriangleRoundedLegacyUploaded = createTriangleRoundedLegacyUploaded;
112721
+ exports.createTriangleRoundedUploaded = createTriangleRoundedLegacyUploaded;
111169
112722
  exports.createTriangleUploaded = createTriangleLegacyUploaded;
111170
112723
  exports.dThemeDarkEnUsDialogProcessingMessage = dThemeDarkEnUsDialogProcessingMessage;
111171
112724
  exports.dThemeDarkJaJpDialogProcessingMessage = dThemeDarkJaJpDialogProcessingMessage;
@@ -111184,6 +112737,7 @@ exports.deserializeConnectorLine = deserializeConnectorLine;
111184
112737
  exports.deserializeEmbedded = deserializeEmbedded;
111185
112738
  exports.deserializeEmbeddedAcceptorEdge = deserializeEmbeddedAcceptorEdge;
111186
112739
  exports.deserializeEmbeddedLayer = deserializeEmbeddedLayer;
112740
+ exports.deserializeFan = deserializeFan;
111187
112741
  exports.deserializeGradient = deserializeGradient;
111188
112742
  exports.deserializeGroup = deserializeGroup;
111189
112743
  exports.deserializeGroupShadowed = deserializeGroupShadowed;
@@ -111204,14 +112758,17 @@ exports.deserializeRectanglePivoted = deserializeRectanglePivoted;
111204
112758
  exports.deserializeRectangleRounded = deserializeRectangleRounded;
111205
112759
  exports.deserializeRectangleRoundedLegacy = deserializeRectangleRoundedLegacy;
111206
112760
  exports.deserializeSemicircle = deserializeSemicircle;
112761
+ exports.deserializeSemicircleLegacy = deserializeSemicircleLegacy;
111207
112762
  exports.deserializeTriangle = deserializeTriangle;
111208
112763
  exports.deserializeTriangleLegacy = deserializeTriangleLegacy;
111209
112764
  exports.deserializeTriangleRounded = deserializeTriangleRounded;
112765
+ exports.deserializeTriangleRoundedLegacy = deserializeTriangleRoundedLegacy;
111210
112766
  exports.eShapePointsFormatterCurve = eShapePointsFormatterCurve;
111211
112767
  exports.eShapePointsFormatterCurveBezierQuadratic = eShapePointsFormatterCurveBezierQuadratic;
111212
112768
  exports.hitTestBBox = hitTestBBox;
111213
112769
  exports.hitTestCircle = hitTestCircle;
111214
112770
  exports.hitTestCircleLegacy = hitTestCircleLegacy;
112771
+ exports.hitTestFan = hitTestFan;
111215
112772
  exports.hitTestRectangle = hitTestRectangle;
111216
112773
  exports.hitTestRectangleLegacy = hitTestRectangleLegacy;
111217
112774
  exports.hitTestRectangleRounded = hitTestRectangleRounded;
@@ -111221,6 +112778,7 @@ exports.hitTestTriangle = hitTestTriangle;
111221
112778
  exports.hitTestTriangleFilled = hitTestTriangleFilled;
111222
112779
  exports.hitTestTriangleLegacy = hitTestTriangleLegacy;
111223
112780
  exports.hitTestTriangleRounded = hitTestTriangleRounded;
112781
+ exports.hitTestTriangleRoundedLegacy = hitTestTriangleRoundedLegacy;
111224
112782
  exports.isArray = isArray;
111225
112783
  exports.isFunction = isFunction;
111226
112784
  exports.isNaN = isNaN$1;
@@ -111245,6 +112803,7 @@ exports.loadShapeClipperEx = loadShapeClipperEx;
111245
112803
  exports.loadShapeConnectorElbow = loadShapeConnectorElbow;
111246
112804
  exports.loadShapeConnectorLine = loadShapeConnectorLine;
111247
112805
  exports.loadShapeEmbedded = loadShapeEmbedded;
112806
+ exports.loadShapeFan = loadShapeFan;
111248
112807
  exports.loadShapeGroup = loadShapeGroup;
111249
112808
  exports.loadShapeGroupShadowed = loadShapeGroupShadowed;
111250
112809
  exports.loadShapeImage = loadShapeImage;
@@ -111263,9 +112822,11 @@ exports.loadShapeRectanglePivoted = loadShapeRectanglePivoted;
111263
112822
  exports.loadShapeRectangleRounded = loadShapeRectangleRounded;
111264
112823
  exports.loadShapeRectangleRoundedLegacy = loadShapeRectangleRoundedLegacy;
111265
112824
  exports.loadShapeSemicircle = loadShapeSemicircle;
112825
+ exports.loadShapeSemicircleLegacy = loadShapeSemicircleLegacy;
111266
112826
  exports.loadShapeTriangle = loadShapeTriangle;
111267
112827
  exports.loadShapeTriangleLegacy = loadShapeTriangleLegacy;
111268
112828
  exports.loadShapeTriangleRounded = loadShapeTriangleRounded;
112829
+ exports.loadShapeTriangleRoundedLegacy = loadShapeTriangleRoundedLegacy;
111269
112830
  exports.loadThemeDark = loadThemeDark;
111270
112831
  exports.loadThemeDarkBase = loadThemeDarkBase;
111271
112832
  exports.loadThemeDarkBoard = loadThemeDarkBoard;
@@ -111515,6 +113076,8 @@ exports.toCloned = toCloned;
111515
113076
  exports.toComputed = toComputed;
111516
113077
  exports.toDash = toDash;
111517
113078
  exports.toEnum = toEnum;
113079
+ exports.toFanAngleCentric = toFanAngleCentric;
113080
+ exports.toFanAngleEccentric = toFanAngleEccentric;
111518
113081
  exports.toGradientImageUrl = toGradientImageUrl;
111519
113082
  exports.toGradientSerialized = toGradientSerialized;
111520
113083
  exports.toId = toId;