@armyc2.c5isr.renderer/mil-sym-ts-web 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/{dist/armyc2.c5isr.renderer-mil-sym-ts-web-2.2.0.tgz → armyc2.c5isr.renderer-mil-sym-ts-web-2.2.1.tgz} +0 -0
  2. package/package.json +15 -39
  3. package/buildNode.bat +0 -2
  4. package/buildWeb.bat +0 -2
  5. package/dist/LICENSE +0 -201
  6. package/dist/README.md +0 -57
  7. package/dist/package.json +0 -16
  8. package/index.ts +0 -169
  9. package/package.bak +0 -50
  10. package/package.node.json +0 -43
  11. package/package.pack.json +0 -19
  12. package/package.packWeb.json +0 -16
  13. package/package.web.json +0 -40
  14. package/src/main/ts/android/graphics/Bitmap.ts +0 -7
  15. package/src/main/ts/android/graphics/Paint.ts +0 -26
  16. package/src/main/ts/android/graphics/Path.ts +0 -78
  17. package/src/main/ts/android/graphics/PointF.ts +0 -14
  18. package/src/main/ts/android/graphics/Rect.ts +0 -18
  19. package/src/main/ts/android/graphics/RectF.ts +0 -50
  20. package/src/main/ts/android/graphics/Region.ts +0 -36
  21. package/src/main/ts/android/graphics/Typeface.ts +0 -11
  22. package/src/main/ts/armyc2/c5isr/JavaLineArray/BasicShapes.ts +0 -99
  23. package/src/main/ts/armyc2/c5isr/JavaLineArray/CChannelPoints2.ts +0 -34
  24. package/src/main/ts/armyc2/c5isr/JavaLineArray/CELineArray.ts +0 -193
  25. package/src/main/ts/armyc2/c5isr/JavaLineArray/Channels.ts +0 -2971
  26. package/src/main/ts/armyc2/c5isr/JavaLineArray/DISMSupport.ts +0 -4008
  27. package/src/main/ts/armyc2/c5isr/JavaLineArray/POINT2.ts +0 -93
  28. package/src/main/ts/armyc2/c5isr/JavaLineArray/Shape2.ts +0 -89
  29. package/src/main/ts/armyc2/c5isr/JavaLineArray/TacticalLines.ts +0 -515
  30. package/src/main/ts/armyc2/c5isr/JavaLineArray/arraysupport.ts +0 -5403
  31. package/src/main/ts/armyc2/c5isr/JavaLineArray/countsupport.ts +0 -1084
  32. package/src/main/ts/armyc2/c5isr/JavaLineArray/flot.ts +0 -2173
  33. package/src/main/ts/armyc2/c5isr/JavaLineArray/lineutility.ts +0 -4934
  34. package/src/main/ts/armyc2/c5isr/JavaLineArray/ref.ts +0 -7
  35. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/Modifier2.ts +0 -5601
  36. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/P1.ts +0 -14
  37. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/TGLight.ts +0 -648
  38. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsChannelUtility.ts +0 -647
  39. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsMETOC.ts +0 -2994
  40. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsUtility.ts +0 -2663
  41. package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/mdlGeodesic.ts +0 -669
  42. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipPolygon2.ts +0 -971
  43. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipQuad.ts +0 -871
  44. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer.ts +0 -3507
  45. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer2.ts +0 -500
  46. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtility.ts +0 -1089
  47. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityCPOF.ts +0 -2656
  48. package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityGE.ts +0 -1419
  49. package/src/main/ts/armyc2/c5isr/data/genc.json +0 -1407
  50. package/src/main/ts/armyc2/c5isr/data/msd.json +0 -17311
  51. package/src/main/ts/armyc2/c5isr/data/mse.json +0 -18500
  52. package/src/main/ts/armyc2/c5isr/data/svgd.json +0 -31214
  53. package/src/main/ts/armyc2/c5isr/data/svge.json +0 -30558
  54. package/src/main/ts/armyc2/c5isr/graphics2d/AffineTransform.ts +0 -10
  55. package/src/main/ts/armyc2/c5isr/graphics2d/Area.ts +0 -437
  56. package/src/main/ts/armyc2/c5isr/graphics2d/BasicStroke.ts +0 -429
  57. package/src/main/ts/armyc2/c5isr/graphics2d/BasicTypes.ts +0 -7
  58. package/src/main/ts/armyc2/c5isr/graphics2d/BufferedImage.ts +0 -35
  59. package/src/main/ts/armyc2/c5isr/graphics2d/Font.ts +0 -111
  60. package/src/main/ts/armyc2/c5isr/graphics2d/FontMetrics.ts +0 -29
  61. package/src/main/ts/armyc2/c5isr/graphics2d/FontRenderContext.ts +0 -18
  62. package/src/main/ts/armyc2/c5isr/graphics2d/GeneralPath.ts +0 -211
  63. package/src/main/ts/armyc2/c5isr/graphics2d/Graphics2D.ts +0 -80
  64. package/src/main/ts/armyc2/c5isr/graphics2d/IPathIterator.ts +0 -33
  65. package/src/main/ts/armyc2/c5isr/graphics2d/ImageIO.ts +0 -16
  66. package/src/main/ts/armyc2/c5isr/graphics2d/Line2D.ts +0 -726
  67. package/src/main/ts/armyc2/c5isr/graphics2d/PathIterator.ts +0 -141
  68. package/src/main/ts/armyc2/c5isr/graphics2d/Point.ts +0 -112
  69. package/src/main/ts/armyc2/c5isr/graphics2d/Point2D.ts +0 -261
  70. package/src/main/ts/armyc2/c5isr/graphics2d/Polygon.ts +0 -391
  71. package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle.ts +0 -567
  72. package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.ts +0 -445
  73. package/src/main/ts/armyc2/c5isr/graphics2d/Shape.ts +0 -31
  74. package/src/main/ts/armyc2/c5isr/graphics2d/Stroke.ts +0 -18
  75. package/src/main/ts/armyc2/c5isr/graphics2d/TextLayout.ts +0 -45
  76. package/src/main/ts/armyc2/c5isr/graphics2d/TexturePaint.ts +0 -25
  77. package/src/main/ts/armyc2/c5isr/renderer/IIconRenderer.ts +0 -15
  78. package/src/main/ts/armyc2/c5isr/renderer/IconRenderer.ts +0 -22
  79. package/src/main/ts/armyc2/c5isr/renderer/MilStdIconRenderer.ts +0 -269
  80. package/src/main/ts/armyc2/c5isr/renderer/ModifierRenderer.ts +0 -9882
  81. package/src/main/ts/armyc2/c5isr/renderer/PatternFillRenderer.ts +0 -146
  82. package/src/main/ts/armyc2/c5isr/renderer/SinglePointSVGRenderer.ts +0 -1265
  83. package/src/main/ts/armyc2/c5isr/renderer/shapes/arc.ts +0 -64
  84. package/src/main/ts/armyc2/c5isr/renderer/shapes/bcurve.ts +0 -95
  85. package/src/main/ts/armyc2/c5isr/renderer/shapes/ellipse.ts +0 -93
  86. package/src/main/ts/armyc2/c5isr/renderer/shapes/line.ts +0 -114
  87. package/src/main/ts/armyc2/c5isr/renderer/shapes/path.ts +0 -555
  88. package/src/main/ts/armyc2/c5isr/renderer/shapes/pathiterator.ts +0 -62
  89. package/src/main/ts/armyc2/c5isr/renderer/shapes/point.ts +0 -120
  90. package/src/main/ts/armyc2/c5isr/renderer/shapes/rectangle.ts +0 -431
  91. package/src/main/ts/armyc2/c5isr/renderer/shapes/roundedrectangle.ts +0 -99
  92. package/src/main/ts/armyc2/c5isr/renderer/shapes/types.ts +0 -25
  93. package/src/main/ts/armyc2/c5isr/renderer/shapes/utilities.ts +0 -203
  94. package/src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.ts +0 -104
  95. package/src/main/ts/armyc2/c5isr/renderer/utilities/Color.ts +0 -481
  96. package/src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.ts +0 -40
  97. package/src/main/ts/armyc2/c5isr/renderer/utilities/DrawRules.ts +0 -1323
  98. package/src/main/ts/armyc2/c5isr/renderer/utilities/EntityCode.ts +0 -51
  99. package/src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.ts +0 -736
  100. package/src/main/ts/armyc2/c5isr/renderer/utilities/GENCLookup.ts +0 -106
  101. package/src/main/ts/armyc2/c5isr/renderer/utilities/GeoPixelConversion3D.ts +0 -84
  102. package/src/main/ts/armyc2/c5isr/renderer/utilities/IMultiPointRenderer.ts +0 -87
  103. package/src/main/ts/armyc2/c5isr/renderer/utilities/IPointConversion.ts +0 -34
  104. package/src/main/ts/armyc2/c5isr/renderer/utilities/ImageInfo.ts +0 -324
  105. package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUCache.ts +0 -127
  106. package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUEntry.ts +0 -18
  107. package/src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.ts +0 -111
  108. package/src/main/ts/armyc2/c5isr/renderer/utilities/MODrawRules.ts +0 -219
  109. package/src/main/ts/armyc2/c5isr/renderer/utilities/MSInfo.ts +0 -1008
  110. package/src/main/ts/armyc2/c5isr/renderer/utilities/MSLookup.ts +0 -882
  111. package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.ts +0 -380
  112. package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdSymbol.ts +0 -797
  113. package/src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.ts +0 -1699
  114. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversion.ts +0 -178
  115. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversionDummy.ts +0 -45
  116. package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConverter3D.ts +0 -126
  117. package/src/main/ts/armyc2/c5isr/renderer/utilities/RectUtilities.ts +0 -118
  118. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererException.ts +0 -11
  119. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererSettings.ts +0 -1201
  120. package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererUtilities.ts +0 -591
  121. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGInfo.ts +0 -29
  122. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGLookup.ts +0 -753
  123. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGSymbolInfo.ts +0 -137
  124. package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGTextInfo.ts +0 -438
  125. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEvent.ts +0 -19
  126. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEventListener.ts +0 -10
  127. package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsEventListener.ts +0 -5
  128. package/src/main/ts/armyc2/c5isr/renderer/utilities/Shape2SVG.ts +0 -404
  129. package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeInfo.ts +0 -525
  130. package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeUtilities.ts +0 -55
  131. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolDimensionInfo.ts +0 -36
  132. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolID.ts +0 -1055
  133. package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolUtilities.ts +0 -2085
  134. package/src/main/ts/armyc2/c5isr/renderer/utilities/TextInfo.ts +0 -157
  135. package/src/main/ts/armyc2/c5isr/web/render/GeoPixelConversion.ts +0 -86
  136. package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandler.ts +0 -3798
  137. package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandlerSVG.ts +0 -412
  138. package/src/main/ts/armyc2/c5isr/web/render/PointConverter.ts +0 -124
  139. package/src/main/ts/armyc2/c5isr/web/render/SymbolModifiers.ts +0 -26
  140. package/src/main/ts/armyc2/c5isr/web/render/WebRenderer.ts +0 -677
  141. package/src/main/ts/armyc2/c5isr/web/render/utilities/JavaRendererUtilities.ts +0 -484
  142. package/src/main/ts/armyc2/c5isr/web/render/utilities/LineInfo.ts +0 -62
  143. package/src/main/ts/armyc2/c5isr/web/render/utilities/SymbolInfo.ts +0 -46
  144. package/src/main/ts/armyc2/c5isr/web/render/utilities/TextInfo.ts +0 -51
  145. package/src/main/ts/org/gavaghan/geodesy/Angle.ts +0 -31
  146. package/src/main/ts/org/gavaghan/geodesy/Ellipsoid.ts +0 -71
  147. package/src/main/ts/org/gavaghan/geodesy/GeodeticCalculator.ts +0 -200
  148. package/src/main/ts/org/gavaghan/geodesy/GeodeticCurve.ts +0 -55
  149. package/src/main/ts/org/gavaghan/geodesy/GeodeticMeasurement.ts +0 -68
  150. package/src/main/ts/org/gavaghan/geodesy/GlobalCoordinates.ts +0 -103
  151. package/src/main/ts/org/gavaghan/geodesy/GlobalPosition.ts +0 -90
  152. package/test/ExportSPImages.js +0 -692
  153. package/test/MPWW.html +0 -556
  154. package/test/MPWorker.js +0 -318
  155. package/test/SPWorker.js +0 -233
  156. package/test/SVGWW.html +0 -363
  157. package/test/singlePointTester3.html +0 -751
  158. package/tsconfig.json +0 -54
  159. package/typedoc.json +0 -30
  160. package/updateVersion.js +0 -21
  161. package/webpack.config.js +0 -34
  162. package/webpackn.config.js +0 -28
  163. package/webpackr.config.js +0 -47
  164. package/webpackw.config.js +0 -23
  165. /package/{dist/C5Ren.d.ts → C5Ren.d.ts} +0 -0
  166. /package/{dist/C5Ren.js → C5Ren.js} +0 -0
  167. /package/{dist/C5Ren.js.map → C5Ren.js.map} +0 -0
  168. /package/{dist/manifest.json → manifest.json} +0 -0
