@armyc2.c5isr.renderer/mil-sym-ts-web 2.2.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 (170) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +57 -0
  3. package/buildNode.bat +2 -0
  4. package/buildWeb.bat +2 -0
  5. package/dist/C5Ren.d.ts +6970 -0
  6. package/dist/C5Ren.js +2 -0
  7. package/dist/C5Ren.js.map +1 -0
  8. package/dist/LICENSE +201 -0
  9. package/dist/README.md +57 -0
  10. package/dist/armyc2.c5isr.renderer-mil-sym-ts-web-2.2.0.tgz +0 -0
  11. package/dist/manifest.json +4 -0
  12. package/dist/package.json +16 -0
  13. package/index.ts +169 -0
  14. package/package.bak +50 -0
  15. package/package.json +40 -0
  16. package/package.node.json +43 -0
  17. package/package.pack.json +19 -0
  18. package/package.packWeb.json +16 -0
  19. package/package.web.json +40 -0
  20. package/src/main/ts/android/graphics/Bitmap.ts +7 -0
  21. package/src/main/ts/android/graphics/Paint.ts +26 -0
  22. package/src/main/ts/android/graphics/Path.ts +78 -0
  23. package/src/main/ts/android/graphics/PointF.ts +14 -0
  24. package/src/main/ts/android/graphics/Rect.ts +18 -0
  25. package/src/main/ts/android/graphics/RectF.ts +50 -0
  26. package/src/main/ts/android/graphics/Region.ts +36 -0
  27. package/src/main/ts/android/graphics/Typeface.ts +11 -0
  28. package/src/main/ts/armyc2/c5isr/JavaLineArray/BasicShapes.ts +99 -0
  29. package/src/main/ts/armyc2/c5isr/JavaLineArray/CChannelPoints2.ts +34 -0
  30. package/src/main/ts/armyc2/c5isr/JavaLineArray/CELineArray.ts +193 -0
  31. package/src/main/ts/armyc2/c5isr/JavaLineArray/Channels.ts +2971 -0
  32. package/src/main/ts/armyc2/c5isr/JavaLineArray/DISMSupport.ts +4008 -0
  33. package/src/main/ts/armyc2/c5isr/JavaLineArray/POINT2.ts +93 -0
  34. package/src/main/ts/armyc2/c5isr/JavaLineArray/Shape2.ts +89 -0
  35. package/src/main/ts/armyc2/c5isr/JavaLineArray/TacticalLines.ts +515 -0
  36. package/src/main/ts/armyc2/c5isr/JavaLineArray/arraysupport.ts +5403 -0
  37. package/src/main/ts/armyc2/c5isr/JavaLineArray/countsupport.ts +1084 -0
  38. package/src/main/ts/armyc2/c5isr/JavaLineArray/flot.ts +2173 -0
  39. package/src/main/ts/armyc2/c5isr/JavaLineArray/lineutility.ts +4934 -0
  40. package/src/main/ts/armyc2/c5isr/JavaLineArray/ref.ts +7 -0
  41. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/Modifier2.ts +5601 -0
  42. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/P1.ts +14 -0
  43. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/TGLight.ts +648 -0
  44. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsChannelUtility.ts +647 -0
  45. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsMETOC.ts +2994 -0
  46. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsUtility.ts +2663 -0
  47. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/mdlGeodesic.ts +669 -0
  48. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipPolygon2.ts +971 -0
  49. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipQuad.ts +871 -0
  50. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer.ts +3507 -0
  51. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer2.ts +500 -0
  52. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtility.ts +1089 -0
  53. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityCPOF.ts +2656 -0
  54. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityGE.ts +1419 -0
  55. package/src/main/ts/armyc2/c5isr/data/genc.json +1407 -0
  56. package/src/main/ts/armyc2/c5isr/data/msd.json +17311 -0
  57. package/src/main/ts/armyc2/c5isr/data/mse.json +18500 -0
  58. package/src/main/ts/armyc2/c5isr/data/svgd.json +31214 -0
  59. package/src/main/ts/armyc2/c5isr/data/svge.json +30558 -0
  60. package/src/main/ts/armyc2/c5isr/graphics2d/AffineTransform.ts +10 -0
  61. package/src/main/ts/armyc2/c5isr/graphics2d/Area.ts +437 -0
  62. package/src/main/ts/armyc2/c5isr/graphics2d/BasicStroke.ts +429 -0
  63. package/src/main/ts/armyc2/c5isr/graphics2d/BasicTypes.ts +7 -0
  64. package/src/main/ts/armyc2/c5isr/graphics2d/BufferedImage.ts +35 -0
  65. package/src/main/ts/armyc2/c5isr/graphics2d/Font.ts +111 -0
  66. package/src/main/ts/armyc2/c5isr/graphics2d/FontMetrics.ts +29 -0
  67. package/src/main/ts/armyc2/c5isr/graphics2d/FontRenderContext.ts +18 -0
  68. package/src/main/ts/armyc2/c5isr/graphics2d/GeneralPath.ts +211 -0
  69. package/src/main/ts/armyc2/c5isr/graphics2d/Graphics2D.ts +80 -0
  70. package/src/main/ts/armyc2/c5isr/graphics2d/IPathIterator.ts +33 -0
  71. package/src/main/ts/armyc2/c5isr/graphics2d/ImageIO.ts +16 -0
  72. package/src/main/ts/armyc2/c5isr/graphics2d/Line2D.ts +726 -0
  73. package/src/main/ts/armyc2/c5isr/graphics2d/PathIterator.ts +141 -0
  74. package/src/main/ts/armyc2/c5isr/graphics2d/Point.ts +112 -0
  75. package/src/main/ts/armyc2/c5isr/graphics2d/Point2D.ts +261 -0
  76. package/src/main/ts/armyc2/c5isr/graphics2d/Polygon.ts +391 -0
  77. package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle.ts +567 -0
  78. package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.ts +445 -0
  79. package/src/main/ts/armyc2/c5isr/graphics2d/Shape.ts +31 -0
  80. package/src/main/ts/armyc2/c5isr/graphics2d/Stroke.ts +18 -0
  81. package/src/main/ts/armyc2/c5isr/graphics2d/TextLayout.ts +45 -0
  82. package/src/main/ts/armyc2/c5isr/graphics2d/TexturePaint.ts +25 -0
  83. package/src/main/ts/armyc2/c5isr/renderer/IIconRenderer.ts +15 -0
  84. package/src/main/ts/armyc2/c5isr/renderer/IconRenderer.ts +22 -0
  85. package/src/main/ts/armyc2/c5isr/renderer/MilStdIconRenderer.ts +269 -0
  86. package/src/main/ts/armyc2/c5isr/renderer/ModifierRenderer.ts +9882 -0
  87. package/src/main/ts/armyc2/c5isr/renderer/PatternFillRenderer.ts +146 -0
  88. package/src/main/ts/armyc2/c5isr/renderer/SinglePointSVGRenderer.ts +1265 -0
  89. package/src/main/ts/armyc2/c5isr/renderer/shapes/arc.ts +64 -0
  90. package/src/main/ts/armyc2/c5isr/renderer/shapes/bcurve.ts +95 -0
  91. package/src/main/ts/armyc2/c5isr/renderer/shapes/ellipse.ts +93 -0
  92. package/src/main/ts/armyc2/c5isr/renderer/shapes/line.ts +114 -0
  93. package/src/main/ts/armyc2/c5isr/renderer/shapes/path.ts +555 -0
  94. package/src/main/ts/armyc2/c5isr/renderer/shapes/pathiterator.ts +62 -0
  95. package/src/main/ts/armyc2/c5isr/renderer/shapes/point.ts +120 -0
  96. package/src/main/ts/armyc2/c5isr/renderer/shapes/rectangle.ts +431 -0
  97. package/src/main/ts/armyc2/c5isr/renderer/shapes/roundedrectangle.ts +99 -0
  98. package/src/main/ts/armyc2/c5isr/renderer/shapes/types.ts +25 -0
  99. package/src/main/ts/armyc2/c5isr/renderer/shapes/utilities.ts +203 -0
  100. package/src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.ts +104 -0
  101. package/src/main/ts/armyc2/c5isr/renderer/utilities/Color.ts +481 -0
  102. package/src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.ts +40 -0
  103. package/src/main/ts/armyc2/c5isr/renderer/utilities/DrawRules.ts +1323 -0
  104. package/src/main/ts/armyc2/c5isr/renderer/utilities/EntityCode.ts +51 -0
  105. package/src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.ts +736 -0
  106. package/src/main/ts/armyc2/c5isr/renderer/utilities/GENCLookup.ts +106 -0
  107. package/src/main/ts/armyc2/c5isr/renderer/utilities/GeoPixelConversion3D.ts +84 -0
  108. package/src/main/ts/armyc2/c5isr/renderer/utilities/IMultiPointRenderer.ts +87 -0
  109. package/src/main/ts/armyc2/c5isr/renderer/utilities/IPointConversion.ts +34 -0
  110. package/src/main/ts/armyc2/c5isr/renderer/utilities/ImageInfo.ts +324 -0
  111. package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUCache.ts +127 -0
  112. package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUEntry.ts +18 -0
  113. package/src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.ts +111 -0
  114. package/src/main/ts/armyc2/c5isr/renderer/utilities/MODrawRules.ts +219 -0
  115. package/src/main/ts/armyc2/c5isr/renderer/utilities/MSInfo.ts +1008 -0
  116. package/src/main/ts/armyc2/c5isr/renderer/utilities/MSLookup.ts +882 -0
  117. package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.ts +380 -0
  118. package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdSymbol.ts +797 -0
  119. package/src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.ts +1699 -0
  120. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversion.ts +178 -0
  121. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversionDummy.ts +45 -0
  122. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConverter3D.ts +126 -0
  123. package/src/main/ts/armyc2/c5isr/renderer/utilities/RectUtilities.ts +118 -0
  124. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererException.ts +11 -0
  125. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererSettings.ts +1201 -0
  126. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererUtilities.ts +591 -0
  127. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGInfo.ts +29 -0
  128. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGLookup.ts +753 -0
  129. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGSymbolInfo.ts +137 -0
  130. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGTextInfo.ts +438 -0
  131. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEvent.ts +19 -0
  132. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEventListener.ts +10 -0
  133. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsEventListener.ts +5 -0
  134. package/src/main/ts/armyc2/c5isr/renderer/utilities/Shape2SVG.ts +404 -0
  135. package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeInfo.ts +525 -0
  136. package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeUtilities.ts +55 -0
  137. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolDimensionInfo.ts +36 -0
  138. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolID.ts +1055 -0
  139. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolUtilities.ts +2085 -0
  140. package/src/main/ts/armyc2/c5isr/renderer/utilities/TextInfo.ts +157 -0
  141. package/src/main/ts/armyc2/c5isr/web/render/GeoPixelConversion.ts +86 -0
  142. package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandler.ts +3798 -0
  143. package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandlerSVG.ts +412 -0
  144. package/src/main/ts/armyc2/c5isr/web/render/PointConverter.ts +124 -0
  145. package/src/main/ts/armyc2/c5isr/web/render/SymbolModifiers.ts +26 -0
  146. package/src/main/ts/armyc2/c5isr/web/render/WebRenderer.ts +677 -0
  147. package/src/main/ts/armyc2/c5isr/web/render/utilities/JavaRendererUtilities.ts +484 -0
  148. package/src/main/ts/armyc2/c5isr/web/render/utilities/LineInfo.ts +62 -0
  149. package/src/main/ts/armyc2/c5isr/web/render/utilities/SymbolInfo.ts +46 -0
  150. package/src/main/ts/armyc2/c5isr/web/render/utilities/TextInfo.ts +51 -0
  151. package/src/main/ts/org/gavaghan/geodesy/Angle.ts +31 -0
  152. package/src/main/ts/org/gavaghan/geodesy/Ellipsoid.ts +71 -0
  153. package/src/main/ts/org/gavaghan/geodesy/GeodeticCalculator.ts +200 -0
  154. package/src/main/ts/org/gavaghan/geodesy/GeodeticCurve.ts +55 -0
  155. package/src/main/ts/org/gavaghan/geodesy/GeodeticMeasurement.ts +68 -0
  156. package/src/main/ts/org/gavaghan/geodesy/GlobalCoordinates.ts +103 -0
  157. package/src/main/ts/org/gavaghan/geodesy/GlobalPosition.ts +90 -0
  158. package/test/ExportSPImages.js +692 -0
  159. package/test/MPWW.html +556 -0
  160. package/test/MPWorker.js +318 -0
  161. package/test/SPWorker.js +233 -0
  162. package/test/SVGWW.html +363 -0
  163. package/test/singlePointTester3.html +751 -0
  164. package/tsconfig.json +54 -0
  165. package/typedoc.json +30 -0
  166. package/updateVersion.js +21 -0
  167. package/webpack.config.js +34 -0
  168. package/webpackn.config.js +28 -0
  169. package/webpackr.config.js +47 -0
  170. package/webpackw.config.js +23 -0
