@wcardinal/wcardinal-ui 0.468.0 → 0.469.0-beta.1

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 (126) 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 +2 -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 +2 -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/variant/build-semicircle-legacy.d.ts +9 -0
  10. package/dist/types/wcardinal/ui/shape/variant/build-semicircle.d.ts +1 -9
  11. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle-legacy.d.ts +10 -0
  12. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +1 -10
  13. package/dist/types/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.d.ts +4 -0
  14. package/dist/types/wcardinal/ui/shape/variant/create-semicircle-uploaded.d.ts +1 -4
  15. package/dist/types/wcardinal/ui/shape/variant/deserialize-fan.d.ts +4 -0
  16. package/dist/types/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.d.ts +4 -0
  17. package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +1 -0
  18. package/dist/types/wcardinal/ui/shape/variant/e-shape-button.d.ts +2 -1
  19. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.d.ts +202 -0
  20. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan-triangulated.d.ts +3 -0
  21. package/dist/types/wcardinal/ui/shape/variant/e-shape-fan.d.ts +26 -0
  22. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +2 -0
  23. package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +2 -0
  24. package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +2 -0
  25. package/dist/types/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.d.ts +10 -0
  26. package/dist/types/wcardinal/ui/shape/variant/e-shape-semicircle.d.ts +9 -2
  27. package/dist/types/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.d.ts +1 -1
  28. package/dist/types/wcardinal/ui/shape/variant/hit-test-fan.d.ts +2 -0
  29. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +11 -0
  30. package/dist/types/wcardinal/ui/shape/variant/to-fan-angle-centric.d.ts +4 -0
  31. package/dist/types/wcardinal/ui/shape/variant/to-fan-angle-eccentric.d.ts +5 -0
  32. package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-shape.d.ts +1 -0
  33. package/dist/types/wcardinal/ui/theme/white/e-theme-white-shape.d.ts +1 -0
  34. package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
  35. package/dist/wcardinal/ui/shape/e-shape-capability.js +6 -1
  36. package/dist/wcardinal/ui/shape/e-shape-capability.js.map +1 -1
  37. package/dist/wcardinal/ui/shape/e-shape-defaults.js +7 -0
  38. package/dist/wcardinal/ui/shape/e-shape-defaults.js.map +1 -1
  39. package/dist/wcardinal/ui/shape/e-shape-type.js +2 -0
  40. package/dist/wcardinal/ui/shape/e-shape-type.js.map +1 -1
  41. package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
  42. package/dist/wcardinal/ui/shape/load/index.js +2 -0
  43. package/dist/wcardinal/ui/shape/load/index.js.map +1 -1
  44. package/dist/wcardinal/ui/shape/load/load-shape-all.js +4 -0
  45. package/dist/wcardinal/ui/shape/load/load-shape-all.js.map +1 -1
  46. package/dist/wcardinal/ui/shape/load/load-shape-fan.js +17 -0
  47. package/dist/wcardinal/ui/shape/load/load-shape-fan.js.map +1 -0
  48. package/dist/wcardinal/ui/shape/load/load-shape-semicircle-legacy.js +14 -0
  49. package/dist/wcardinal/ui/shape/load/load-shape-semicircle-legacy.js.map +1 -0
  50. package/dist/wcardinal/ui/shape/load/load-shape-semicircle.js +5 -2
  51. package/dist/wcardinal/ui/shape/load/load-shape-semicircle.js.map +1 -1
  52. package/dist/wcardinal/ui/shape/variant/build-semicircle-legacy.js +137 -0
  53. package/dist/wcardinal/ui/shape/variant/build-semicircle-legacy.js.map +1 -0
  54. package/dist/wcardinal/ui/shape/variant/build-semicircle.js +1 -139
  55. package/dist/wcardinal/ui/shape/variant/build-semicircle.js.map +1 -1
  56. package/dist/wcardinal/ui/shape/variant/builder-semicircle-legacy.js +76 -0
  57. package/dist/wcardinal/ui/shape/variant/builder-semicircle-legacy.js.map +1 -0
  58. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +1 -71
  59. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
  60. package/dist/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.js +24 -0
  61. package/dist/wcardinal/ui/shape/variant/create-semicircle-legacy-uploaded.js.map +1 -0
  62. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +1 -19
  63. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
  64. package/dist/wcardinal/ui/shape/variant/deserialize-fan.js +12 -0
  65. package/dist/wcardinal/ui/shape/variant/deserialize-fan.js.map +1 -0
  66. package/dist/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.js +10 -0
  67. package/dist/wcardinal/ui/shape/variant/deserialize-semicircle-legacy.js.map +1 -0
  68. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  69. package/dist/wcardinal/ui/shape/variant/e-shape-button.js.map +1 -1
  70. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +0 -2
  71. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
  72. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-acceptor-edge.js +0 -2
  73. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-acceptor-edge.js.map +1 -1
  74. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.js +753 -0
  75. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated-impl.js.map +1 -0
  76. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated.js +6 -0
  77. package/dist/wcardinal/ui/shape/variant/e-shape-fan-triangulated.js.map +1 -0
  78. package/dist/wcardinal/ui/shape/variant/e-shape-fan.js +85 -0
  79. package/dist/wcardinal/ui/shape/variant/e-shape-fan.js.map +1 -0
  80. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +10 -0
  81. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
  82. package/dist/wcardinal/ui/shape/variant/e-shape-group.js +18 -1
  83. package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
  84. package/dist/wcardinal/ui/shape/variant/e-shape-polygon.js +3 -4
  85. package/dist/wcardinal/ui/shape/variant/e-shape-polygon.js.map +1 -1
  86. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +10 -0
  87. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
  88. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.js +33 -0
  89. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle-legacy.js.map +1 -0
  90. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle.js +36 -6
  91. package/dist/wcardinal/ui/shape/variant/e-shape-semicircle.js.map +1 -1
  92. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.js +31 -30
  93. package/dist/wcardinal/ui/shape/variant/e-shape-triangle-triangulated-impl.js.map +1 -1
  94. package/dist/wcardinal/ui/shape/variant/hit-test-fan.js +79 -0
  95. package/dist/wcardinal/ui/shape/variant/hit-test-fan.js.map +1 -0
  96. package/dist/wcardinal/ui/shape/variant/index.js +11 -0
  97. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  98. package/dist/wcardinal/ui/shape/variant/to-fan-angle-centric.js +11 -0
  99. package/dist/wcardinal/ui/shape/variant/to-fan-angle-centric.js.map +1 -0
  100. package/dist/wcardinal/ui/shape/variant/to-fan-angle-eccentric.js +12 -0
  101. package/dist/wcardinal/ui/shape/variant/to-fan-angle-eccentric.js.map +1 -0
  102. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape.js +3 -0
  103. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape.js.map +1 -1
  104. package/dist/wcardinal/ui/theme/white/e-theme-white-shape.js +3 -0
  105. package/dist/wcardinal/ui/theme/white/e-theme-white-shape.js.map +1 -1
  106. package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
  107. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  108. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  109. package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
  110. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  111. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  112. package/dist/wcardinal-ui-theme-dark.js +4 -1
  113. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  114. package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
  115. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  116. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  117. package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
  118. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  119. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  120. package/dist/wcardinal-ui-theme-white.js +4 -1
  121. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  122. package/dist/wcardinal-ui.cjs.js +1189 -103
  123. package/dist/wcardinal-ui.js +1183 -103
  124. package/dist/wcardinal-ui.min.js +2 -2
  125. package/dist/wcardinal-ui.min.js.map +1 -1
  126. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.468.0
2
+ Winter Cardinal UI v0.469.0-beta.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -62,6 +62,8 @@ var EShapeType = {
62
62
  TRIANGLE_LEGACY: 29,
63
63
  RECTANGLE_ROUNDED_LEGACY: 30,
64
64
  TRIANGLE_ROUNDED_LEGACY: 31,
65
+ FAN: 32,
66
+ SEMICIRCLE_LEGACY: 33,
65
67
  EXTENSION: 1000
66
68
  };
67
69
 
@@ -1789,6 +1791,13 @@ var EShapeDefaults = /** @class */ (function () {
1789
1791
  enumerable: false,
1790
1792
  configurable: true
1791
1793
  });