@@ -1,525 +0,0 @@
1
- import { type int, type double } from "../../graphics2d/BasicTypes";
2
-
3
- import { AffineTransform } from "../../graphics2d/AffineTransform"
4
- import { BasicStroke } from "../../graphics2d/BasicStroke"
5
- import { GeneralPath } from "../../graphics2d/GeneralPath"
6
- import { Point } from "../../graphics2d/Point"
7
- import { Point2D } from "../../graphics2d/Point2D"
8
- import { Rectangle } from "../../graphics2d/Rectangle"
9
- import { Shape } from "../../graphics2d/Shape"
10
- import { TextLayout } from "../../graphics2d/TextLayout"
11
- import { TexturePaint } from "../../graphics2d/TexturePaint"
12
- import { Color } from "../../renderer/utilities/Color"
13
- import { MilStdSymbol } from "../../renderer/utilities/MilStdSymbol"
14
- import { SVGSymbolInfo } from "./SVGSymbolInfo";
15
-
16
-
17
-
18
- /**
19
- * Holds information on how to draw the pieces of a multipoint symbol.
20
- * Can be retrieved from {@link MilStdSymbol#getSymbolShapes()} and
21
- * {@link MilStdSymbol#getModifierShapes()} after {@link armyc2.c5isr.web.render.WebRenderer#RenderMultiPointAsMilStdSymbol(String, String, String, String, String, String, double, String, Map, Map)} is called.
22
- */
23
- export class ShapeInfo {
24
-
25
-
26
- public static SHAPE_TYPE_POLYLINE: int = 0;
27
- //public static int SHAPE_TYPE_POLYGON=1;
28
- public static SHAPE_TYPE_FILL: int = 1;
29
- public static SHAPE_TYPE_MODIFIER: int = 2;
30
- public static SHAPE_TYPE_MODIFIER_FILL: int = 3;
31
- public static SHAPE_TYPE_UNIT_FRAME: int = 4;
32
- public static SHAPE_TYPE_UNIT_FILL: int = 5;
33
- public static SHAPE_TYPE_UNIT_SYMBOL1: int = 6;
34
- public static SHAPE_TYPE_UNIT_SYMBOL2: int = 7;
35
- public static SHAPE_TYPE_UNIT_DISPLAY_MODIFIER: int = 8;
36
- public static SHAPE_TYPE_UNIT_ECHELON: int = 9;
37
- public static SHAPE_TYPE_UNIT_AFFILIATION_MODIFIER: int = 10;
38
- public static SHAPE_TYPE_UNIT_HQ_STAFF: int = 11;
39
- public static SHAPE_TYPE_TG_SP_FILL: int = 12;
40
- public static SHAPE_TYPE_TG_SP_FRAME: int = 13;
41
- public static SHAPE_TYPE_TG_Q_MODIFIER: int = 14;
42
- public static SHAPE_TYPE_TG_SP_OUTLINE: int = 15;
43
- public static SHAPE_TYPE_SINGLE_POINT_OUTLINE: int = 16;
44
- public static SHAPE_TYPE_UNIT_OUTLINE: int = 17;
45
- public static SHAPE_TYPE_UNIT_OPERATIONAL_CONDITION: int = 18;
46
-
47
- public static justify_left: int = 0;
48
- public static justify_center: int = 1;
49
- public static justify_right: int = 2;
50
-
51
-
52
- protected _Shape: Shape = null;
53
- private stroke: BasicStroke = null;
54
- private gp: GeneralPath = null;
55
- private fillStyle: int = 0;
56
- /**
57
- * @deprecated
58
- */
59
- private texturePaint: TexturePaint | null = null;
60
- private _ShapeType: int = -1;
61
- private lineColor: Color | null = null;
62
- private fillColor: Color | null = null;
63
- private textBackgoundColor: Color = null;
64
- // private affineTransform: AffineTransform;
65
-
66
- //private _GlyphVector: GlyphVector;
67
- private _TextLayout: TextLayout = null;
68
- private _Position: Point2D = null;
69
- private _ModifierString: string = null;
70
- private _ModifierPosition: Point2D = null;
71
-
72
- private _ModifierImageInfo: SVGSymbolInfo = null;
73
- private _ModifierAngle: double = 0;
74
- private _Tag: any = null;
75
- /**
76
- * @deprecated
77
- */
78
- private _shader: ImageBitmap = null;
79
- private _patternFillInfo: SVGSymbolInfo = null;
80
- private _justify: int = ShapeInfo.justify_left;
81
- //for google earth
82
- private _Polylines: Array<Array<Point2D>> = null;
83
-
84
- //enum DrawMethod{Draw,Fill;}
85
-
86
- //private Polygon poly=new Polygon();
87
- constructor();
88
-
89
- constructor(shape: Shape);
90
-
91
- //constructor(glyphVector: GlyphVector, position: Point2D);
92
-
93
- constructor(textLayout: TextLayout, position: Point2D);
94
-
95
- /**
96
- *
97
- * @param shape
98
- * @param shapeType
99
- * ShapeInfo.SHAPE_TYPE_
100
- */
101
- constructor(shape: Shape, shapeType: int);
102
- constructor(...args: unknown[]) {
103
- switch (args.length) {
104
- case 0: {
105
- break;
106
- }
107
-
108
- case 1: {
109
- const [shape] = args as [Shape];
110
- this._Shape = shape;
111
- break;
112
- }
113
-
114
- // case 2: {
115
- // const [glyphVector, position] = args as [GlyphVector, Point2D];
116
- // this._GlyphVector = glyphVector;
117
- // this._Position = position;
118
- // break;
119
- // }
120
-
121
- case 2: {
122
- if (args[0] instanceof TextLayout) {
123
- const [textLayout, position] = args as [TextLayout, Point2D];
124
- this._TextLayout = textLayout;
125
- this._Position = position;
126
- } else {
127
- const [shape, shapeType] = args as [Shape, int];
128
- this._Shape = shape;
129
- this._ShapeType = shapeType;
130
- }
131
- break;
132
- }
133
-
134
- default: {
135
- throw Error(`Invalid number of arguments`);
136
- }
137
- }
138
- }
139
-
140
-
141
- public getShape(): Shape {
142
- return this._Shape;
143
- }
144
-
145
- public setShape(value: Shape): void {
146
- this._Shape = value;
147
- // this._GlyphVector = null;
148
- this._TextLayout = null;
149
- }
150
-
151
- // public getGlyphVector(): GlyphVector {
152
- // return this._GlyphVector;
153
- // }
154
-
155
- //public setGlyphVector(value: GlyphVector, position: Point2D): void {
156
- // this._GlyphVector = value;
157
- // this._Position = position;
158
- // this._Shape = null;
159
- // this._TextLayout = null;
160
- // }
161
-
162
- public getTextLayout(): TextLayout {
163
- return this._TextLayout;
164
- }
165
-
166
- public setTextLayout(value: TextLayout): void {
167
- this._TextLayout = value;
168
- // this._GlyphVector = null;
169
- this._Shape = null;
170
- }
171
-
172
- //set this when returning text string.
173
- public setModifierString(value: string): void {
174
- this._ModifierString = value;
175
- }
176
-
177
- public getModifierString(): string {
178
- return this._ModifierString;
179
- }
180
-
181
- //location to draw ModifierString.
182
- public setModifierPosition(value: Point2D): void {
183
- this._ModifierPosition = value;
184
- }
185
-
186
- public getModifierPosition(): Point2D {
187
- return this._ModifierPosition;
188
- }
189
-
190
- //angle to draw ModifierString.
191
- public setModifierAngle(value: double): void {
192
- this._ModifierAngle = value;
193
- }
194
-
195
- public getModifierAngle(): double {
196
- return this._ModifierAngle;
197
- }
198
-
199
- /**
200
- *
201
- * @deprecated use {@link setModifierPosition()}
202
- */
203
- public setModifierStringPosition(value: Point2D): void {
204
- this.setModifierPosition(value);
205
- }
206
-
207
- /**
208
- *
209
- * @deprecated use {@link getModifierPosition()}
210
- */
211
- public getModifierStringPosition(): Point2D {
212
- return this.getModifierPosition();
213
- }
214
-
215
- /**
216
- *
217
- * @deprecated use {@link setModifierAngle()}
218
- */
219
- public setModifierStringAngle(value: double): void {
220
- this.setModifierAngle(value);
221
- }
222
-
223
- /**
224
- *
225
- * @deprecated use {@link getModifierAngle()}
226
- */
227
- public getModifierStringAngle(): double {
228
- return this.getModifierAngle();
229
- }
230
-
231
- public setModifierImage(value: SVGSymbolInfo): void {
232
- this._ModifierImageInfo = value;
233
- }
234
-
235
- public getModifierImage(): string {
236
- if (this._ModifierImageInfo)
237
- return this._ModifierImageInfo.getSVGDataURI();
238
- else
239
- return null;
240
- }
241
-
242
- public getModifierImageInfo(): SVGSymbolInfo {
243
- return this._ModifierImageInfo;
244
- }
245
-
246
- /**
247
- * Object that can be used to store anything.
248
- * Will not be looked at when rendering.
249
- * Null by default
250
- * @param value
251
- */
252
- public setTag(value: any): void {
253
- this._Tag = value;
254
- }
255
-
256
- /**
257
- * Object that can be used to store anything.
258
- * Will not be looked at when rendering.
259
- * Null by default
260
- * @return
261
- */
262
- public getTag(): any {
263
- return this._Tag;
264
- }
265
-
266
-
267
- /*
268
- * OLD
269
- * @return
270
- *//*
271
- public Rectangle getBounds()
272
- {
273
- Rectangle temp = null;
274
-
275
- if(_Shape != null)
276
- return _Shape.getBounds();
277
- else if(_GlyphVector != null)
278
- return _GlyphVector.getPixelBounds(null, (float)_Position.getX(), (float)_Position.getY());
279
- else if(_TextLayout != null && _Position != null)
280
- {
281
- temp = _TextLayout.getPixelBounds(null, (float)_Position.getX(), (float)_Position.getY());
282
- return temp;
283
- }
284
- else if(_TextLayout != null)//for deutch multipoint labels
285
- {
286
- //in this case, user set position using affine tranformation.
287
- temp = new Rectangle();
288
- temp.setRect(_TextLayout.getBounds());
289
- return temp;
290
- }
291
- else
292
- return null;
293
- }//*/
294
-
295
- /**
296
- * Gets bounds for the shapes. Incorporates AffineTransform if not null
297
- * in the ShapeInfo object.
298
- * @return
299
- */
300
- public getBounds(): Rectangle | null {
301
- let temp: Rectangle;
302
-
303
- if (this._Shape != null) {
304
- temp = this._Shape.getBounds();
305
- if (this._Shape instanceof GeneralPath) {
306
- if (this._ShapeType === ShapeInfo.SHAPE_TYPE_UNIT_OUTLINE) {
307
- if (this.lineColor != null && this.stroke != null) {
308
- if (this.stroke != null && this.stroke.getLineWidth() > 2) {
309
-
310
- temp.grow(this.stroke.getLineWidth() as int / 2, this.stroke.getLineWidth() as int / 2);
311
- }
312
-
313
- }
314
- }
315
- else {
316
- //mobility and other drawn symbol decorations.
317
- if (this.lineColor != null && this.stroke != null) {
318
- if (this.stroke != null && this.stroke.getLineWidth() > 2) {
319
-
320
- temp.grow(this.stroke.getLineWidth() as int - 1, this.stroke.getLineWidth() as int - 1);
321
- }
322
-
323
- }
324
- }
325
- }
326
- }
327
- else {
328
- // if (this._GlyphVector != null) {
329
- // temp = this._GlyphVector.getPixelBounds(null, this._Position.getX() as double, this._Position.getY() as double);
330
- // }
331
- //else {
332
- if (this._TextLayout != null && this._Position != null) {
333
- temp = this._TextLayout.getPixelBounds(null, this._Position.getX() as double, this._Position.getY() as double);
334
-
335
- }
336
- else {
337
- if (this._TextLayout != null)//for deutch multipoint labels
338
- {
339
- temp = new Rectangle();
340
- temp.setRect(this._TextLayout.getBounds());
341
- //return temp;
342
- }
343
- else {
344
-
345
- return null;
346
- }
347
-
348
- }
349
-
350
- // }
351
-
352
- }
353
-
354
-
355
-
356
- // if (this.affineTransform != null) {
357
- // //position set by affinetransform
358
- // let sTemp: Shape = temp;
359
- // sTemp = this.affineTransform.createTransformedShape(temp);
360
- // temp = sTemp.getBounds();
361
- // }
362
-
363
- return temp;
364
- }
365
-
366
-
367
- /**
368
- * needed to draw Glyphs and TextLayouts
369
- * @param position
370
- */
371
- public setGlyphPosition(position: Point | Point2D): void {
372
- if (position instanceof Point)
373
- this._Position = new Point2D(position.x, position.y);
374
- else
375
- this._Position = position;
376
- }
377
-
378
-
379
- /**
380
- * needed to draw Glyphs and TextLayouts
381
- * @return
382
- */
383
- public getGlyphPosition(): Point2D {
384
- return this._Position;
385
- }
386
-
387
- public setLineColor(value: Color | null): void {
388
- this.lineColor = value;
389
- }
390
- public getLineColor(): Color {
391
- return this.lineColor;
392
- }
393
-
394
- // /**
395
- // *
396
- // * @param value
397
- // * @deprecated Use setStroke
398
- // */
399
- // public void setLineWidth(int value)
400
- // {
401
- // lineWidth=value;
402
- // }
403
- // /**
404
- // * @deprecated Use getStroke
405
- // * @return
406
- // */
407
- // public int getLineWidth()
408
- // {
409
- // return lineWidth;
410
- // }
411
-
412
- public setFillColor(value: Color | null): void {
413
- this.fillColor = value;
414
- }
415
- public getFillColor(): Color | null {
416
- return this.fillColor;
417
- }
418
-
419
- public setTextBackgroundColor(value: Color): void {
420
- this.textBackgoundColor = value;
421
- }
422
- public getTextBackgroundColor(): Color {
423
- return this.textBackgoundColor;
424
- }
425
-
426
- // public setAffineTransform(value: AffineTransform): void {
427
- // this.affineTransform = value;
428
- // }
429
- // public getAffineTransform(): AffineTransform {
430
- // return this.affineTransform;
431
- // }
432
-
433
-
434
- public getStroke(): BasicStroke {
435
- return this.stroke;
436
- }
437
-
438
- /**
439
- * @deprecated
440
- */
441
- public getTexturePaint(): TexturePaint | null {
442
- return this.texturePaint;
443
- }
444
-
445
- /**
446
- * @deprecated
447
- */
448
- public setTexturePaint(value: TexturePaint | null): void {
449
- this.texturePaint = value;
450
- }
451
-
452
- public getFillStyle(): int {
453
- return this.fillStyle;
454
- }
455
- public setFillStyle(value: int): void {
456
- this.fillStyle = value;
457
- }
458
-
459
- public setStroke(s: BasicStroke): void {
460
- this.stroke = s;
461
- }
462
-
463
- /**
464
- * For Internal Renderer use
465
- * @param value
466
- * ShapeInfo.SHAPE_TYPE_
467
- *
468
- */
469
- public setShapeType(value: int): void {
470
- this._ShapeType = value;
471
- }
472
- /**
473
- * For Internal Renderer use
474
- * @return ShapeInfo.SHAPE_TYPE_
475
- *
476
- */
477
- public getShapeType(): int {
478
- return this._ShapeType;
479
- }
480
-
481
- public getPolylines(): Array<Array<Point2D>> {
482
- return this._Polylines;
483
- }
484
-
485
- public setPolylines(value: Array<Array<Point2D>>): void {
486
- this._Polylines = value;
487
- }
488
-
489
- /**
490
- * @deprecated
491
- */
492
- public setShader(value: ImageBitmap): void {
493
- this._shader = value;
494
- }
495
-
496
- /**
497
- * @deprecated
498
- */
499
- public getShader(): ImageBitmap {
500
- return this._shader;
501
- }
502
-
503
- public setPatternFillImage(img: SVGSymbolInfo): void {
504
- this._patternFillInfo = img;
505
- }
506
-
507
- public getPatternFillImage(): string {
508
- if (this._patternFillInfo)
509
- return this._patternFillInfo.getSVGDataURI();
510
- else
511
- return null;
512
- }
513
-
514
- public getPatternFillImageInfo(): SVGSymbolInfo {
515
- return this._patternFillInfo;
516
- }
517
-
518
- public getTextJustify(): int {
519
- return this._justify;
520
- }
521
-
522
- public setTextJustify(value: int): void {
523
- this._justify = value;
524
- }
525
- }
@@ -1,55 +0,0 @@
1
- import { type int } from "../../graphics2d/BasicTypes";
2
- import { AffineTransform } from "../../graphics2d/AffineTransform"
3
- import { Point } from "../../graphics2d/Point"
4
- import { Point2D } from "../../graphics2d/Point2D"
5
- import { Rectangle2D } from "../../graphics2d/Rectangle2D"
6
-
7
- import { Path } from "../shapes/path";
8
-
9
- /**
10
- *
11
- *
12
- */
13
- export class ShapeUtilities {
14
-
15
- public static grow(rect: Rectangle2D, size: int): void
16
- {
17
- rect.setRect(rect.getX() - size, rect.getY() - size, rect.getWidth() + (size * 2), rect.getHeight() + (size * 2));
18
- }
19
-
20
- public static offset(rect: Rectangle2D, offsetX: number, offsetY: number): void;
21
-
22
- public static offset(point: Point2D, offsetX: number, offsetY: number): void;
23
- public static offset(point: Point, offsetX: number, offsetY: number): void;
24
-
25
- public static offset(path: Path2D, offsetX: number, offsetY: number): void;
26
- public static offset(...args: unknown[]): void {
27
-
28
- if(args.length === 3)
29
- {
30
- if(args[0] instanceof Rectangle2D)
31
- {
32
- const [rect, offsetX, offsetY] = args as [Rectangle2D, number, number];
33
- rect.setRect(rect.getX() + offsetX, rect.getY() + offsetY, rect.getWidth(), rect.getHeight());
34
- }
35
- else if(args[0] instanceof Point2D)
36
- {
37
- const [point, offsetX, offsetY] = args as [Point2D, number, number];
38
- point.setLocation(point.getX() + offsetX, point.getY() + offsetY);
39
- }
40
- else if(args[0] instanceof Point)
41
- {
42
- const [point, offsetX, offsetY] = args as [Point, number, number];
43
- point.setLocation(point.getX() + offsetX, point.getY() + offsetY);
44
- }
45
- else if(args[0] instanceof Path)
46
- {
47
- console.log("ShapeUtilities.offset - Can't offset Path");
48
- }
49
- else if(args[0] instanceof Path2D)
50
- {
51
- console.log("ShapeUtilities.offset - Can't offset Path2D");
52
- }
53
- }
54
- }
55
- }
@@ -1,36 +0,0 @@
1
- import { Point2D } from "../../graphics2d/Point2D"
2
- import { Rectangle2D } from "../../graphics2d/Rectangle2D"
3
-
4
- export interface SymbolDimensionInfo {
5
- /**
6
- * The x value the image should be centered on or the "anchor point".
7
- * @return {@link Integer}
8
- */
9
- getSymbolCenterX(): number;
10
-
11
- /**
12
- * The y value the image should be centered on or the "anchor point".
13
- * @return {@link Integer}
14
- */
15
- getSymbolCenterY(): number;
16
-
17
- /**
18
- * The point the image should be centered on or the "anchor point".
19
- * @return {@link Point2D}
20
- */
21
- getSymbolCenterPoint(): Point2D;
22
-
23
- /**
24
- * minimum bounding rectangle for the core symbol. Does
25
- * not include modifiers, display or otherwise.
26
- * @return {@link Rectangle2D}
27
- */
28
- getSymbolBounds(): Rectangle2D;
29
-
30
- /**
31
- * Dimension of the entire image.
32
- * @return {@link Rectangle2D}
33
- */
34
-
35
- getImageBounds(): Rectangle2D;
36
- }