@@ -0,0 +1,211 @@
1
+ /*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+
7
+ import { type double, type float, type int } from "../graphics2d/BasicTypes";
8
+
9
+ import { AffineTransform } from "../graphics2d/AffineTransform"
10
+ import { IPathIterator } from "../graphics2d/IPathIterator"
11
+ import { PathIterator } from "../graphics2d/PathIterator"
12
+ import { Point2D } from "../graphics2d/Point2D"
13
+ import { Rectangle } from "../graphics2d/Rectangle"
14
+ import { Rectangle2D } from "../graphics2d/Rectangle2D"
15
+ import { Shape } from "../graphics2d/Shape"
16
+
17
+ import { POINT2 } from "../JavaLineArray/POINT2"
18
+
19
+ import { Path } from "../../../android/graphics/Path"
20
+ import { RectF } from "../../../android/graphics/RectF"
21
+
22
+
23
+ /**
24
+ *
25
+ *
26
+ */
27
+ export class GeneralPath implements Shape {
28
+ private _path: Path;
29
+ private _pathIterator: PathIterator;
30
+ public constructor() {
31
+
32
+ this._path = new Path();
33
+ this._pathIterator = new PathIterator(null);
34
+ }
35
+ public lineTo(x: double, y: double): void {
36
+ this._path.lineTo(x as float, y as float);
37
+ this._pathIterator.lineTo(x, y);
38
+ }
39
+ public moveTo(x: double, y: double): void {
40
+ this._path.moveTo(x as float, y as float);
41
+ this._pathIterator.moveTo(x, y);
42
+ }
43
+ public quadTo(x1: double, y1: double, x2: double, y2: double): void {
44
+ this._path.quadTo(x1 as float, y1 as float, x2 as float, y2 as float);
45
+ this._pathIterator.quadTo(x1, y1, x2, y2);
46
+ }
47
+ public cubicTo(x1: double, y1: double, x2: double, y2: double, x3: double, y3: double): void {
48
+ this._path.cubicTo(x1 as float, y1 as float, x2 as float, y2 as float, x3 as float, y3 as float);
49
+ this._pathIterator.cubicTo(x1, y1, x2, y2, x3, y3);
50
+ }
51
+ public curveTo(x1: double, y1: double, x2: double, y2: double, x3: double, y3: double): void {
52
+ this._path.cubicTo(x1 as float, y1 as float, x2 as float, y2 as float, x3 as float, y3 as float);
53
+ this._pathIterator.cubicTo(x1, y1, x2, y2, x3, y3);
54
+ }
55
+ public computeBounds(rect: Rectangle2D): void {
56
+ var rectf = new RectF();
57
+ this._path.computeBounds(rectf, true);
58
+ rect.x = rectf.left;
59
+ rect.y = rectf.top;
60
+ rect.width = rectf.bottom - rectf.top;
61
+ rect.setRect(rectf.left, rectf.top, rectf.width(), rectf.height());
62
+ }
63
+ public closePath(): void {
64
+ if (this._path != null) {
65
+
66
+ this._path.close();
67
+ }
68
+
69
+ }
70
+ public contains(pt: Point2D): boolean;
71
+
72
+ public contains(r: Rectangle2D): boolean;
73
+ public contains(x: int, y: int): boolean;
74
+ public contains(x: int, y: int, width: int, height: int): boolean;
75
+ public contains(...args: unknown[]): boolean {
76
+ switch (args.length) {
77
+ case 1: {
78
+ if (args[0] instanceof Point2D) {
79
+ return false;
80
+ } else {
81
+ const [r] = args as [Rectangle2D];
82
+ let rect: Rectangle = new Rectangle(r.x as int, r.y as int, r.width as int, r.height as int);
83
+ let rect2: Rectangle = this.getBounds();
84
+ return rect2.contains(rect.x, rect.y, rect.width, rect.height);
85
+ }
86
+ }
87
+
88
+ case 2: {
89
+ const [x, y] = args as [int, int];
90
+
91
+
92
+ return false;
93
+
94
+
95
+ break;
96
+ }
97
+
98
+ case 4: {
99
+ const [x, y, width, height] = args as [int, int, int, int];
100
+
101
+
102
+ let rect2: Rectangle = this.getBounds();
103
+ return rect2.contains(x, y, width, height);
104
+
105
+
106
+ break;
107
+ }
108
+
109
+ default: {
110
+ throw Error(`Invalid number of arguments`);
111
+ }
112
+ }
113
+ }
114
+
115
+ public getBounds2D(): Rectangle2D {
116
+ return this._pathIterator.getBounds();
117
+ }
118
+ public getBounds(): Rectangle {
119
+ let rect: Rectangle2D = this._pathIterator.getBounds();
120
+ return new Rectangle(rect.x as int, rect.y as int, rect.width as int, rect.height as int);
121
+ }
122
+ /**
123
+ * called only when the GeneralPath is a rectangle
124
+ * @param rect
125
+ * @return
126
+ */
127
+ public intersects(rect: Rectangle2D): boolean;
128
+ /**
129
+ * Only tests against the bounds, used only when the GeneralPath is a rectangle
130
+ * @param x
131
+ * @param y
132
+ * @param w
133
+ * @param h
134
+ * @return
135
+ */
136
+ public intersects(x: double, y: double, w: double, h: double): boolean;
137
+ public intersects(...args: unknown[]): boolean {
138
+ switch (args.length) {
139
+ case 1: {
140
+ const [rect] = args as [Rectangle2D];
141
+
142
+
143
+ return this.getBounds().intersects(rect.x, rect.y, rect.width, rect.height);
144
+
145
+
146
+ break;
147
+ }
148
+
149
+ case 4: {
150
+ const [x, y, w, h] = args as [double, double, double, double];
151
+
152
+
153
+ return this.getBounds().intersects(x, y, w, h);
154
+
155
+
156
+ break;
157
+ }
158
+
159
+ default: {
160
+ throw Error(`Invalid number of arguments`);
161
+ }
162
+ }
163
+ }
164
+
165
+ public append(shape: Shape, connect: boolean): void {
166
+ let gp: GeneralPath = shape as GeneralPath;
167
+ let pts: Array<POINT2> = gp._pathIterator.getPoints();
168
+ let j: int = 0;
169
+ let pt: POINT2;
170
+ let pt1: POINT2;
171
+ let pt2: POINT2;
172
+ let n: int = pts.length;
173
+ //for(j=0;j<pts.length;j++)
174
+ for (j = 0; j < n; j++) {
175
+ pt = pts[j];
176
+ switch (pt.style) {
177
+ case IPathIterator.SEG_MOVETO: {
178
+ this._path.moveTo(pt.x as float, pt.y as float);
179
+ this._pathIterator.moveTo(pt.x, pt.y);
180
+ break;
181
+ }
182
+
183
+ case IPathIterator.SEG_LINETO: {
184
+ this._path.lineTo(pt.x as float, pt.y as float);
185
+ this._pathIterator.lineTo(pt.x, pt.y);
186
+ break;
187
+ }
188
+
189
+ case IPathIterator.SEG_CUBICTO: {
190
+ pt1 = pts[j + 1]; j++;
191
+ pt2 = pts[j + 2]; j++;
192
+ this._path.cubicTo(pt.x as float, pt.y as float, pt1.x as float, pt1.y as float, pt2.x as float, pt2.y as float);
193
+ this._pathIterator.cubicTo(pt.x as float, pt.y as float, pt1.x as float, pt1.y as float, pt2.x as float, pt2.y as float);
194
+ break;
195
+ }
196
+
197
+ default: {
198
+ break;
199
+ }
200
+
201
+ }
202
+ }
203
+ }
204
+ public getPath(): Path {
205
+ return this._path;
206
+ }
207
+ public getPathIterator(tx: AffineTransform | null): PathIterator {
208
+ this._pathIterator.reset();
209
+ return this._pathIterator;
210
+ }
211
+ }
@@ -0,0 +1,80 @@
1
+ /*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+
7
+ import { type double } from "../graphics2d/BasicTypes";
8
+
9
+ import { AffineTransform } from "../graphics2d/AffineTransform"
10
+
11
+ import { BasicStroke } from "../graphics2d/BasicStroke"
12
+
13
+ import { Font } from "../graphics2d/Font"
14
+ import { FontMetrics } from "../graphics2d/FontMetrics"
15
+ import { FontRenderContext } from "../graphics2d/FontRenderContext"
16
+
17
+ import { Color } from "../renderer/utilities/Color"
18
+
19
+
20
+
21
+ /**
22
+ *
23
+ *
24
+ */
25
+ export class Graphics2D {
26
+ private _font: Font;
27
+ private _fontMetrics: FontMetrics;
28
+ private _fontRenderContext: FontRenderContext;
29
+ public constructor() {
30
+
31
+ this._font = new Font("arial", 10, 10);
32
+ this._fontMetrics = new FontMetrics(this._font);
33
+ }
34
+ public setFont(value: Font): void {
35
+ this._font = value;
36
+ this._fontMetrics = new FontMetrics(this._font);
37
+ }
38
+ public getFont(): Font {
39
+ return this._font;
40
+ }
41
+ public setFontMetrics(value: FontMetrics): void {
42
+ this._fontMetrics = value;
43
+ }
44
+ public getFontMetrics(): FontMetrics {
45
+ return this._fontMetrics;
46
+ }
47
+ public setColor(color: Color): void {
48
+ //return;
49
+ }
50
+ public setBackground(color: Color): void {
51
+ //return;
52
+ }
53
+ public setTransform(id: AffineTransform): void {
54
+ //return;
55
+ }
56
+ public getTransform(): null {
57
+ return null;
58
+ }
59
+ public setStroke(stroke: BasicStroke): void {
60
+ //return;
61
+ }
62
+ public drawLine(x1: double, y1: double, x2: double, y2: double): void {
63
+ //return;
64
+ }
65
+ public dispose(): void {
66
+ //return;
67
+ }
68
+ public rotate(theta: double, x: double, y: double): void {
69
+ //return;
70
+ }
71
+ public clearRect(x: double, y: double, width: double, height: double): void {
72
+ //return;
73
+ }
74
+ public drawString(s: string, x: double, y: double): void {
75
+ //return;
76
+ }
77
+ public getFontRenderContext(): FontRenderContext {
78
+ return this._fontRenderContext;
79
+ }
80
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+ import { type int } from "../graphics2d/BasicTypes";
7
+
8
+
9
+ /**
10
+ *
11
+ *
12
+ */
13
+ interface IPathIterator {
14
+ //methods
15
+ currentSegment(coords: number[]): int;
16
+ currentSegment(coords: number[]): int;
17
+ getWindingRule(): int;
18
+ isDone(): boolean;
19
+ next(): void;
20
+ }
21
+
22
+ // eslint-disable-next-line @typescript-eslint/no-namespace, no-redeclare
23
+ export namespace IPathIterator {
24
+ export const SEG_CLOSE: int = 4;
25
+ export const SEG_CUBICTO: int = 3;
26
+ export const SEG_LINETO: int = 1;
27
+ export const SEG_MOVETO: int = 0;
28
+ export const SEG_QUADTO: int = 2;
29
+ export const WIND_EVEN_ODD: int = 0;
30
+ export const WIND_NON_ZERO: int = 1;
31
+ }
32
+
33
+
@@ -0,0 +1,16 @@
1
+ /*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+
7
+
8
+ /**
9
+ *
10
+ *
11
+ */
12
+ export class ImageIO {
13
+ public static read(stream: any): null {
14
+ return null;
15
+ }
16
+ }