1794
+ Object.defineProperty(EShapeDefaults, "ANGLE", {
1795
+ get: function () {
1796
+ return this.THEME.getAngle();
1797
+ },
1798
+ enumerable: false,
1799
+ configurable: true
1800
+ });
1792
1801
  Object.defineProperty(EShapeDefaults, "SIZE_X", {
1793
1802
  get: function () {
1794
1803
  return this.THEME.getSizeX();
@@ -4706,6 +4715,7 @@ var DATA_MAPPING = 0x400000;
4706
4715
  var LINE = 0x800000;
4707
4716
  var LINE_TAIL = 0x1000000;
4708
4717
  var LINE_HEAD = 0x2000000;
4718
+ var ANGLE = 0x4000000;
4709
4719
  var COORDINATE = POSITION | WIDTH$1 | HEIGHT$1 | ROTATION$1 | SKEW;
4710
4720
  var SHAPE = REPLACING | GROUPING | FILL$1 | STROKE$1 | STROKE_STYLE | LINE | LINE_TAIL | LINE_HEAD;
4711
4721
  var LAYER = ORDER_IN_LAYER;
@@ -4714,7 +4724,7 @@ var GROUP = PRIMITIVE | UNGROUPING;
4714
4724
  var EMBEDDED = ID | COORDINATE | REPLACING | GROUPING | TEXT$2 | DATA | ACTION | LAYER | DATA_MAPPING;
4715
4725
  var EMBEDDED_ACCEPTOR_EDGE = ID | COORDINATE | REPLACING | FILL$1 | STROKE$1 | STROKE_STYLE_SCALING | TEXT$2 | TEXTURE | DATA | ACTION | CURSOR$1 | LAYER;
4716
4726
  var CONNECTOR = ID | SHAPE | TEXT$2 | TEXTURE | DATA | ACTION | CURSOR$1 | LAYER | CHILDREN$1;
4717
- var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
4727
+ var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | ANGLE | DATA_MAPPING | UNGROUPING;
4718
4728
  var EShapeCapability = {
4719
4729
  NONE: NONE,
4720
4730
  /**
@@ -4783,6 +4793,10 @@ var EShapeCapability = {
4783
4793
  * Allows shape border radiuses to be modified.
4784
4794
  */
4785
4795
  BORDER_RADIUS: BORDER_RADIUS,
4796
+ /**
4797
+ * Allows shape angles to be modified.
4798
+ */
4799
+ ANGLE: ANGLE,
4786
4800
  /**
4787
4801
  * Allows shape texts to be modified.
4788
4802
  */
@@ -8436,6 +8450,16 @@ var EShapePrimitive = /** @class */ (function (_super) {
8436
8450
  enumerable: false,
8437
8451
  configurable: true
8438
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
+ });
8439
8463
  Object.defineProperty(EShapePrimitive.prototype, "image", {
8440
8464
  get: function () {
8441
8465
  return this._image;
@@ -11681,7 +11705,6 @@ var EShapeEmbeddedAcceptorEdge = /** @class */ (function (_super) {
11681
11705
  return new EShapeEmbeddedAcceptorEdge(this.type).copy(this);
11682
11706
  };
11683
11707
  EShapeEmbeddedAcceptorEdge.prototype.copy = function (source, part) {
11684
- if (part === void 0) { part = EShapeCopyPart.ALL; }
11685
11708
  _super.prototype.copy.call(this, source, part);
11686
11709
  if (source instanceof EShapeEmbeddedAcceptorEdge) {
11687
11710
  this._subtype = source.subtype;
@@ -12484,6 +12507,16 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
12484
12507
  enumerable: false,
12485
12508
  configurable: true
12486
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
+ });
12487
12520
  Object.defineProperty(EShapeGroupViewer.prototype, "image", {
12488
12521
  get: function () {
12489
12522
  return undefined;
@@ -15311,7 +15344,6 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
15311
15344
  values.length = bodyValuesLength + 4;
15312
15345
  };
15313
15346
  EShapeConnectorLine.prototype.copy = function (source, part) {
15314
- if (part === void 0) { part = EShapeCopyPart.ALL; }
15315
15347
  this.lock(EShapeLockPart.ALL);
15316
15348
  _super.prototype.copy.call(this, source, part);
15317
15349
  if (source instanceof EShapeConnectorLine) {
@@ -37103,6 +37135,9 @@ var EThemeWhiteShape = /** @class */ (function () {
37103
37135
  EThemeWhiteShape.prototype.getRadius = function () {
37104
37136
  return 0.25;
37105
37137
  };
37138
+ EThemeWhiteShape.prototype.getAngle = function () {
37139
+ return 0.333;
37140
+ };
37106
37141
  EThemeWhiteShape.prototype.getSizeX = function () {
37107
37142
  return 100;
37108
37143
  };
@@ -48306,6 +48341,9 @@ var EThemeDarkShape = /** @class */ (function () {
48306
48341
  EThemeDarkShape.prototype.getRadius = function () {
48307
48342
  return 0.25;
48308
48343
  };
48344
+ EThemeDarkShape.prototype.getAngle = function () {
48345
+ return 0.333;
48346
+ };
48309
48347
  EThemeDarkShape.prototype.getSizeX = function () {
48310
48348
  return 100;
48311
48349
  };
@@ -70033,6 +70071,947 @@ var loadShapeEmbedded = function () {
70033
70071
  EShapeCapabilities.set(EShapeType.EMBEDDED_ACCEPTOR_EDGE, EShapeCapability.EMBEDDED_ACCEPTOR_EDGE);
70034
70072
  };
70035
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 = 4 * (m - 1) + 2 * (n + 4);
70278
+ var ni = 4 * n + 2 * (n + 2);
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);
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(n, fs, st, ct, sided);
70357
+ // Strip: 4 * (m - 1) vertices and 2 * 3 * (m - 1) indices
70358
+ this.writeStrip(m, fd, fx, fy, gx, gy);
70359
+ var iv = 4 * (m - 1);
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 lengths of the polyline 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 lengths are the ones of the polyline, which is the actual outline, so that they are exact at clipping = 1.
70418
+ */
70419
+ EShapeFanTriangulatedImpl.prototype.computeArcNormals = function (w, h, n) {
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 hw = h / w;
70428
+ var wh = w / h;
70429
+ var l = 0;
70430
+ for (var k = 0; k <= n; ++k) {
70431
+ var dx = -hw * px[k];
70432
+ var dy = -wh * py[k];
70433
+ var speed = Math.sqrt(dx * dx + dy * dy);
70434
+ nx[k] = dx / speed;
70435
+ ny[k] = dy / speed;
70436
+ speeds[k] = speed;
70437
+ if (0 < k) {
70438
+ var ex = px[k] - px[k - 1];
70439
+ var ey = py[k] - py[k - 1];
70440
+ l += Math.sqrt(ex * ex + ey * ey);
70441
+ }
70442
+ ls[k] = l;
70443
+ }
70444
+ for (var k = 0; k < n; ++k) {
70445
+ var j = m - 1 - k;
70446
+ nx[j] = -nx[k];
70447
+ ny[j] = ny[k];
70448
+ speeds[j] = speeds[k];
70449
+ ls[j] = 2 * ls[n] - ls[k];
70450
+ }
70451
+ };
70452
+ /**
70453
+ * Computes Q[k], the points on the normals, and their distances from P[k], and returns the maximum distance.
70454
+ *
70455
+ * If chained is true, Q is the point on the medial axis, that is, the point on the normal
70456
+ * whose distance to the arc is equal to the distance to the straight sides.
70457
+ * The distance delta is obtained from delta = -(n . P) - delta (n . normal) for the outward unit normals n of the sides.
70458
+ * The clamps keep Q on the same side of the axis x = 0 as P and before the center of curvature,
70459
+ * otherwise adjacent normals cross each other, which happens for tall ellipses.
70460
+ *
70461
+ * Otherwise, the normal is extended until it reaches x = 0 if w <= h, otherwise y = 0.
70462
+ */
70463
+ EShapeFanTriangulatedImpl.prototype.computeMedialPoints = function (w, h, n, st, ct, chained) {
70464
+ var m = 2 * n + 1;
70465
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70466
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70467
+ var nx = EShapeFanTriangulatedImpl.WORK_NORMAL_X;
70468
+ var ny = EShapeFanTriangulatedImpl.WORK_NORMAL_Y;
70469
+ var speeds = EShapeFanTriangulatedImpl.WORK_SPEED;
70470
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70471
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70472
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70473
+ var u = w <= h ? w / h : h / w;
70474
+ var dmax = 0;
70475
+ for (var k = 0; k <= n; ++k) {
70476
+ var x = px[k];
70477
+ var y = py[k];
70478
+ var nnx = nx[k];
70479
+ var nny = ny[k];
70480
+ var speed = speeds[k];
70481
+ var delta = Infinity;
70482
+ if (chained) {
70483
+ var da = 1 + -ct * nnx + st * nny;
70484
+ if (1e-9 < da) {
70485
+ delta = Math.min(delta, (ct * x - st * y) / da);
70486
+ }
70487
+ var db = 1 + ct * nnx + st * nny;
70488
+ if (1e-9 < db) {
70489
+ delta = Math.min(delta, (-ct * x - st * y) / db);
70490
+ }
70491
+ if (k !== n && 1e-12 < Math.abs(nnx)) {
70492
+ delta = Math.min(delta, -x / nnx);
70493
+ }
70494
+ delta = Math.max(0, Math.min(delta, (speed * speed * speed) / (w * h)));
70495
+ }
70496
+ // The distance between P and Q
70497
+ var d = void 0;
70498
+ if (Number.isFinite(delta)) {
70499
+ d = delta;
70500
+ }
70501
+ else {
70502
+ d = u * speed;
70503
+ }
70504
+ qx[k] = x + d * nnx;
70505
+ qy[k] = y + d * nny;
70506
+ qd[k] = d;
70507
+ dmax = Math.max(dmax, d);
70508
+ }
70509
+ for (var k = 0; k < n; ++k) {
70510
+ var j = m - 1 - k;
70511
+ qx[j] = -qx[k];
70512
+ qy[j] = qy[k];
70513
+ qd[j] = qd[k];
70514
+ }
70515
+ return dmax;
70516
+ };
70517
+ /**
70518
+ * Computes R[k], the points on the arc shifted outward by fs.
70519
+ * If the straight sides are the outline, the end points are shifted
70520
+ * to the intersections of the shifted arc and the shifted straight sides.
70521
+ */
70522
+ EShapeFanTriangulatedImpl.prototype.computeRimPoints = function (n, fs, st, ct, sided) {
70523
+ var m = 2 * n + 1;
70524
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70525
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70526
+ var nx = EShapeFanTriangulatedImpl.WORK_NORMAL_X;
70527
+ var ny = EShapeFanTriangulatedImpl.WORK_NORMAL_Y;
70528
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70529
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70530
+ for (var k = 0; k < m; ++k) {
70531
+ var x = px[k] - fs * nx[k];
70532
+ var y = py[k] - fs * ny[k];
70533
+ if (sided && (k === 0 || k === m - 1)) {
70534
+ var sign = k === 0 ? -1 : +1;
70535
+ // The miter of the outward normal of the arc (n1) and that of the straight side (n2)
70536
+ var n1x = -nx[k];
70537
+ var n1y = -ny[k];
70538
+ var n2x = sign * ct;
70539
+ var n2y = st;
70540
+ var miter = fs / Math.max(1 + n1x * n2x + n1y * n2y, 0.05);
70541
+ x = px[k] + miter * (n1x + n2x);
70542
+ y = py[k] + miter * (n1y + n2y);
70543
+ }
70544
+ rx[k] = x;
70545
+ ry[k] = y;
70546
+ }
70547
+ };
70548
+ /**
70549
+ * Writes the strip P[k], P[k + 1], Q[k + 1], Q[k] with the vertices R[k], Q[k], R[k + 1] and Q[k + 1].
70550
+ *
70551
+ * Each quad owns its vertices. The length in a quad is the length at P[k] plus the projection
70552
+ * to the chord P[k]P[k + 1], which is exact at clipping = 1 where the chord is the outline.
70553
+ */
70554
+ EShapeFanTriangulatedImpl.prototype.writeStrip = function (m, fd, fx, fy, gx, gy) {
70555
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70556
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70557
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70558
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70559
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70560
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70561
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70562
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70563
+ var scale = EShapeFanTriangulatedImpl.SCALE;
70564
+ var indices = this._indices;
70565
+ var iv = 0;
70566
+ var ii = 0;
70567
+ for (var k = 0; k < m - 1; ++k) {
70568
+ var x0 = px[k];
70569
+ var y0 = py[k];
70570
+ var l0 = ls[k];
70571
+ var dl = ls[k + 1] - l0;
70572
+ var fl = 0 < dl ? 1 / dl : 0;
70573
+ var ex = (px[k + 1] - x0) * fl;
70574
+ var ey = (py[k + 1] - y0) * fl;
70575
+ var r0x = rx[k];
70576
+ var r0y = ry[k];
70577
+ var q0x = qx[k];
70578
+ var q0y = qy[k];
70579
+ var r1x = rx[k + 1];
70580
+ var r1y = ry[k + 1];
70581
+ var q1x = qx[k + 1];
70582
+ var q1y = qy[k + 1];
70583
+ var lr0 = l0 + (r0x - x0) * ex + (r0y - y0) * ey;
70584
+ var lq0 = l0 + (q0x - x0) * ex + (q0y - y0) * ey;
70585
+ var lr1 = l0 + (r1x - x0) * ex + (r1y - y0) * ey;
70586
+ var lq1 = l0 + (q1x - x0) * ex + (q1y - y0) * ey;
70587
+ var cq0 = 1 - qd[k] * fd;
70588
+ var cq1 = 1 - qd[k + 1] * fd;
70589
+ this.writeVertex(iv, r0x, r0y, lr0, scale, fd, fx, fy, gx, gy);
70590
+ this.writeVertex(iv + 1, q0x, q0y, lq0, cq0, fd, fx, fy, gx, gy);
70591
+ this.writeVertex(iv + 2, r1x, r1y, lr1, scale, fd, fx, fy, gx, gy);
70592
+ this.writeVertex(iv + 3, q1x, q1y, lq1, cq1, fd, fx, fy, gx, gy);
70593
+ indices[ii++] = iv;
70594
+ indices[ii++] = iv + 2;
70595
+ indices[ii++] = iv + 3;
70596
+ indices[ii++] = iv;
70597
+ indices[ii++] = iv + 3;
70598
+ indices[ii++] = iv + 1;
70599
+ iv += 4;
70600
+ }
70601
+ };
70602
+ /**
70603
+ * Writes the polygon O', R[end], Q[end], ..., Q[N] where the end is 0 for the left (sign = -1)
70604
+ * and 2N for the right (sign = +1). The straight side OA (or OB) is the outline of the polygon.
70605
+ * Returns the number of the written vertices.
70606
+ *
70607
+ * The chain of Q ends at the first point on the axis because the following points go back along the axis.
70608
+ * Q is not always on the medial axis where it is clamped,
70609
+ * so the clipping must not be less than the one of the arc.
70610
+ *
70611
+ * The clipping and the length are computed from the straight side:
70612
+ * the outward unit normal is (sign * ct, st) and the length is oa + arc + (-st, sign * ct) . p.
70613
+ */
70614
+ EShapeFanTriangulatedImpl.prototype.writeSidePolygon = function (iv, ii, sign, n, w, oa, st, ct, fs, fd, fx, fy, gx, gy) {
70615
+ var m = 2 * n + 1;
70616
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70617
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70618
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70619
+ var rx = EShapeFanTriangulatedImpl.WORK_RIM_X;
70620
+ var ry = EShapeFanTriangulatedImpl.WORK_RIM_Y;
70621
+ var l0 = oa + EShapeFanTriangulatedImpl.WORK_ARC_L[m - 1];
70622
+ var nx = sign * ct;
70623
+ var ly = sign * ct;
70624
+ var eps = 1e-9 * w;
70625
+ var end = sign < 0 ? 0 : m - 1;
70626
+ var count = 0;
70627
+ this.writeSideVertex(iv + count++, 0, fs / st, -Infinity, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70628
+ this.writeSideVertex(iv + count++, rx[end], ry[end], -Infinity, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70629
+ for (var j = 0; j <= n; ++j) {
70630
+ var k = sign < 0 ? j : m - 1 - j;
70631
+ var floor = 1 - qd[k] * fd;
70632
+ var isOnAxis = Math.abs(qx[k]) <= eps;
70633
+ // Where Q is clamped, the clipping of the side reaches the floor at T on the axis before Q.
70634
+ // Without T, the clipping on the axis is not linear and a dent appears at O.
70635
+ var ty = -qd[k] / st;
70636
+ if (isOnAxis && qy[k] < ty - eps) {
70637
+ this.writeSideVertex(iv + count++, 0, ty, floor, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70638
+ this.writeFan(ii, iv, count);
70639
+ this.writeSideVertex(iv + count, qx[k], qy[k], floor, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70640
+ var indices = this._indices;
70641
+ var i = ii + 3 * (count - 2);
70642
+ indices[i] = iv + count - 2;
70643
+ indices[i + 1] = iv + count;
70644
+ indices[i + 2] = iv + count - 1;
70645
+ return count + 1;
70646
+ }
70647
+ this.writeSideVertex(iv + count++, qx[k], qy[k], floor, nx, st, l0, -st, ly, fd, fx, fy, gx, gy);
70648
+ if (isOnAxis) {
70649
+ break;
70650
+ }
70651
+ }
70652
+ this.writeFan(ii, iv, count);
70653
+ return count;
70654
+ };
70655
+ /**
70656
+ * Writes the polygon O, Q[end], ..., Q[N] where the end is 0 for the left (sign = -1)
70657
+ * and 2N for the right (sign = +1). The straight sides are hard edges without the stroke.
70658
+ * Returns the number of the written vertices.
70659
+ *
70660
+ * The clipping of O is given by co, and the length of O is the one of the end point.
70661
+ */
70662
+ EShapeFanTriangulatedImpl.prototype.writeCapPolygon = function (iv, ii, sign, n, w, co, fd, fx, fy, gx, gy) {
70663
+ var m = 2 * n + 1;
70664
+ var qx = EShapeFanTriangulatedImpl.WORK_MEDIAL_X;
70665
+ var qy = EShapeFanTriangulatedImpl.WORK_MEDIAL_Y;
70666
+ var qd = EShapeFanTriangulatedImpl.WORK_MEDIAL_D;
70667
+ var ls = EShapeFanTriangulatedImpl.WORK_ARC_L;
70668
+ var eps = 1e-9 * w;
70669
+ var end = sign < 0 ? 0 : m - 1;
70670
+ this.writeVertex(iv, 0, 0, ls[end], co, fd, fx, fy, gx, gy);
70671
+ var count = 1;
70672
+ for (var j = 0; j <= n; ++j) {
70673
+ var k = sign < 0 ? j : m - 1 - j;
70674
+ var clipping = 1 - qd[k] * fd;
70675
+ this.writeVertex(iv + count++, qx[k], qy[k], ls[k], clipping, fd, fx, fy, gx, gy);
70676
+ if (Math.abs(qx[k]) <= eps) {
70677
+ break;
70678
+ }
70679
+ }
70680
+ this.writeFan(ii, iv, count);
70681
+ return count;
70682
+ };
70683
+ /**
70684
+ * The clipping is 1 - (the distance from the straight side) / d where d is the distance from C to OA (or OB).
70685
+ */
70686
+ EShapeFanTriangulatedImpl.prototype.updateBottom = function (w, h, n, ea, sea, cea, bx, by, st, ct, fx, fy, gx, gy, nv, ni) {
70687
+ var boundary = this._boundary;
70688
+ boundary[0] = -bx;
70689
+ boundary[1] = -h;
70690
+ boundary[2] = +bx;
70691
+ boundary[3] = 0;
70692
+ var yc = h / (1 + st);
70693
+ var fd = (1 + st) / (h * st);
70694
+ var fs = (EShapeFanTriangulatedImpl.SCALE - 1) / fd;
70695
+ this.computeArcPoints(w, h, n, ea, sea, cea);
70696
+ // Triangle fans from C to the arc: left (sign = -1) and right (sign = +1)
70697
+ var iv = 0;
70698
+ var ii = 0;
70699
+ for (var sign = -1; sign <= 1; sign += 2) {
70700
+ var count = this.writeBottomFan(iv, ii, sign, n, yc, st, ct, fd, fx, fy, gx, gy);
70701
+ iv += count;
70702
+ ii += 3 * (count - 2);
70703
+ }
70704
+ // Quads at the bottom: O', A', A, C and O', B', B, C
70705
+ for (var sign = -1; sign <= 1; sign += 2) {
70706
+ var count = this.writeBottomQuad(iv, ii, sign, bx, by, yc, fs, st, ct, fd, fx, fy, gx, gy);
70707
+ iv += count;
70708
+ ii += 3 * (count - 2);
70709
+ }
70710
+ this.pad(iv, ii, nv, ni, fd);
70711
+ };
70712
+ /**
70713
+ * Writes the triangle fan from C to the arc of the left half (sign = -1) or the right half (sign = +1).
70714
+ * Returns the number of the written vertices.
70715
+ *
70716
+ * The clipping is 1 + fd * (n . p) where n is the outward unit normal of the straight side,
70717
+ * and the length is the distance along the straight side measured from O.
70718
+ * The side OA has n = (-ct, st) and l = (-st, -ct), and the side OB has n = (ct, st) and l = (st, -ct).
70719
+ */
70720
+ EShapeFanTriangulatedImpl.prototype.writeBottomFan = function (iv, ii, sign, n, yc, st, ct, fd, fx, fy, gx, gy) {
70721
+ var px = EShapeFanTriangulatedImpl.WORK_ARC_X;
70722
+ var py = EShapeFanTriangulatedImpl.WORK_ARC_Y;
70723
+ var nx = sign * ct;
70724
+ var lx = sign * st;
70725
+ var count = 0;
70726
+ this.writeSideVertex(iv + count++, 0, -yc, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70727
+ for (var j = 0; j <= n; ++j) {
70728
+ var k = sign < 0 ? j : n + j;
70729
+ this.writeSideVertex(iv + count++, px[k], py[k], 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70730
+ }
70731
+ this.writeFan(ii, iv, count);
70732
+ return count;
70733
+ };
70734
+ /**
70735
+ * Writes the quad O', A', A, C (sign = -1) or O', B', B, C (sign = +1) at the bottom.
70736
+ * O' is shifted outward by fs / st, and A' (B') is shifted outward by fs perpendicular to the straight side.
70737
+ * Returns the number of the written vertices.
70738
+ */
70739
+ EShapeFanTriangulatedImpl.prototype.writeBottomQuad = function (iv, ii, sign, bx, by, yc, fs, st, ct, fd, fx, fy, gx, gy) {
70740
+ var nx = sign * ct;
70741
+ var lx = sign * st;
70742
+ this.writeSideVertex(iv, 0, fs / st, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70743
+ this.writeSideVertex(iv + 1, sign * (bx + fs * ct), -by + fs * st, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70744
+ this.writeSideVertex(iv + 2, sign * bx, -by, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70745
+ this.writeSideVertex(iv + 3, 0, -yc, 0, nx, st, 0, lx, -ct, fd, fx, fy, gx, gy);
70746
+ this.writeFan(ii, iv, 4);
70747
+ return 4;
70748
+ };
70749
+ // ----------------------------------------------------------------------------------------
70750
+ // Writers
70751
+ // ----------------------------------------------------------------------------------------
70752
+ /**
70753
+ * Writes a vertex whose clipping and length are computed from the parameters of a straight side.
70754
+ * The clipping is 1 + fd * (nx * x + ny * y), which is not less than the given floor,
70755
+ * and the length is l0 + lx * x + ly * y.
70756
+ */
70757
+ EShapeFanTriangulatedImpl.prototype.writeSideVertex = function (vertex, x, y, floor, nx, ny, l0, lx, ly, fd, fx, fy, gx, gy) {
70758
+ var clipping = Math.max(floor, 1 + fd * (nx * x + ny * y));
70759
+ var length = l0 + lx * x + ly * y;
70760
+ this.writeVertex(vertex, x, y, length, clipping, fd, fx, fy, gx, gy);
70761
+ };
70762
+ /**
70763
+ * Writes the indices of a triangle fan from the first vertex.
70764
+ * The number of the written indices is 3 * (count - 2).
70765
+ */
70766
+ EShapeFanTriangulatedImpl.prototype.writeFan = function (ii, iv, count) {
70767
+ var indices = this._indices;
70768
+ for (var i = 1; i < count - 1; ++i) {
70769
+ indices[ii++] = iv;
70770
+ indices[ii++] = iv + i;
70771
+ indices[ii++] = iv + i + 1;
70772
+ }
70773
+ };
70774
+ /**
70775
+ * Writes a vertex.
70776
+ *
70777
+ * @param x - The X coordinate in the frame where the sizes are positive
70778
+ * @param y - The Y coordinate in the frame where the sizes are positive
70779
+ * @param fd - The inverse of the distance where the clipping decreases from 1 to 0
70780
+ * @param fx - The factor to convert x to the UV
70781
+ * @param fy - The factor to convert y to the UV
70782
+ * @param gx - The sign of the X size, which flips the vertex
70783
+ * @param gy - The sign of the Y size, which flips the vertex
70784
+ */
70785
+ EShapeFanTriangulatedImpl.prototype.writeVertex = function (vertex, x, y, length, clipping, fd, fx, fy, gx, gy) {
70786
+ var vertex2 = vertex << 1;
70787
+ this._vertices[vertex2] = gx * x;
70788
+ this._vertices[vertex2 + 1] = gy * y;
70789
+ this._distances[vertex] = fd;
70790
+ this._lengths[vertex] = length;
70791
+ this._clippings[vertex] = clipping;
70792
+ this._uvs[vertex2] = 0.5 * (x * fx + 1);
70793
+ this._uvs[vertex2 + 1] = 1 + y * fy;
70794
+ };
70795
+ /**
70796
+ * Fills the unused tail with degenerated triangles and trims the arrays
70797
+ * so that the buffers always hold exactly `nv` vertices and `ni` triangles.
70798
+ */
70799
+ EShapeFanTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, distance) {
70800
+ for (var i = iv; i < nv; ++i) {
70801
+ var vertex2 = i << 1;
70802
+ this._vertices[vertex2] = 0;
70803
+ this._vertices[vertex2 + 1] = 0;
70804
+ this._distances[i] = distance;
70805
+ this._lengths[i] = 0;
70806
+ this._clippings[i] = 0;
70807
+ this._uvs[vertex2] = 0.5;
70808
+ this._uvs[vertex2 + 1] = 0.5;
70809
+ }
70810
+ for (var i = ii; i < ni * 3; ++i) {
70811
+ this._indices[i] = 0;
70812
+ }
70813
+ this._vertices.length = nv * 2;
70814
+ this._distances.length = nv;
70815
+ this._lengths.length = nv;
70816
+ this._clippings.length = nv;
70817
+ this._uvs.length = nv * 2;
70818
+ this._indices.length = ni * 3;
70819
+ };
70820
+ /** The ratio of the outer edge, where the clipping is 1, to the edge of the anti-aliasing */
70821
+ EShapeFanTriangulatedImpl.SCALE = 1.1;
70822
+ // Work arrays shared by all the instances because they are used only in a single synchronous triangulation.
70823
+ // All of them are indexed by k, which is in [0, 2N].
70824
+ /** P: the points on the arc */
70825
+ EShapeFanTriangulatedImpl.WORK_ARC_X = [];
70826
+ EShapeFanTriangulatedImpl.WORK_ARC_Y = [];
70827
+ /** The lengths of the polyline P[0], ..., P[k] */
70828
+ EShapeFanTriangulatedImpl.WORK_ARC_L = [];
70829
+ /** The unit inward normals of the arc */
70830
+ EShapeFanTriangulatedImpl.WORK_NORMAL_X = [];
70831
+ EShapeFanTriangulatedImpl.WORK_NORMAL_Y = [];
70832
+ /** The magnitudes of the tangents, that is, the speeds of the arc */
70833
+ EShapeFanTriangulatedImpl.WORK_SPEED = [];
70834
+ /** Q: the points on the normals */
70835
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_X = [];
70836
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_Y = [];
70837
+ /** The distances from P to Q */
70838
+ EShapeFanTriangulatedImpl.WORK_MEDIAL_D = [];
70839
+ /** R: the points on the arc shifted outward */
70840
+ EShapeFanTriangulatedImpl.WORK_RIM_X = [];
70841
+ EShapeFanTriangulatedImpl.WORK_RIM_Y = [];
70842
+ return EShapeFanTriangulatedImpl;
70843
+ }());
70844
+
70845
+ /*
70846
+ * Copyright (C) 2019-2026 Toshiba Corporation
70847
+ * SPDX-License-Identifier: Apache-2.0
70848
+ */
70849
+ /**
70850
+ * Tests whether the point is in the fan shrunk by `sa` at the arc and by `ss` at the straight sides.
70851
+ *
70852
+ * @param st - The sine of the half central angle
70853
+ * @param ct - The cosine of the half central angle
70854
+ */
70855
+ var isInFan = function (x, y, ax, ay, st, ct, sa, ss) {
70856
+ var wx = ax - sa;
70857
+ var wy = ay - sa;
70858
+ if (wx <= 0 || wy <= 0) {
70859
+ return false;
70860
+ }
70861
+ var ex = x * wy;
70862
+ var ey = y * wx;
70863
+ if (wx * wy * wx * wy < ex * ex + ey * ey) {
70864
+ return false;
70865
+ }
70866
+ var ay1 = st * y;
70867
+ return -ct * x + ay1 <= -ss && ct * x + ay1 <= -ss;
70868
+ };
70869
+ var hitTestFanFill = function (shape, x, y, bx, by) {
70870
+ var fill = shape.fill;
70871
+ if (fill.enable) {
70872
+ var percent = Math.max(0, Math.min(1, fill.percent));
70873
+ if (1 <= percent) {
70874
+ return true;
70875
+ }
70876
+ // The fill is relative to the bounding box [-bx, +bx] x [-by, 0] of the fan.
70877
+ switch (fill.direction) {
70878
+ case EShapeFillDirection.TOP:
70879
+ return y + by <= percent * by;
70880
+ case EShapeFillDirection.RIGHT:
70881
+ return (1 - percent) * (2 * bx) <= x + bx;
70882
+ case EShapeFillDirection.BOTTOM:
70883
+ return (1 - percent) * by <= y + by;
70884
+ case EShapeFillDirection.LEFT:
70885
+ return x + bx <= percent * (2 * bx);
70886
+ }
70887
+ }
70888
+ return false;
70889
+ };
70890
+ var hitTestFan = function (shape, x, y, ax, ay, sw, ss) {
70891
+ var ca = toFanAngleCentric(shape.angle);
70892
+ if (ca <= 0 || ax <= 0 || ay <= 0) {
70893
+ return false;
70894
+ }
70895
+ var ea = toFanAngleEccentric(ax, ay, ca);
70896
+ var bx = ax * Math.sin(ea);
70897
+ var st = Math.sin(ca);
70898
+ var ct = Math.cos(ca);
70899
+ var fill = shape.fill;
70900
+ var strokeSide = shape.stroke.side;
70901
+ var strokeSideTop = (strokeSide & EShapeStrokeSide.TOP) !== 0;
70902
+ var strokeSideBottom = (strokeSide & EShapeStrokeSide.BOTTOM) !== 0;
70903
+ var strokeWidth = strokeSideTop || strokeSideBottom ? sw : 0;
70904
+ if ((fill.enable || 0 < strokeWidth) && isInFan(x, y, ax, ay, st, ct, 0, 0)) {
70905
+ if (fill.enable && hitTestFanFill(shape, x, y, bx, ay)) {
70906
+ return true;
70907
+ }
70908
+ if (0 < strokeWidth) {
70909
+ var s = strokeWidth * ss;
70910
+ var arc = strokeSideTop ? s : 0;
70911
+ var sides = strokeSideBottom ? s : 0;
70912
+ if (!isInFan(x, y, ax, ay, st, ct, arc, sides)) {
70913
+ return true;
70914
+ }
70915
+ }
70916
+ }
70917
+ return false;
70918
+ };
70919
+
70920
+ /*
70921
+ * Copyright (C) 2019-2026 Toshiba Corporation
70922
+ * SPDX-License-Identifier: Apache-2.0
70923
+ */
70924
+ var EShapeFan = /** @class */ (function (_super) {
70925
+ __extends(EShapeFan, _super);
70926
+ function EShapeFan(type) {
70927
+ if (type === void 0) { type = EShapeType.FAN; }
70928
+ var _this = _super.call(this, type) || this;
70929
+ _this._angle = _this.newAngle();
70930
+ _this._triangulated = _this.newTriangulated();
70931
+ return _this;
70932
+ }
70933
+ EShapeFan.prototype.newAngle = function () {
70934
+ return EShapeDefaults.ANGLE;
70935
+ };
70936
+ EShapeFan.prototype.newTriangulated = function () {
70937
+ return new EShapeFanTriangulatedImpl(this);
70938
+ };
70939
+ Object.defineProperty(EShapeFan.prototype, "triangulated", {
70940
+ get: function () {
70941
+ return this._triangulated;
70942
+ },
70943
+ enumerable: false,
70944
+ configurable: true
70945
+ });
70946
+ Object.defineProperty(EShapeFan.prototype, "angle", {
70947
+ /**
70948
+ * The ratio of the half central angle of the fan to PI. Must be in [0, 0.5].
70949
+ * 0.5 results in a semicircle.
70950
+ */
70951
+ get: function () {
70952
+ return this._angle;
70953
+ },
70954
+ set: function (angle) {
70955
+ if (this._angle !== angle) {
70956
+ this._angle = angle;
70957
+ this.updateUploaded();
70958
+ }
70959
+ },
70960
+ enumerable: false,
70961
+ configurable: true
70962
+ });
70963
+ EShapeFan.prototype.toHitTestStrokeShift = function (strokeWidth, strokeScale, strokeAlign) {
70964
+ if ((this.stroke.side & EShapeStrokeSide.TOP_OR_BOTTOM) !== 0) {
70965
+ return _super.prototype.toHitTestStrokeShift.call(this, strokeWidth, strokeScale, strokeAlign);
70966
+ }
70967
+ return 0;
70968
+ };
70969
+ EShapeFan.prototype.copy = function (source, part) {
70970
+ this.lock(EShapeLockPart.ALL);
70971
+ _super.prototype.copy.call(this, source, part);
70972
+ if ((part == null || part & EShapeCopyPart.STYLE) && source instanceof EShapeFan) {
70973
+ this._angle = source._angle;
70974
+ }
70975
+ this.unlock(EShapeLockPart.ALL, true);
70976
+ return this;
70977
+ };
70978
+ EShapeFan.prototype.clone = function () {
70979
+ return new EShapeFan(this.type).copy(this);
70980
+ };
70981
+ EShapeFan.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
70982
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
70983
+ return hitTestFan(this, x, y, ax, ay, sw, ss);
70984
+ }
70985
+ return false;
70986
+ };
70987
+ EShapeFan.prototype.serialize = function (manager) {
70988
+ var result = _super.prototype.serialize.call(this, manager);
70989
+ result[15] = this._angle;
70990
+ return result;
70991
+ };
70992
+ return EShapeFan;
70993
+ }(EShapePrimitive));
70994
+
70995
+ /*
70996
+ * Copyright (C) 2019-2026 Toshiba Corporation
70997
+ * SPDX-License-Identifier: Apache-2.0
70998
+ */
70999
+ var deserializeFan = function (item, manager, shape) {
71000
+ shape = shape || new EShapeFan();
71001
+ shape.angle = item[15];
71002
+ return deserializeBase(item, manager, shape);
71003
+ };
71004
+
71005
+ /*
71006
+ * Copyright (C) 2019-2026 Toshiba Corporation
71007
+ * SPDX-License-Identifier: Apache-2.0
71008
+ */
71009
+ var loadShapeFan = function () {
71010
+ EShapeUploadeds[EShapeType.FAN] = createPolygonUploaded;
71011
+ EShapeDeserializers[EShapeType.FAN] = deserializeFan;
71012
+ EShapeCapabilities.set(EShapeType.FAN, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE | EShapeCapability.ANGLE);
71013
+ };
71014
+
70036
71015
  /*
70037
71016
  * Copyright (C) 2019 Toshiba Corporation
70038
71017
  * SPDX-License-Identifier: Apache-2.0
@@ -70669,7 +71648,7 @@ var EShapeGroup = /** @class */ (function (_super) {
70669
71648
  if (0 < children.length) {
70670
71649
  return children[children.length - 1].radius;
70671
71650
  }
70672
- return 0.5;
71651
+ return EShapeDefaults.RADIUS;
70673
71652
  },
70674
71653
  set: function (radius) {
70675
71654
  var children = this.children;
@@ -70680,6 +71659,23 @@ var EShapeGroup = /** @class */ (function (_super) {
70680
71659
  enumerable: false,
70681
71660
  configurable: true
70682
71661
  });
71662
+ Object.defineProperty(EShapeGroup.prototype, "angle", {
71663
+ get: function () {
71664
+ var children = this.children;
71665
+ if (0 < children.length) {
71666
+ return children[children.length - 1].angle;
71667
+ }
71668
+ return EShapeDefaults.ANGLE;
71669
+ },
71670
+ set: function (angle) {
71671
+ var children = this.children;
71672
+ for (var i = 0, imax = children.length; i < imax; ++i) {
71673
+ children[i].angle = angle;
71674
+ }
71675
+ },
71676
+ enumerable: false,
71677
+ configurable: true
71678
+ });
70683
71679
  Object.defineProperty(EShapeGroup.prototype, "image", {
70684
71680
  get: function () {
70685
71681
  var children = this.children;
@@ -75417,7 +76413,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75417
76413
  boundary[2] = +ax;
75418
76414
  boundary[3] = +ay;
75419
76415
  // # of vertices and # of indices
75420
- var nv = 7;
76416
+ var nv = 9;
75421
76417
  var ni = 3;
75422
76418
  this._nvertices = nv;
75423
76419
  this._nindices = ni;
@@ -75472,11 +76468,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75472
76468
  // vertices (-sx, sy) and (sx, sy). The signs of sx and
75473
76469
  // sy intentionally preserve horizontal and vertical reflections.
75474
76470
  // The sloped edge spans ax horizontally and 2 * ay vertically.
75475
- var side = Math.sqrt(ax * ax + 4 * ay * ay);
75476
- // The base is horizontal, so its length is twice the half-width.
75477
- var base = 2 * ax;
75478
- // Length values are measured along the triangle perimeter.
75479
- var perimeter = 2 * side + base;
76471
+ var b = Math.sqrt(ax * ax + 4 * ay * ay);
75480
76472
  // The incenter lies on the vertical center line. This is its y-coordinate.
75481
76473
  // Along the median, the distances from the top vertex to the incenter and
75482
76474
  // from the incenter to the base are in the ratio 2 * side : base.
@@ -75488,42 +76480,47 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75488
76480
  // cy = ay (2 side - 2 ax) / (2 side + 2 ax)
75489
76481
  // cy = ay (side - ax) / (side + ax)
75490
76482
  var cx = 0;
75491
- var cy = (sy * (side - ax)) / (side + ax);
76483
+ var cy = (sy * (b - ax)) / (b + ax);
75492
76484
  // The distance from the incenter to every edge is the inradius.
75493
76485
  // Since 0 <= (side - ax) / (side + ax) <= 1, the incenter remains
75494
76486
  // between the apex and the base even when sy is negative.
75495
- var distance = Math.abs(sy - cy);
75496
- var fdistance = 1 / distance;
76487
+ var d = Math.abs(sy - cy);
76488
+ var fd = 1 / d;
75497
76489
  // Expand the triangle around its incenter for anti-aliasing and strokes.
75498
- // The outer vertices are shared where their interpolated attributes match.
75499
76490
  var x0 = 0;
75500
76491
  var y0 = cy + scale * (-sy - cy);
75501
76492
  var x1 = scale * sx;
75502
76493
  var y1 = cy + scale * (sy - cy);
75503
76494
  var x2 = -x1;
75504
76495
  var y2 = y1;
75505
- // Top-to-right edge cell. The inner vertex carries the fill attributes.
75506
- this.updateVertex(0, x0, y0, fdistance, 0, scale, fx, fy);
75507
- this.updateVertex(1, x1, y1, fdistance, side, scale, fx, fy);
75508
- this.updateVertex(2, cx, cy, fdistance, side - ax, 0, fx, fy);
76496
+ // Each cell has its own vertices because `length` is the arc length projected onto
76497
+ // the cell's edge. It is `lc` at the incenter (the tangent point) and
76498
+ // `lc + scale * (l - lc)` at the outer vertices so that it equals `l` at clipping = 1.
75509
76499
  var indices = this._indices;
75510
- indices[0] = 0;
75511
- indices[1] = 1;
75512
- indices[2] = 2;
75513
- // Right-to-left base edge cell. The right and left outer vertices are reused.
75514
- this.updateVertex(3, x2, y2, fdistance, side + base, scale, fx, fy);
75515
- this.updateVertex(4, cx, cy, fdistance, side + ax, 0, fx, fy);
75516
- indices[3] = 1;
75517
- indices[4] = 3;
75518
- indices[5] = 4;
75519
- // Left-to-top edge cell. The top vertex is duplicated for the perimeter seam.
75520
- this.updateVertex(5, x0, y0, fdistance, perimeter, scale, fx, fy);
75521
- this.updateVertex(6, cx, cy, fdistance, perimeter - (side - ax), 0, fx, fy);
75522
- indices[6] = 3;
75523
- indices[7] = 5;
75524
- indices[8] = 6;
75525
- };
75526
- EShapeTriangleTriangulatedImpl.prototype.updateVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
76500
+ // Top-to-right edge cell
76501
+ var l0 = 0;
76502
+ var l1 = l0 + b;
76503
+ var lc0 = b - ax;
76504
+ this.writeVertex(0, x0, y0, fd, lc0 + scale * (l0 - lc0), scale, fx, fy);
76505
+ this.writeVertex(1, x1, y1, fd, lc0 + scale * (l1 - lc0), scale, fx, fy);
76506
+ this.writeVertex(2, cx, cy, fd, lc0, 0, fx, fy);
76507
+ // Right-to-left base edge cell
76508
+ var l2 = l1 + 2 * ax;
76509
+ var lc1 = b + ax;
76510
+ this.writeVertex(3, x1, y1, fd, lc1 + scale * (l1 - lc1), scale, fx, fy);
76511
+ this.writeVertex(4, x2, y2, fd, lc1 + scale * (l2 - lc1), scale, fx, fy);
76512
+ this.writeVertex(5, cx, cy, fd, lc1, 0, fx, fy);
76513
+ // Left-to-top edge cell
76514
+ var l3 = l2 + b;
76515
+ var lc2 = b + 3 * ax;
76516
+ this.writeVertex(6, x2, y2, fd, lc2 + scale * (l2 - lc2), scale, fx, fy);
76517
+ this.writeVertex(7, x0, y0, fd, lc2 + scale * (l3 - lc2), scale, fx, fy);
76518
+ this.writeVertex(8, cx, cy, fd, lc2, 0, fx, fy);
76519
+ for (var i = 0; i < 9; ++i) {
76520
+ indices[i] = i;
76521
+ }
76522
+ };
76523
+ EShapeTriangleTriangulatedImpl.prototype.writeVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
75527
76524
  var vertex2 = vertex << 1;
75528
76525
  this._vertices[vertex2] = x;
75529
76526
  this._vertices[vertex2 + 1] = y;
@@ -77534,14 +78531,13 @@ var EShapePolygon = /** @class */ (function (_super) {
77534
78531
  return new EShapePolygon(this.type).copy(this);
77535
78532
  };
77536
78533
  EShapePolygon.prototype.copy = function (source, part) {
77537
- if (part === void 0) { part = EShapeCopyPart.ALL; }
77538
78534
  this.lock(EShapeLockPart.ALL);
77539
- var result = _super.prototype.copy.call(this, source, part);
77540
- if (part & EShapeCopyPart.POINTS && source instanceof EShapePolygon) {
78535
+ _super.prototype.copy.call(this, source, part);
78536
+ if ((part == null || part & EShapeCopyPart.POINTS) && source instanceof EShapePolygon) {
77541
78537
  this._triangulated.copy(source._triangulated);
77542
78538
  }
77543
78539
  this.unlock(EShapeLockPart.ALL, true);
77544
- return result;
78540
+ return this;
77545
78541
  };
77546
78542
  EShapePolygon.prototype.serialize = function (manager) {
77547
78543
  var result = _super.prototype.serialize.call(this, manager);
@@ -77878,11 +78874,84 @@ var loadShapeRectangleRoundedLegacy = function () {
77878
78874
  EShapeCapabilities.set(EShapeType.RECTANGLE_ROUNDED_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE | EShapeCapability.BORDER_RADIUS);
77879
78875
  };
77880
78876
 
77881
- var SEMICIRCLE_VERTEX_COUNT = 6;
77882
- var SEMICIRCLE_INDEX_COUNT = 4;
77883
- var SEMICIRCLE_WORLD_SIZE = [0, 0];
77884
- var SEMICIRCLE_WORK_POINT = new pixi_js.Point();
77885
- var buildSemicircleIndex = function (indices, voffset, ioffset) {
78877
+ /*
78878
+ * Copyright (C) 2019-2026 Toshiba Corporation
78879
+ * SPDX-License-Identifier: Apache-2.0
78880
+ */
78881
+ /**
78882
+ * A semicircle shape.
78883
+ */
78884
+ var EShapeSemicircle = /** @class */ (function (_super) {
78885
+ __extends(EShapeSemicircle, _super);
78886
+ function EShapeSemicircle(type) {
78887
+ if (type === void 0) { type = EShapeType.SEMICIRCLE; }
78888
+ var _this = _super.call(this, type) || this;
78889
+ _this._triangulated = _this.newTriangulated();
78890
+ return _this;
78891
+ }
78892
+ EShapeSemicircle.prototype.newStroke = function () {
78893
+ 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);
78894
+ };
78895
+ EShapeSemicircle.prototype.newTriangulated = function () {
78896
+ return new EShapeFanTriangulatedImpl(this);
78897
+ };
78898
+ Object.defineProperty(EShapeSemicircle.prototype, "triangulated", {
78899
+ get: function () {
78900
+ return this._triangulated;
78901
+ },
78902
+ enumerable: false,
78903
+ configurable: true
78904
+ });
78905
+ Object.defineProperty(EShapeSemicircle.prototype, "angle", {
78906
+ get: function () {
78907
+ return 0.5;
78908
+ },
78909
+ set: function (angle) {
78910
+ // DO NOTHING
78911
+ },
78912
+ enumerable: false,
78913
+ configurable: true
78914
+ });
78915
+ EShapeSemicircle.prototype.toHitTestStrokeShift = function (strokeWidth, strokeScale, strokeAlign) {
78916
+ if ((this.stroke.side & EShapeStrokeSide.TOP_OR_BOTTOM) !== 0) {
78917
+ return _super.prototype.toHitTestStrokeShift.call(this, strokeWidth, strokeScale, strokeAlign);
78918
+ }
78919
+ return 0;
78920
+ };
78921
+ EShapeSemicircle.prototype.clone = function () {
78922
+ return new EShapeSemicircle(this.type).copy(this);
78923
+ };
78924
+ EShapeSemicircle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
78925
+ if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
78926
+ return hitTestFan(this, x, y, ax, ay, sw, ss);
78927
+ }
78928
+ return false;
78929
+ };
78930
+ return EShapeSemicircle;
78931
+ }(EShapePrimitive));
78932
+
78933
+ /*
78934
+ * Copyright (C) 2019 Toshiba Corporation
78935
+ * SPDX-License-Identifier: Apache-2.0
78936
+ */
78937
+ var deserializeSemicircle = function (item, manager, shape) {
78938
+ return deserializeBase(item, manager, shape || new EShapeSemicircle());
78939
+ };
78940
+
78941
+ /*
78942
+ * Copyright (C) 2019 Toshiba Corporation
78943
+ * SPDX-License-Identifier: Apache-2.0
78944
+ */
78945
+ var loadShapeSemicircle = function () {
78946
+ EShapeUploadeds[EShapeType.SEMICIRCLE] = createPolygonUploaded;
78947
+ EShapeDeserializers[EShapeType.SEMICIRCLE] = deserializeSemicircle;
78948
+ EShapeCapabilities.set(EShapeType.SEMICIRCLE, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
78949
+ };
78950
+
78951
+ var SEMICIRCLE_LEGACY_VERTEX_COUNT = 6;
78952
+ var SEMICIRCLE_LEGACY_INDEX_COUNT = 4;
78953
+ var SEMICIRCLE_LEGACY_WORLD_SIZE = [0, 0];
78954
+ var buildSemicircleLegacyIndex = function (indices, voffset, ioffset) {
77886
78955
  var ii = ioffset * 3 - 1;
77887
78956
  indices[++ii] = voffset;
77888
78957
  indices[++ii] = voffset + 1;
@@ -77897,7 +78966,7 @@ var buildSemicircleIndex = function (indices, voffset, ioffset) {
77897
78966
  indices[++ii] = voffset + 5;
77898
78967
  indices[++ii] = voffset + 4;
77899
78968
  };
77900
- var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
78969
+ var buildSemicircleLegacyVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
77901
78970
  // Calculate the transformed positions
77902
78971
  //
77903
78972
  // 0 1 2
@@ -77905,24 +78974,23 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77905
78974
  // |3 |4 |5
77906
78975
  // |-------|-------|
77907
78976
  //
77908
- var work = SEMICIRCLE_WORK_POINT;
77909
78977
  var s = strokeAlign * strokeWidth;
77910
78978
  var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
77911
78979
  var sy = sizeY * 0.5 + (0 <= sizeY ? +s : -s);
77912
- work.set(-sx + originX, -sy + originY);
77913
- internalTransform.apply(work, work);
77914
- var x0 = work.x;
77915
- var y0 = work.y;
77916
- work.set(0 + originX, -sy + originY);
77917
- internalTransform.apply(work, work);
77918
- var x1 = work.x;
77919
- var y1 = work.y;
78980
+ var a = internalTransform.a;
78981
+ var b = internalTransform.b;
78982
+ var c = internalTransform.c;
78983
+ var d = internalTransform.d;
78984
+ var tx = internalTransform.tx;
78985
+ var ty = internalTransform.ty;
78986
+ var x0 = a * (-sx + originX) + c * (-sy + originY) + tx;
78987
+ var y0 = b * (-sx + originX) + d * (-sy + originY) + ty;
78988
+ var x1 = a * originX + c * (-sy + originY) + tx;
78989
+ var y1 = b * originX + d * (-sy + originY) + ty;
77920
78990
  var dx = x1 - x0;
77921
78991
  var dy = y1 - y0;
77922
- work.set(originX, originY);
77923
- internalTransform.apply(work, work);
77924
- var x4 = work.x;
77925
- var y4 = work.y;
78992
+ var x4 = a * originX + c * originY + tx;
78993
+ var y4 = b * originX + d * originY + ty;
77926
78994
  var x3 = x4 - dx;
77927
78995
  var y3 = y4 - dy;
77928
78996
  // Vertices
@@ -77942,7 +79010,7 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77942
79010
  worldSize[0] = toLength(x0, y0, x1, y1);
77943
79011
  worldSize[1] = toLength(x0, y0, x3, y3);
77944
79012
  };
77945
- var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
79013
+ var buildSemicircleLegacyStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
77946
79014
  var scaleInvariant = toScaleInvariant(strokeStyle);
77947
79015
  var ws0 = worldSize[0];
77948
79016
  var ws1 = worldSize[1];
@@ -77989,7 +79057,7 @@ var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, wo
77989
79057
  steps[++is] = c10;
77990
79058
  steps[++is] = 0;
77991
79059
  };
77992
- var buildSemicircleUv = function (uvs, voffset, textureUvs) {
79060
+ var buildSemicircleLegacyUv = function (uvs, voffset, textureUvs) {
77993
79061
  var x0 = textureUvs.x0;
77994
79062
  var x1 = textureUvs.x1;
77995
79063
  var x2 = textureUvs.x2;
@@ -78018,25 +79086,25 @@ var buildSemicircleUv = function (uvs, voffset, textureUvs) {
78018
79086
  * Copyright (C) 2019 Toshiba Corporation
78019
79087
  * SPDX-License-Identifier: Apache-2.0
78020
79088
  */
78021
- var BuilderSemicircle = /** @class */ (function (_super) {
78022
- __extends(BuilderSemicircle, _super);
78023
- function BuilderSemicircle(buffer, vertexOffset, indexOffset) {
78024
- return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
79089
+ var BuilderSemicircleLegacy = /** @class */ (function (_super) {
79090
+ __extends(BuilderSemicircleLegacy, _super);
79091
+ function BuilderSemicircleLegacy(buffer, vertexOffset, indexOffset) {
79092
+ return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_LEGACY_VERTEX_COUNT, SEMICIRCLE_LEGACY_INDEX_COUNT) || this;
78025
79093
  }
78026
- BuilderSemicircle.prototype.init = function () {
79094
+ BuilderSemicircleLegacy.prototype.init = function () {
78027
79095
  var buffer = this.buffer;
78028
79096
  buffer.updateIndices();
78029
79097
  var voffset = this.vertexOffset;
78030
- buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
79098
+ buildSemicircleLegacyIndex(buffer.indices, voffset, this.indexOffset);
78031
79099
  this.inited |= BuilderFlag.INDEX;
78032
79100
  };
78033
- BuilderSemicircle.prototype.update = function (shape) {
79101
+ BuilderSemicircleLegacy.prototype.update = function (shape) {
78034
79102
  var buffer = this.buffer;
78035
79103
  this.updateVertexAndStep(buffer, shape);
78036
79104
  this.updateColor(buffer, shape);
78037
79105
  this.updateUv(buffer, shape);
78038
79106
  };
78039
- BuilderSemicircle.prototype.updateVertexAndStep = function (buffer, shape) {
79107
+ BuilderSemicircleLegacy.prototype.updateVertexAndStep = function (buffer, shape) {
78040
79108
  var size = shape.size;
78041
79109
  var sizeX = size.x;
78042
79110
  var sizeY = size.y;
@@ -78062,11 +79130,11 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78062
79130
  // Buffer
78063
79131
  buffer.updateVertices();
78064
79132
  buffer.updateSteps();
78065
- buildSemicircleVertex(buffer.vertices, this.vertexOffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, SEMICIRCLE_WORLD_SIZE);
78066
- buildSemicircleStep(buffer.steps, this.vertexOffset, strokeWidth, strokeStyle, SEMICIRCLE_WORLD_SIZE);
79133
+ buildSemicircleLegacyVertex(buffer.vertices, this.vertexOffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, SEMICIRCLE_LEGACY_WORLD_SIZE);
79134
+ buildSemicircleLegacyStep(buffer.steps, this.vertexOffset, strokeWidth, strokeStyle, SEMICIRCLE_LEGACY_WORLD_SIZE);
78067
79135
  }
78068
79136
  };
78069
- BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
79137
+ BuilderSemicircleLegacy.prototype.updateUv = function (buffer, shape) {
78070
79138
  var texture = toTexture(shape);
78071
79139
  var textureTransformId = toTextureTransformId(texture);
78072
79140
  var isNotInited = !(this.inited & BuilderFlag.UV);
@@ -78078,26 +79146,26 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78078
79146
  this.textureTransformId = textureTransformId;
78079
79147
  buffer.updateUvs();
78080
79148
  var textureUvs = toTextureUvs(texture);
78081
- buildSemicircleUv(buffer.uvs, this.vertexOffset, textureUvs);
79149
+ buildSemicircleLegacyUv(buffer.uvs, this.vertexOffset, textureUvs);
78082
79150
  }
78083
79151
  };
78084
- return BuilderSemicircle;
79152
+ return BuilderSemicircleLegacy;
78085
79153
  }(BuilderBase));
78086
79154
 
78087
79155
  /*
78088
79156
  * Copyright (C) 2019 Toshiba Corporation
78089
79157
  * SPDX-License-Identifier: Apache-2.0
78090
79158
  */
78091
- var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
79159
+ var createSemicircleLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
78092
79160
  var tcount = toTextBufferCount(shape);
78093
79161
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
78094
79162
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
78095
- var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
78096
- var icount = SEMICIRCLE_INDEX_COUNT + ticount;
79163
+ var vcount = SEMICIRCLE_LEGACY_VERTEX_COUNT + tvcount;
79164
+ var icount = SEMICIRCLE_LEGACY_INDEX_COUNT + ticount;
78097
79165
  if (buffer.check(voffset, ioffset, vcount, icount)) {
78098
79166
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
78099
- new BuilderSemicircle(buffer, voffset, ioffset),
78100
- new BuilderText(buffer, voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
79167
+ new BuilderSemicircleLegacy(buffer, voffset, ioffset),
79168
+ new BuilderText(buffer, voffset + SEMICIRCLE_LEGACY_VERTEX_COUNT, ioffset + SEMICIRCLE_LEGACY_INDEX_COUNT, tvcount, ticount)
78101
79169
  ]).init(shape);
78102
79170
  }
78103
79171
  return null;
@@ -78120,44 +79188,42 @@ var hitTestSemicircle = function (shape, x, y, ax, ay, sw, ss) {
78120
79188
  */
78121
79189
  /**
78122
79190
  * A semicircle shape.
78123
- *
78124
- * @beta
78125
79191
  */
78126
- var EShapeSemicircle = /** @class */ (function (_super) {
78127
- __extends(EShapeSemicircle, _super);
78128
- function EShapeSemicircle(type) {
78129
- if (type === void 0) { type = EShapeType.SEMICIRCLE; }
79192
+ var EShapeSemicircleLegacy = /** @class */ (function (_super) {
79193
+ __extends(EShapeSemicircleLegacy, _super);
79194
+ function EShapeSemicircleLegacy(type) {
79195
+ if (type === void 0) { type = EShapeType.SEMICIRCLE_LEGACY; }
78130
79196
  var _this = _super.call(this, type) || this;
78131
79197
  _this.stroke.side = EShapeStrokeSide.ALL & ~EShapeStrokeSide.BOTTOM;
78132
79198
  return _this;
78133
79199
  }
78134
- EShapeSemicircle.prototype.clone = function () {
78135
- return new EShapeSemicircle(this.type).copy(this);
79200
+ EShapeSemicircleLegacy.prototype.clone = function () {
79201
+ return new EShapeSemicircleLegacy(this.type).copy(this);
78136
79202
  };
78137
- EShapeSemicircle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
79203
+ EShapeSemicircleLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
78138
79204
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
78139
79205
  return hitTestSemicircle(this, x, y, ax, ay, sw, ss);
78140
79206
  }
78141
79207
  return false;
78142
79208
  };
78143
- return EShapeSemicircle;
79209
+ return EShapeSemicircleLegacy;
78144
79210
  }(EShapePrimitive));
78145
79211
 
78146
79212
  /*
78147
79213
  * Copyright (C) 2019 Toshiba Corporation
78148
79214
  * SPDX-License-Identifier: Apache-2.0
78149
79215
  */
78150
- var deserializeSemicircle = function (item, manager, shape) {
78151
- return deserializeBase(item, manager, shape || new EShapeSemicircle());
79216
+ var deserializeSemicircleLegacy = function (item, manager, shape) {
79217
+ return deserializeBase(item, manager, shape || new EShapeSemicircleLegacy());
78152
79218
  };
78153
79219
 
78154
79220
  /*
78155
79221
  * Copyright (C) 2019 Toshiba Corporation
78156
79222
  * SPDX-License-Identifier: Apache-2.0
78157
79223
  */
78158
- var loadShapeSemicircle = function () {
78159
- EShapeUploadeds[EShapeType.SEMICIRCLE] = createSemicircleUploaded;
78160
- EShapeDeserializers[EShapeType.SEMICIRCLE] = deserializeSemicircle;
79224
+ var loadShapeSemicircleLegacy = function () {
79225
+ EShapeUploadeds[EShapeType.SEMICIRCLE_LEGACY] = createSemicircleLegacyUploaded;
79226
+ EShapeDeserializers[EShapeType.SEMICIRCLE_LEGACY] = deserializeSemicircleLegacy;
78161
79227
  };
78162
79228
 
78163
79229
  /*
@@ -78913,6 +79979,7 @@ var loadShapeAll = function () {
78913
79979
  loadShapeConnectorElbow();
78914
79980
  loadShapeConnectorLine();
78915
79981
  loadShapeEmbedded();
79982
+ loadShapeFan();
78916
79983
  loadShapeGroupShadowed();
78917
79984
  loadShapeGroup();
78918
79985
  loadShapeImage();
@@ -78926,6 +79993,7 @@ var loadShapeAll = function () {
78926
79993
  loadShapeRectangleRoundedLegacy();
78927
79994
  loadShapeRectangleRounded();
78928
79995
  loadShapeRectangle();
79996
+ loadShapeSemicircleLegacy();
78929
79997
  loadShapeSemicircle();
78930
79998
  loadShapeTriangleLegacy();
78931
79999
  loadShapeTriangleRoundedLegacy();
@@ -110065,7 +111133,7 @@ exports.BuilderRectangleLegacy = BuilderRectangleLegacy;
110065
111133
  exports.BuilderRectanglePivoted = BuilderRectanglePivoted;
110066
111134
  exports.BuilderRectangleRounded = BuilderRectangleRoundedLegacy;
110067
111135
  exports.BuilderRectangleRoundedLegacy = BuilderRectangleRoundedLegacy;
110068
- exports.BuilderSemicircle = BuilderSemicircle;
111136
+ exports.BuilderSemicircle = BuilderSemicircleLegacy;
110069
111137
  exports.BuilderText = BuilderText;
110070
111138
  exports.BuilderTriangle = BuilderTriangleLegacy;
110071
111139
  exports.BuilderTriangleLegacy = BuilderTriangleLegacy;
@@ -111341,6 +112409,8 @@ exports.EShapeEmbeddedDatum = EShapeEmbeddedDatum;
111341
112409
  exports.EShapeEmbeddedLayer = EShapeEmbeddedLayer;
111342
112410
  exports.EShapeEmbeddedLayerContainer = EShapeEmbeddedLayerContainer;
111343
112411
  exports.EShapeEmbeddeds = EShapeEmbeddeds;
112412
+ exports.EShapeFan = EShapeFan;
112413
+ exports.EShapeFanTriangulatedImpl = EShapeFanTriangulatedImpl;
111344
112414
  exports.EShapeFillDirection = EShapeFillDirection;
111345
112415
  exports.EShapeFillImpl = EShapeFillImpl;
111346
112416
  exports.EShapeGroup = EShapeGroup;
@@ -111408,6 +112478,7 @@ exports.EShapeRuntimeImpl = EShapeRuntimeImpl;
111408
112478
  exports.EShapeRuntimeReset = EShapeRuntimeReset;
111409
112479
  exports.EShapeRuntimes = EShapeRuntimes;
111410
112480
  exports.EShapeSemicircle = EShapeSemicircle;
112481
+ exports.EShapeSemicircleLegacy = EShapeSemicircleLegacy;
111411
112482
  exports.EShapeState = EShapeState;
111412
112483
  exports.EShapeStateSetImplObservable = EShapeStateSetImplObservable;
111413
112484
  exports.EShapeStrokeImpl = EShapeStrokeImpl;
@@ -111501,9 +112572,12 @@ exports.RECTANGLE_ROUNDED_VERTEX_COUNT = RECTANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
111501
112572
  exports.RECTANGLE_ROUNDED_WORLD_SIZE = RECTANGLE_ROUNDED_LEGACY_WORLD_SIZE;
111502
112573
  exports.RECTANGLE_VERTEX_COUNT = RECTANGLE_LEGACY_VERTEX_COUNT;
111503
112574
  exports.RECTANGLE_WORLD_SIZE = RECTANGLE_LEGACY_WORLD_SIZE;
111504
- exports.SEMICIRCLE_INDEX_COUNT = SEMICIRCLE_INDEX_COUNT;
111505
- exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_VERTEX_COUNT;
111506
- exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_WORLD_SIZE;
112575
+ exports.SEMICIRCLE_INDEX_COUNT = SEMICIRCLE_LEGACY_INDEX_COUNT;
112576
+ exports.SEMICIRCLE_LEGACY_INDEX_COUNT = SEMICIRCLE_LEGACY_INDEX_COUNT;
112577
+ exports.SEMICIRCLE_LEGACY_VERTEX_COUNT = SEMICIRCLE_LEGACY_VERTEX_COUNT;
112578
+ exports.SEMICIRCLE_LEGACY_WORLD_SIZE = SEMICIRCLE_LEGACY_WORLD_SIZE;
112579
+ exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_LEGACY_VERTEX_COUNT;
112580
+ exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_LEGACY_WORLD_SIZE;
111507
112581
  exports.TEXT_FMIN = TEXT_FMIN;
111508
112582
  exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
111509
112583
  exports.TEXT_INDEX_COUNT_SHIFT = TEXT_INDEX_COUNT_SHIFT;
@@ -111613,10 +112687,14 @@ exports.buildRectangleRoundedVertex = buildRectangleRoundedLegacyVertex;
111613
112687
  exports.buildRectangleStep = buildRectangleLegacyStep;
111614
112688
  exports.buildRectangleUv = buildRectangleLegacyUv;
111615
112689
  exports.buildRectangleVertex = buildRectangleLegacyVertex;
111616
- exports.buildSemicircleIndex = buildSemicircleIndex;
111617
- exports.buildSemicircleStep = buildSemicircleStep;
111618
- exports.buildSemicircleUv = buildSemicircleUv;
111619
- exports.buildSemicircleVertex = buildSemicircleVertex;
112690
+ exports.buildSemicircleIndex = buildSemicircleLegacyIndex;
112691
+ exports.buildSemicircleLegacyIndex = buildSemicircleLegacyIndex;
112692
+ exports.buildSemicircleLegacyStep = buildSemicircleLegacyStep;
112693
+ exports.buildSemicircleLegacyUv = buildSemicircleLegacyUv;
112694
+ exports.buildSemicircleLegacyVertex = buildSemicircleLegacyVertex;
112695
+ exports.buildSemicircleStep = buildSemicircleLegacyStep;
112696
+ exports.buildSemicircleUv = buildSemicircleLegacyUv;
112697
+ exports.buildSemicircleVertex = buildSemicircleLegacyVertex;
111620
112698
  exports.buildTextIndex = buildTextIndex;
111621
112699
  exports.buildTextStep = buildTextStep;
111622
112700
  exports.buildTextVertex = buildTextVertex;
@@ -111665,7 +112743,8 @@ exports.createRectanglePivotedUploaded = createRectanglePivotedUploaded;
111665
112743
  exports.createRectangleRoundedLegacyUploaded = createRectangleRoundedLegacyUploaded;
111666
112744
  exports.createRectangleRoundedUploaded = createRectangleRoundedLegacyUploaded;
111667
112745
  exports.createRectangleUploaded = createRectangleLegacyUploaded;
111668
- exports.createSemicircleUploaded = createSemicircleUploaded;
112746
+ exports.createSemicircleLegacyUploaded = createSemicircleLegacyUploaded;
112747
+ exports.createSemicircleUploaded = createSemicircleLegacyUploaded;
111669
112748
  exports.createTriangleLegacyUploaded = createTriangleLegacyUploaded;
111670
112749
  exports.createTriangleRoundedLegacyUploaded = createTriangleRoundedLegacyUploaded;
111671
112750
  exports.createTriangleRoundedUploaded = createTriangleRoundedLegacyUploaded;
@@ -111687,6 +112766,7 @@ exports.deserializeConnectorLine = deserializeConnectorLine;
111687
112766
  exports.deserializeEmbedded = deserializeEmbedded;
111688
112767
  exports.deserializeEmbeddedAcceptorEdge = deserializeEmbeddedAcceptorEdge;
111689
112768
  exports.deserializeEmbeddedLayer = deserializeEmbeddedLayer;
112769
+ exports.deserializeFan = deserializeFan;
111690
112770
  exports.deserializeGradient = deserializeGradient;
111691
112771
  exports.deserializeGroup = deserializeGroup;
111692
112772
  exports.deserializeGroupShadowed = deserializeGroupShadowed;
@@ -111707,6 +112787,7 @@ exports.deserializeRectanglePivoted = deserializeRectanglePivoted;
111707
112787
  exports.deserializeRectangleRounded = deserializeRectangleRounded;
111708
112788
  exports.deserializeRectangleRoundedLegacy = deserializeRectangleRoundedLegacy;
111709
112789
  exports.deserializeSemicircle = deserializeSemicircle;
112790
+ exports.deserializeSemicircleLegacy = deserializeSemicircleLegacy;
111710
112791
  exports.deserializeTriangle = deserializeTriangle;
111711
112792
  exports.deserializeTriangleLegacy = deserializeTriangleLegacy;
111712
112793
  exports.deserializeTriangleRounded = deserializeTriangleRounded;
@@ -111716,6 +112797,7 @@ exports.eShapePointsFormatterCurveBezierQuadratic = eShapePointsFormatterCurveBe
111716
112797
  exports.hitTestBBox = hitTestBBox;
111717
112798
  exports.hitTestCircle = hitTestCircle;
111718
112799
  exports.hitTestCircleLegacy = hitTestCircleLegacy;
112800
+ exports.hitTestFan = hitTestFan;
111719
112801
  exports.hitTestRectangle = hitTestRectangle;
111720
112802
  exports.hitTestRectangleLegacy = hitTestRectangleLegacy;
111721
112803
  exports.hitTestRectangleRounded = hitTestRectangleRounded;
@@ -111750,6 +112832,7 @@ exports.loadShapeClipperEx = loadShapeClipperEx;
111750
112832
  exports.loadShapeConnectorElbow = loadShapeConnectorElbow;
111751
112833
  exports.loadShapeConnectorLine = loadShapeConnectorLine;
111752
112834
  exports.loadShapeEmbedded = loadShapeEmbedded;
112835
+ exports.loadShapeFan = loadShapeFan;
111753
112836
  exports.loadShapeGroup = loadShapeGroup;
111754
112837
  exports.loadShapeGroupShadowed = loadShapeGroupShadowed;
111755
112838
  exports.loadShapeImage = loadShapeImage;
@@ -111768,6 +112851,7 @@ exports.loadShapeRectanglePivoted = loadShapeRectanglePivoted;
111768
112851
  exports.loadShapeRectangleRounded = loadShapeRectangleRounded;
111769
112852
  exports.loadShapeRectangleRoundedLegacy = loadShapeRectangleRoundedLegacy;
111770
112853
  exports.loadShapeSemicircle = loadShapeSemicircle;
112854
+ exports.loadShapeSemicircleLegacy = loadShapeSemicircleLegacy;
111771
112855
  exports.loadShapeTriangle = loadShapeTriangle;
111772
112856
  exports.loadShapeTriangleLegacy = loadShapeTriangleLegacy;
111773
112857
  exports.loadShapeTriangleRounded = loadShapeTriangleRounded;
@@ -112021,6 +113105,8 @@ exports.toCloned = toCloned;
112021
113105
  exports.toComputed = toComputed;
112022
113106
  exports.toDash = toDash;
112023
113107
  exports.toEnum = toEnum;
113108
+ exports.toFanAngleCentric = toFanAngleCentric;
113109
+ exports.toFanAngleEccentric = toFanAngleEccentric;
112024
113110
  exports.toGradientImageUrl = toGradientImageUrl;
112025
113111
  exports.toGradientSerialized = toGradientSerialized;
112026
113112
  exports.toId = toId;