@wcardinal/wcardinal-ui 0.468.0 → 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 (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 +200 -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 +724 -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 +1160 -103
  123. package/dist/wcardinal-ui.js +1154 -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.0
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,918 @@ 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 = 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
+
70036
70986
  /*
70037
70987
  * Copyright (C) 2019 Toshiba Corporation
70038
70988
  * SPDX-License-Identifier: Apache-2.0
@@ -70669,7 +71619,7 @@ var EShapeGroup = /** @class */ (function (_super) {
70669
71619
  if (0 < children.length) {
70670
71620
  return children[children.length - 1].radius;
70671
71621
  }
70672
- return 0.5;
71622
+ return EShapeDefaults.RADIUS;
70673
71623
  },
70674
71624
  set: function (radius) {
70675
71625
  var children = this.children;
@@ -70680,6 +71630,23 @@ var EShapeGroup = /** @class */ (function (_super) {
70680
71630
  enumerable: false,
70681
71631
  configurable: true
70682
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
+ });
70683
71650
  Object.defineProperty(EShapeGroup.prototype, "image", {
70684
71651
  get: function () {
70685
71652
  var children = this.children;
@@ -75417,7 +76384,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75417
76384
  boundary[2] = +ax;
75418
76385
  boundary[3] = +ay;
75419
76386
  // # of vertices and # of indices
75420
- var nv = 7;
76387
+ var nv = 9;
75421
76388
  var ni = 3;
75422
76389
  this._nvertices = nv;
75423
76390
  this._nindices = ni;
@@ -75472,11 +76439,7 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75472
76439
  // vertices (-sx, sy) and (sx, sy). The signs of sx and
75473
76440
  // sy intentionally preserve horizontal and vertical reflections.
75474
76441
  // 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;
76442
+ var b = Math.sqrt(ax * ax + 4 * ay * ay);
75480
76443
  // The incenter lies on the vertical center line. This is its y-coordinate.
75481
76444
  // Along the median, the distances from the top vertex to the incenter and
75482
76445
  // from the incenter to the base are in the ratio 2 * side : base.
@@ -75488,42 +76451,47 @@ var EShapeTriangleTriangulatedImpl = /** @class */ (function () {
75488
76451
  // cy = ay (2 side - 2 ax) / (2 side + 2 ax)
75489
76452
  // cy = ay (side - ax) / (side + ax)
75490
76453
  var cx = 0;
75491
- var cy = (sy * (side - ax)) / (side + ax);
76454
+ var cy = (sy * (b - ax)) / (b + ax);
75492
76455
  // The distance from the incenter to every edge is the inradius.
75493
76456
  // Since 0 <= (side - ax) / (side + ax) <= 1, the incenter remains
75494
76457
  // between the apex and the base even when sy is negative.
75495
- var distance = Math.abs(sy - cy);
75496
- var fdistance = 1 / distance;
76458
+ var d = Math.abs(sy - cy);
76459
+ var fd = 1 / d;
75497
76460
  // Expand the triangle around its incenter for anti-aliasing and strokes.
75498
- // The outer vertices are shared where their interpolated attributes match.
75499
76461
  var x0 = 0;
75500
76462
  var y0 = cy + scale * (-sy - cy);
75501
76463
  var x1 = scale * sx;
75502
76464
  var y1 = cy + scale * (sy - cy);
75503
76465
  var x2 = -x1;
75504
76466
  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);
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.
75509
76470
  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) {
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) {
75527
76495
  var vertex2 = vertex << 1;
75528
76496
  this._vertices[vertex2] = x;
75529
76497
  this._vertices[vertex2 + 1] = y;
@@ -77534,14 +78502,13 @@ var EShapePolygon = /** @class */ (function (_super) {
77534
78502
  return new EShapePolygon(this.type).copy(this);
77535
78503
  };
77536
78504
  EShapePolygon.prototype.copy = function (source, part) {
77537
- if (part === void 0) { part = EShapeCopyPart.ALL; }
77538
78505
  this.lock(EShapeLockPart.ALL);
77539
- var result = _super.prototype.copy.call(this, source, part);
77540
- 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) {
77541
78508
  this._triangulated.copy(source._triangulated);
77542
78509
  }
77543
78510
  this.unlock(EShapeLockPart.ALL, true);
77544
- return result;
78511
+ return this;
77545
78512
  };
77546
78513
  EShapePolygon.prototype.serialize = function (manager) {
77547
78514
  var result = _super.prototype.serialize.call(this, manager);
@@ -77878,11 +78845,84 @@ var loadShapeRectangleRoundedLegacy = function () {
77878
78845
  EShapeCapabilities.set(EShapeType.RECTANGLE_ROUNDED_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE | EShapeCapability.BORDER_RADIUS);
77879
78846
  };
77880
78847
 
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) {
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) {
77886
78926
  var ii = ioffset * 3 - 1;
77887
78927
  indices[++ii] = voffset;
77888
78928
  indices[++ii] = voffset + 1;
@@ -77897,7 +78937,7 @@ var buildSemicircleIndex = function (indices, voffset, ioffset) {
77897
78937
  indices[++ii] = voffset + 5;
77898
78938
  indices[++ii] = voffset + 4;
77899
78939
  };
77900
- 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) {
77901
78941
  // Calculate the transformed positions
77902
78942
  //
77903
78943
  // 0 1 2
@@ -77905,24 +78945,23 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77905
78945
  // |3 |4 |5
77906
78946
  // |-------|-------|
77907
78947
  //
77908
- var work = SEMICIRCLE_WORK_POINT;
77909
78948
  var s = strokeAlign * strokeWidth;
77910
78949
  var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
77911
78950
  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;
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;
77920
78961
  var dx = x1 - x0;
77921
78962
  var dy = y1 - y0;
77922
- work.set(originX, originY);
77923
- internalTransform.apply(work, work);
77924
- var x4 = work.x;
77925
- var y4 = work.y;
78963
+ var x4 = a * originX + c * originY + tx;
78964
+ var y4 = b * originX + d * originY + ty;
77926
78965
  var x3 = x4 - dx;
77927
78966
  var y3 = y4 - dy;
77928
78967
  // Vertices
@@ -77942,7 +78981,7 @@ var buildSemicircleVertex = function (vertices, voffset, originX, originY, sizeX
77942
78981
  worldSize[0] = toLength(x0, y0, x1, y1);
77943
78982
  worldSize[1] = toLength(x0, y0, x3, y3);
77944
78983
  };
77945
- var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
78984
+ var buildSemicircleLegacyStep = function (steps, voffset, strokeWidth, strokeStyle, worldSize) {
77946
78985
  var scaleInvariant = toScaleInvariant(strokeStyle);
77947
78986
  var ws0 = worldSize[0];
77948
78987
  var ws1 = worldSize[1];
@@ -77989,7 +79028,7 @@ var buildSemicircleStep = function (steps, voffset, strokeWidth, strokeStyle, wo
77989
79028
  steps[++is] = c10;
77990
79029
  steps[++is] = 0;
77991
79030
  };
77992
- var buildSemicircleUv = function (uvs, voffset, textureUvs) {
79031
+ var buildSemicircleLegacyUv = function (uvs, voffset, textureUvs) {
77993
79032
  var x0 = textureUvs.x0;
77994
79033
  var x1 = textureUvs.x1;
77995
79034
  var x2 = textureUvs.x2;
@@ -78018,25 +79057,25 @@ var buildSemicircleUv = function (uvs, voffset, textureUvs) {
78018
79057
  * Copyright (C) 2019 Toshiba Corporation
78019
79058
  * SPDX-License-Identifier: Apache-2.0
78020
79059
  */
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;
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;
78025
79064
  }
78026
- BuilderSemicircle.prototype.init = function () {
79065
+ BuilderSemicircleLegacy.prototype.init = function () {
78027
79066
  var buffer = this.buffer;
78028
79067
  buffer.updateIndices();
78029
79068
  var voffset = this.vertexOffset;
78030
- buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
79069
+ buildSemicircleLegacyIndex(buffer.indices, voffset, this.indexOffset);
78031
79070
  this.inited |= BuilderFlag.INDEX;
78032
79071
  };
78033
- BuilderSemicircle.prototype.update = function (shape) {
79072
+ BuilderSemicircleLegacy.prototype.update = function (shape) {
78034
79073
  var buffer = this.buffer;
78035
79074
  this.updateVertexAndStep(buffer, shape);
78036
79075
  this.updateColor(buffer, shape);
78037
79076
  this.updateUv(buffer, shape);
78038
79077
  };
78039
- BuilderSemicircle.prototype.updateVertexAndStep = function (buffer, shape) {
79078
+ BuilderSemicircleLegacy.prototype.updateVertexAndStep = function (buffer, shape) {
78040
79079
  var size = shape.size;
78041
79080
  var sizeX = size.x;
78042
79081
  var sizeY = size.y;
@@ -78062,11 +79101,11 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78062
79101
  // Buffer
78063
79102
  buffer.updateVertices();
78064
79103
  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);
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);
78067
79106
  }
78068
79107
  };
78069
- BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
79108
+ BuilderSemicircleLegacy.prototype.updateUv = function (buffer, shape) {
78070
79109
  var texture = toTexture(shape);
78071
79110
  var textureTransformId = toTextureTransformId(texture);
78072
79111
  var isNotInited = !(this.inited & BuilderFlag.UV);
@@ -78078,26 +79117,26 @@ var BuilderSemicircle = /** @class */ (function (_super) {
78078
79117
  this.textureTransformId = textureTransformId;
78079
79118
  buffer.updateUvs();
78080
79119
  var textureUvs = toTextureUvs(texture);
78081
- buildSemicircleUv(buffer.uvs, this.vertexOffset, textureUvs);
79120
+ buildSemicircleLegacyUv(buffer.uvs, this.vertexOffset, textureUvs);
78082
79121
  }
78083
79122
  };
78084
- return BuilderSemicircle;
79123
+ return BuilderSemicircleLegacy;
78085
79124
  }(BuilderBase));
78086
79125
 
78087
79126
  /*
78088
79127
  * Copyright (C) 2019 Toshiba Corporation
78089
79128
  * SPDX-License-Identifier: Apache-2.0
78090
79129
  */
78091
- var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
79130
+ var createSemicircleLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
78092
79131
  var tcount = toTextBufferCount(shape);
78093
79132
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
78094
79133
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
78095
- var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
78096
- var icount = SEMICIRCLE_INDEX_COUNT + ticount;
79134
+ var vcount = SEMICIRCLE_LEGACY_VERTEX_COUNT + tvcount;
79135
+ var icount = SEMICIRCLE_LEGACY_INDEX_COUNT + ticount;
78097
79136
  if (buffer.check(voffset, ioffset, vcount, icount)) {
78098
79137
  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)
79138
+ new BuilderSemicircleLegacy(buffer, voffset, ioffset),
79139
+ new BuilderText(buffer, voffset + SEMICIRCLE_LEGACY_VERTEX_COUNT, ioffset + SEMICIRCLE_LEGACY_INDEX_COUNT, tvcount, ticount)
78101
79140
  ]).init(shape);
78102
79141
  }
78103
79142
  return null;
@@ -78120,44 +79159,42 @@ var hitTestSemicircle = function (shape, x, y, ax, ay, sw, ss) {
78120
79159
  */
78121
79160
  /**
78122
79161
  * A semicircle shape.
78123
- *
78124
- * @beta
78125
79162
  */
78126
- var EShapeSemicircle = /** @class */ (function (_super) {
78127
- __extends(EShapeSemicircle, _super);
78128
- function EShapeSemicircle(type) {
78129
- 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; }
78130
79167
  var _this = _super.call(this, type) || this;
78131
79168
  _this.stroke.side = EShapeStrokeSide.ALL & ~EShapeStrokeSide.BOTTOM;
78132
79169
  return _this;
78133
79170
  }
78134
- EShapeSemicircle.prototype.clone = function () {
78135
- return new EShapeSemicircle(this.type).copy(this);
79171
+ EShapeSemicircleLegacy.prototype.clone = function () {
79172
+ return new EShapeSemicircleLegacy(this.type).copy(this);
78136
79173
  };
78137
- EShapeSemicircle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
79174
+ EShapeSemicircleLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
78138
79175
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
78139
79176
  return hitTestSemicircle(this, x, y, ax, ay, sw, ss);
78140
79177
  }
78141
79178
  return false;
78142
79179
  };
78143
- return EShapeSemicircle;
79180
+ return EShapeSemicircleLegacy;
78144
79181
  }(EShapePrimitive));
78145
79182
 
78146
79183
  /*
78147
79184
  * Copyright (C) 2019 Toshiba Corporation
78148
79185
  * SPDX-License-Identifier: Apache-2.0
78149
79186
  */
78150
- var deserializeSemicircle = function (item, manager, shape) {
78151
- return deserializeBase(item, manager, shape || new EShapeSemicircle());
79187
+ var deserializeSemicircleLegacy = function (item, manager, shape) {
79188
+ return deserializeBase(item, manager, shape || new EShapeSemicircleLegacy());
78152
79189
  };
78153
79190
 
78154
79191
  /*
78155
79192
  * Copyright (C) 2019 Toshiba Corporation
78156
79193
  * SPDX-License-Identifier: Apache-2.0
78157
79194
  */
78158
- var loadShapeSemicircle = function () {
78159
- EShapeUploadeds[EShapeType.SEMICIRCLE] = createSemicircleUploaded;
78160
- EShapeDeserializers[EShapeType.SEMICIRCLE] = deserializeSemicircle;
79195
+ var loadShapeSemicircleLegacy = function () {
79196
+ EShapeUploadeds[EShapeType.SEMICIRCLE_LEGACY] = createSemicircleLegacyUploaded;
79197
+ EShapeDeserializers[EShapeType.SEMICIRCLE_LEGACY] = deserializeSemicircleLegacy;
78161
79198
  };
78162
79199
 
78163
79200
  /*
@@ -78913,6 +79950,7 @@ var loadShapeAll = function () {
78913
79950
  loadShapeConnectorElbow();
78914
79951
  loadShapeConnectorLine();
78915
79952
  loadShapeEmbedded();
79953
+ loadShapeFan();
78916
79954
  loadShapeGroupShadowed();
78917
79955
  loadShapeGroup();
78918
79956
  loadShapeImage();
@@ -78926,6 +79964,7 @@ var loadShapeAll = function () {
78926
79964
  loadShapeRectangleRoundedLegacy();
78927
79965
  loadShapeRectangleRounded();
78928
79966
  loadShapeRectangle();
79967
+ loadShapeSemicircleLegacy();
78929
79968
  loadShapeSemicircle();
78930
79969
  loadShapeTriangleLegacy();
78931
79970
  loadShapeTriangleRoundedLegacy();
@@ -110065,7 +111104,7 @@ exports.BuilderRectangleLegacy = BuilderRectangleLegacy;
110065
111104
  exports.BuilderRectanglePivoted = BuilderRectanglePivoted;
110066
111105
  exports.BuilderRectangleRounded = BuilderRectangleRoundedLegacy;
110067
111106
  exports.BuilderRectangleRoundedLegacy = BuilderRectangleRoundedLegacy;
110068
- exports.BuilderSemicircle = BuilderSemicircle;
111107
+ exports.BuilderSemicircle = BuilderSemicircleLegacy;
110069
111108
  exports.BuilderText = BuilderText;
110070
111109
  exports.BuilderTriangle = BuilderTriangleLegacy;
110071
111110
  exports.BuilderTriangleLegacy = BuilderTriangleLegacy;
@@ -111341,6 +112380,8 @@ exports.EShapeEmbeddedDatum = EShapeEmbeddedDatum;
111341
112380
  exports.EShapeEmbeddedLayer = EShapeEmbeddedLayer;
111342
112381
  exports.EShapeEmbeddedLayerContainer = EShapeEmbeddedLayerContainer;
111343
112382
  exports.EShapeEmbeddeds = EShapeEmbeddeds;
112383
+ exports.EShapeFan = EShapeFan;
112384
+ exports.EShapeFanTriangulatedImpl = EShapeFanTriangulatedImpl;
111344
112385
  exports.EShapeFillDirection = EShapeFillDirection;
111345
112386
  exports.EShapeFillImpl = EShapeFillImpl;
111346
112387
  exports.EShapeGroup = EShapeGroup;
@@ -111408,6 +112449,7 @@ exports.EShapeRuntimeImpl = EShapeRuntimeImpl;
111408
112449
  exports.EShapeRuntimeReset = EShapeRuntimeReset;
111409
112450
  exports.EShapeRuntimes = EShapeRuntimes;
111410
112451
  exports.EShapeSemicircle = EShapeSemicircle;
112452
+ exports.EShapeSemicircleLegacy = EShapeSemicircleLegacy;
111411
112453
  exports.EShapeState = EShapeState;
111412
112454
  exports.EShapeStateSetImplObservable = EShapeStateSetImplObservable;
111413
112455
  exports.EShapeStrokeImpl = EShapeStrokeImpl;
@@ -111501,9 +112543,12 @@ exports.RECTANGLE_ROUNDED_VERTEX_COUNT = RECTANGLE_ROUNDED_LEGACY_VERTEX_COUNT;
111501
112543
  exports.RECTANGLE_ROUNDED_WORLD_SIZE = RECTANGLE_ROUNDED_LEGACY_WORLD_SIZE;
111502
112544
  exports.RECTANGLE_VERTEX_COUNT = RECTANGLE_LEGACY_VERTEX_COUNT;
111503
112545
  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;
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;
111507
112552
  exports.TEXT_FMIN = TEXT_FMIN;
111508
112553
  exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
111509
112554
  exports.TEXT_INDEX_COUNT_SHIFT = TEXT_INDEX_COUNT_SHIFT;
@@ -111613,10 +112658,14 @@ exports.buildRectangleRoundedVertex = buildRectangleRoundedLegacyVertex;
111613
112658
  exports.buildRectangleStep = buildRectangleLegacyStep;
111614
112659
  exports.buildRectangleUv = buildRectangleLegacyUv;
111615
112660
  exports.buildRectangleVertex = buildRectangleLegacyVertex;
111616
- exports.buildSemicircleIndex = buildSemicircleIndex;
111617
- exports.buildSemicircleStep = buildSemicircleStep;
111618
- exports.buildSemicircleUv = buildSemicircleUv;
111619
- 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;
111620
112669
  exports.buildTextIndex = buildTextIndex;
111621
112670
  exports.buildTextStep = buildTextStep;
111622
112671
  exports.buildTextVertex = buildTextVertex;
@@ -111665,7 +112714,8 @@ exports.createRectanglePivotedUploaded = createRectanglePivotedUploaded;
111665
112714
  exports.createRectangleRoundedLegacyUploaded = createRectangleRoundedLegacyUploaded;
111666
112715
  exports.createRectangleRoundedUploaded = createRectangleRoundedLegacyUploaded;
111667
112716
  exports.createRectangleUploaded = createRectangleLegacyUploaded;
111668
- exports.createSemicircleUploaded = createSemicircleUploaded;
112717
+ exports.createSemicircleLegacyUploaded = createSemicircleLegacyUploaded;
112718
+ exports.createSemicircleUploaded = createSemicircleLegacyUploaded;
111669
112719
  exports.createTriangleLegacyUploaded = createTriangleLegacyUploaded;
111670
112720
  exports.createTriangleRoundedLegacyUploaded = createTriangleRoundedLegacyUploaded;
111671
112721
  exports.createTriangleRoundedUploaded = createTriangleRoundedLegacyUploaded;
@@ -111687,6 +112737,7 @@ exports.deserializeConnectorLine = deserializeConnectorLine;
111687
112737
  exports.deserializeEmbedded = deserializeEmbedded;
111688
112738
  exports.deserializeEmbeddedAcceptorEdge = deserializeEmbeddedAcceptorEdge;
111689
112739
  exports.deserializeEmbeddedLayer = deserializeEmbeddedLayer;
112740
+ exports.deserializeFan = deserializeFan;
111690
112741
  exports.deserializeGradient = deserializeGradient;
111691
112742
  exports.deserializeGroup = deserializeGroup;
111692
112743
  exports.deserializeGroupShadowed = deserializeGroupShadowed;
@@ -111707,6 +112758,7 @@ exports.deserializeRectanglePivoted = deserializeRectanglePivoted;
111707
112758
  exports.deserializeRectangleRounded = deserializeRectangleRounded;
111708
112759
  exports.deserializeRectangleRoundedLegacy = deserializeRectangleRoundedLegacy;
111709
112760
  exports.deserializeSemicircle = deserializeSemicircle;
112761
+ exports.deserializeSemicircleLegacy = deserializeSemicircleLegacy;
111710
112762
  exports.deserializeTriangle = deserializeTriangle;
111711
112763
  exports.deserializeTriangleLegacy = deserializeTriangleLegacy;
111712
112764
  exports.deserializeTriangleRounded = deserializeTriangleRounded;
@@ -111716,6 +112768,7 @@ exports.eShapePointsFormatterCurveBezierQuadratic = eShapePointsFormatterCurveBe
111716
112768
  exports.hitTestBBox = hitTestBBox;
111717
112769
  exports.hitTestCircle = hitTestCircle;
111718
112770
  exports.hitTestCircleLegacy = hitTestCircleLegacy;
112771
+ exports.hitTestFan = hitTestFan;
111719
112772
  exports.hitTestRectangle = hitTestRectangle;
111720
112773
  exports.hitTestRectangleLegacy = hitTestRectangleLegacy;
111721
112774
  exports.hitTestRectangleRounded = hitTestRectangleRounded;
@@ -111750,6 +112803,7 @@ exports.loadShapeClipperEx = loadShapeClipperEx;
111750
112803
  exports.loadShapeConnectorElbow = loadShapeConnectorElbow;
111751
112804
  exports.loadShapeConnectorLine = loadShapeConnectorLine;
111752
112805
  exports.loadShapeEmbedded = loadShapeEmbedded;
112806
+ exports.loadShapeFan = loadShapeFan;
111753
112807
  exports.loadShapeGroup = loadShapeGroup;
111754
112808
  exports.loadShapeGroupShadowed = loadShapeGroupShadowed;
111755
112809
  exports.loadShapeImage = loadShapeImage;
@@ -111768,6 +112822,7 @@ exports.loadShapeRectanglePivoted = loadShapeRectanglePivoted;
111768
112822
  exports.loadShapeRectangleRounded = loadShapeRectangleRounded;
111769
112823
  exports.loadShapeRectangleRoundedLegacy = loadShapeRectangleRoundedLegacy;
111770
112824
  exports.loadShapeSemicircle = loadShapeSemicircle;
112825
+ exports.loadShapeSemicircleLegacy = loadShapeSemicircleLegacy;
111771
112826
  exports.loadShapeTriangle = loadShapeTriangle;
111772
112827
  exports.loadShapeTriangleLegacy = loadShapeTriangleLegacy;
111773
112828
  exports.loadShapeTriangleRounded = loadShapeTriangleRounded;
@@ -112021,6 +113076,8 @@ exports.toCloned = toCloned;
112021
113076
  exports.toComputed = toComputed;
112022
113077
  exports.toDash = toDash;
112023
113078
  exports.toEnum = toEnum;
113079
+ exports.toFanAngleCentric = toFanAngleCentric;
113080
+ exports.toFanAngleEccentric = toFanAngleEccentric;
112024
113081
  exports.toGradientImageUrl = toGradientImageUrl;
112025
113082
  exports.toGradientSerialized = toGradientSerialized;
112026
113083
  exports.toId = toId;