@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,1201 @@
1
+ import { type int, type float, type double } from "../../graphics2d/BasicTypes";
2
+
3
+ import { Font } from "../../graphics2d/Font"
4
+ import { Color } from "../../renderer/utilities/Color"
5
+ import { AffiliationColors } from "../../renderer/utilities/AffiliationColors"
6
+ import { ErrorLogger } from "../../renderer/utilities/ErrorLogger"
7
+ import { SettingsChangedEvent } from "../../renderer/utilities/SettingsChangedEvent"
8
+ import { SettingsEventListener } from "../../renderer/utilities/SettingsEventListener"
9
+ import { LogLevel } from "./LogLevel";
10
+
11
+
12
+ /**
13
+ *Static class that holds the setting for the JavaRenderer.
14
+ * Allows different parts of the renderer to know what
15
+ * values are being used.
16
+ *
17
+ */
18
+ export class RendererSettings {
19
+
20
+ private static _instance: RendererSettings;
21
+
22
+ //outline approach. none, filled rectangle, outline (default),
23
+ //outline quick (outline will not exceed 1 pixels).
24
+ private static _TextBackgroundMethod: int = 3;
25
+ /**
26
+ * There will be no background for text
27
+ */
28
+ public static readonly TextBackgroundMethod_NONE: int = 0;
29
+
30
+ /**
31
+ * There will be a colored box behind the text
32
+ */
33
+ public static readonly TextBackgroundMethod_COLORFILL: int = 1;
34
+
35
+ /**
36
+ * There will be an adjustable outline around the text (expensive)
37
+ * Outline width of 4 is recommended.
38
+ */
39
+ public static readonly TextBackgroundMethod_OUTLINE: int = 2;
40
+
41
+ /**
42
+ * A different approach for outline which is quicker and seems to use
43
+ * less memory. Also, you may do well with a lower outline thickness setting
44
+ * compared to the regular outlining approach. Outline Width of 1 is
45
+ * recommended.
46
+ */
47
+ public static readonly TextBackgroundMethod_OUTLINE_QUICK: int = 3;
48
+
49
+ /**
50
+ * Value from 0 to 255. The closer to 0 the lighter the text color has to be
51
+ * to have the outline be black. Default value is 160.
52
+ */
53
+ private static _TextBackgroundAutoColorThreshold: int = 160;
54
+
55
+ //if TextBackgroundMethod_OUTLINE is set, This value determines the width of that outline.
56
+ private static _TextOutlineWidth: int = 1;
57
+
58
+ //label foreground color, uses line color of symbol if null.
59
+ private static _ColorLabelForeground: Color; //Color.BLACK;
60
+ //label background color, used if TextBackGroundMethod = TextBackgroundMethod_COLORFILL && not null
61
+ private static _ColorLabelBackground: Color;//Color.WHITE;
62
+
63
+ private static _PixelSize: int = 50;
64
+
65
+ /**
66
+ * Collapse labels for fire support areas when the symbol isn't large enough to show all
67
+ * the labels.
68
+ */
69
+ private static _AutoCollapseModifiers: boolean = true;
70
+
71
+ /**
72
+ * @deprecated
73
+ */
74
+ private static _SymbolOutlineWidth: int = 1;
75
+
76
+ private static _OutlineSPControlMeasures: boolean = true;
77
+
78
+ private static _ActionPointDefaultFill: boolean = true;
79
+
80
+
81
+
82
+ /**
83
+ * If true (default), when HQ Staff is present, location will be indicated by the free
84
+ * end of the staff
85
+ */
86
+ private static _CenterOnHQStaff: boolean = true;
87
+
88
+
89
+ public static OperationalConditionModifierType_SLASH: int = 0;
90
+ public static OperationalConditionModifierType_BAR: int = 1;
91
+ private static _OCMType: int = 1;
92
+
93
+ public static readonly SeaMineRenderMethod_MEDAL: int = 1;
94
+ public static readonly SeaMineRenderMethod_ALT: int = 2;
95
+ public static _SeaMineRenderMethod: int = 1;
96
+
97
+ private static _UseLineInterpolation: boolean = true;
98
+
99
+ //private static Font _ModifierFont = new Font("arial", Font.TRUETYPE_FONT, 12);
100
+ private static _ModifierFontName: string = "arial";
101
+ //private static int _ModifierFontType = Font.TRUETYPE_FONT;
102
+ private static _ModifierFontType: int = Font.BOLD;
103
+ private static _ModifierFontWeight: string = "bold";
104
+ private static _ModifierFontSize: int = 12;
105
+ private static _ModifierFontKerning: int = 0;//0=off, 1=on (TextAttribute.KERNING_ON)
106
+ private static _ModifierFontTracking: float = 0;//TextAttribute.TRACKING_LOOSE;//loose=0.4f;
107
+ private _scaleEchelon: boolean = false;
108
+ private _DrawAffiliationModifierAsLabel: boolean = false;
109
+
110
+ private static _MPLabelFontName: string = "arial";
111
+ private static _MPLabelFontType: int = Font.BOLD;
112
+ private static _MPLabelFontSize: int = 12;
113
+ private static _KMLLabelScale: float = 1.0;
114
+
115
+ private static _DPI: int = 96;
116
+
117
+ //acevedo - 11/29/2017 - adding option to render only 2 labels.
118
+ private _TwoLabelOnly: boolean = false;
119
+
120
+ private _scaleMainIconWithoutSectorMods: boolean = true;
121
+
122
+ private _patternScale: double = 1.0;
123
+
124
+ //acevedo - 12/8/17 - allow the setting of affiliation colors.
125
+ private _friendlyUnitFillColor: Color = AffiliationColors.FriendlyUnitFillColor;
126
+ /// <summary>
127
+ /// Friendly Unit Fill Color.
128
+ /// </summary>
129
+ private _hostileUnitFillColor: Color = AffiliationColors.HostileUnitFillColor;//new Color(255,130,132);//Color.RED;
130
+ /// <summary>
131
+ /// Hostile Unit Fill Color.
132
+ /// </summary>
133
+ private _neutralUnitFillColor: Color = AffiliationColors.NeutralUnitFillColor;//new Color(144,238,144);//Color.GREEN;//new Color(0,255,0);//new Color(144,238,144);//light green//Color.GREEN;new Color(0,226,0);
134
+ /// <summary>
135
+ /// Neutral Unit Fill Color.
136
+ /// </summary>
137
+ private _unknownUnitFillColor: Color = AffiliationColors.UnknownUnitFillColor;// new Color(255,255,128);//Color.YELLOW;
138
+ /// <summary>
139
+ /// UnknownUn Graphic Fill Color.
140
+ /// </summary>
141
+ private _friendlyGraphicFillColor: Color = AffiliationColors.FriendlyGraphicFillColor;//Crystal Blue //Color.CYAN;
142
+ /// <summary>
143
+ /// Friendly Graphic Fill Color.
144
+ /// </summary>
145
+ private _hostileGraphicFillColor: Color = AffiliationColors.HostileGraphicFillColor;//salmon
146
+ /// <summary>
147
+ /// Hostile Graphic Fill Color.
148
+ /// </summary>
149
+ private _neutralGraphicFillColor: Color = AffiliationColors.NeutralGraphicFillColor;//Bamboo Green //new Color(144,238,144);//light green
150
+ /// <summary>
151
+ /// Neutral Graphic Fill Color.
152
+ /// </summary>
153
+ private _unknownGraphicFillColor: Color = AffiliationColors.UnknownGraphicFillColor;//light yellow new Color(255,255,224);//light yellow
154
+ /// <summary>
155
+ /// Unknown Unit Line Color.
156
+ /// </summary>
157
+ private _friendlyUnitLineColor: Color = AffiliationColors.FriendlyUnitLineColor;
158
+ /// <summary>
159
+ /// Friendly Unit Line Color.
160
+ /// </summary>
161
+ private _hostileUnitLineColor: Color = AffiliationColors.HostileUnitLineColor;
162
+ /// <summary>
163
+ /// Hostile Unit Line Color.
164
+ /// </summary>
165
+ private _neutralUnitLineColor: Color = AffiliationColors.NeutralUnitLineColor;
166
+ /// <summary>
167
+ /// Neutral Unit Line Color.
168
+ /// </summary>
169
+ private _unknownUnitLineColor: Color = AffiliationColors.UnknownUnitLineColor;
170
+ /// <summary>
171
+ /// Unknown Graphic Line Color.
172
+ /// </summary>
173
+ private _friendlyGraphicLineColor: Color = AffiliationColors.FriendlyGraphicLineColor;
174
+ /// <summary>
175
+ /// Friend Graphic Line Color.
176
+ /// </summary>
177
+ private _hostileGraphicLineColor: Color = AffiliationColors.HostileGraphicLineColor;
178
+ /// <summary>
179
+ /// Hostile Graphic Line Color.
180
+ /// </summary>
181
+ private _neutralGraphicLineColor: Color = AffiliationColors.NeutralGraphicLineColor;
182
+ /// <summary>
183
+ /// Neutral Graphic Line Color.
184
+ /// </summary>
185
+ private _unknownGraphicLineColor: Color = AffiliationColors.UnknownGraphicLineColor;
186
+
187
+ /*private Color WeatherRed = new Color(198,16,33);//0xC61021;// 198,16,33
188
+ private Color WeatherBlue = new Color(0,0,255);//0x0000FF;// 0,0,255
189
+
190
+ private Color WeatherPurpleDark = new Color(128,0,128);//0x800080;// 128,0,128 Plum Red
191
+ private Color WeatherPurpleLight = new Color(226,159,255);//0xE29FFF;// 226,159,255 Light Orchid
192
+
193
+ private Color WeatherBrownDark = new Color(128,98,16);//0x806210;// 128,98,16 Safari
194
+ private Color WeatherBrownLight = new Color(210,176,106);//0xD2B06A;// 210,176,106 Khaki
195
+ */
196
+
197
+ private _Listeners: Array<SettingsEventListener> = new Array<SettingsEventListener>();
198
+
199
+ private constructor() {
200
+
201
+ this.Init();
202
+
203
+ }
204
+
205
+ public static getInstance(): RendererSettings {
206
+ if (!RendererSettings._instance) {
207
+ RendererSettings._instance = new RendererSettings();
208
+ }
209
+
210
+
211
+ return RendererSettings._instance;
212
+ }
213
+
214
+ private Init(): void {
215
+ try {
216
+ //RendererSettings._ColorLabelBackground = new Color(255, 255, 255, 255);
217
+ //RendererSettings._VMSize = java.lang.Runtime.getRuntime().maxMemory() as int;
218
+ //RendererSettings._CacheSize = Math.round(RendererSettings._VMSize * 0.03);//set cache to 3% of available memory
219
+ } catch (exc) {
220
+ if (exc instanceof Error) {
221
+ ErrorLogger.LogException("RendererSettings", "Init", exc, LogLevel.WARNING);
222
+ } else {
223
+ throw exc;
224
+ }
225
+ }
226
+ }
227
+
228
+ public addEventListener(sel: SettingsEventListener): void {
229
+ this._Listeners.push(sel);
230
+ }
231
+
232
+ private raiseEvents(event: string): void {
233
+ for (let l of this._Listeners) {
234
+ l.SettingsEventChanged(event);
235
+ }
236
+ }
237
+
238
+ /**
239
+ * None, outline (default), or filled background.
240
+ * If set to OUTLINE, TextOutlineWidth changed to default of 4.
241
+ * If set to OUTLINE_QUICK, TextOutlineWidth changed to default of 1.
242
+ * Use setTextOutlineWidth if you'd like a different value.
243
+ * @param textBackgroundMethod like RenderSettings.TextBackgroundMethod_NONE
244
+ */
245
+ public setTextBackgroundMethod(textBackgroundMethod: int): void {
246
+ RendererSettings._TextBackgroundMethod = textBackgroundMethod;
247
+ if (RendererSettings._TextBackgroundMethod === RendererSettings.TextBackgroundMethod_OUTLINE) {
248
+
249
+ RendererSettings._TextOutlineWidth = 4;
250
+ }
251
+
252
+ else if (RendererSettings._TextBackgroundMethod === RendererSettings.TextBackgroundMethod_OUTLINE_QUICK) {
253
+
254
+ RendererSettings._TextOutlineWidth = 1;
255
+ }
256
+ }
257
+
258
+ /**
259
+ * None, outline (default), or filled background.
260
+ * @return method like RenderSettings.TextBackgroundMethod_NONE
261
+ */
262
+ public getTextBackgroundMethod(): int {
263
+ return RendererSettings._TextBackgroundMethod;
264
+ }
265
+
266
+ /**
267
+ * default size single point icons will render on the map
268
+ * @param size
269
+ */
270
+ public setDefaultPixelSize(size: int): void {
271
+ RendererSettings._PixelSize = size;
272
+ }
273
+
274
+ /**
275
+ * default size single point icons will render on the map
276
+ * @return
277
+ */
278
+ public getDefaultPixelSize(): int {
279
+ return RendererSettings._PixelSize;
280
+ }
281
+
282
+
283
+ /**
284
+ * Set the operational condition modifier to be slashes or bars
285
+ * @param value like RendererSettings.OperationalConditionModifierType_SLASH
286
+ */
287
+ public setOperationalConditionModifierType(value: int): void {
288
+ RendererSettings._OCMType = value;
289
+ }
290
+
291
+ public getOperationalConditionModifierType(): int {
292
+ return RendererSettings._OCMType;
293
+ }
294
+
295
+ public setSeaMineRenderMethod(method: int): void {
296
+ RendererSettings._SeaMineRenderMethod = method;
297
+ }
298
+ public getSeaMineRenderMethod(): int {
299
+ return RendererSettings._SeaMineRenderMethod;
300
+ }
301
+
302
+ /**
303
+ * For lines symbols with "decorations" like FLOT or LOC, when points are
304
+ * too close together, we will start dropping points until we get enough
305
+ * space between 2 points to draw the decoration. Without this, when points
306
+ * are too close together, you run the chance that the decorated line will
307
+ * look like a plain line because there was no room between points to
308
+ * draw the decoration.
309
+ * @param value boolean
310
+ */
311
+ public setUseLineInterpolation(value: boolean): void {
312
+ RendererSettings._UseLineInterpolation = value;
313
+ }
314
+
315
+ /**
316
+ * Returns the current setting for Line Interpolation.
317
+ * @return boolean
318
+ */
319
+ public getUseLineInterpolation(): boolean {
320
+ return RendererSettings._UseLineInterpolation;
321
+ }
322
+
323
+ /**
324
+ * set the screen DPI so the renderer can take DPI into account when
325
+ * rendering for things like dashed lines and decorated lines.
326
+ * @param value
327
+ */
328
+ public setDeviceDPI(value: int): void {
329
+ RendererSettings._DPI = value;
330
+ }
331
+ public getDeviceDPI(): int {
332
+ return RendererSettings._DPI;
333
+ }
334
+ /**
335
+ * Collapse Modifiers for fire support areas when the symbol isn't large enough to show all
336
+ * the labels. Identifying label will always be visible. Zooming in, to make the symbol larger,
337
+ * will make more modifiers visible. Resizing the symbol can also make more modifiers visible.
338
+ * @param value boolean
339
+ */
340
+ public setAutoCollapseModifiers(value: boolean): void { RendererSettings._AutoCollapseModifiers = value; }
341
+
342
+ public getAutoCollapseModifiers(): boolean { return RendererSettings._AutoCollapseModifiers; }
343
+
344
+
345
+
346
+ /**
347
+ * if true (default), when HQ Staff is present, location will be indicated by the free
348
+ * end of the staff
349
+ * @param value
350
+ */
351
+ public setCenterOnHQStaff(value: boolean): void {
352
+ RendererSettings._CenterOnHQStaff = value;
353
+ }
354
+
355
+ /**
356
+ * if true (default), when HQ Staff is present, location will be indicated by the free
357
+ * end of the staff
358
+ */
359
+ public getCenterOnHQStaff(): boolean {
360
+ return RendererSettings._CenterOnHQStaff;
361
+ }
362
+
363
+
364
+ /**
365
+ * if RenderSettings.TextBackgroundMethod_OUTLINE is used,
366
+ * the outline will be this many pixels wide.
367
+ *
368
+ * @param width
369
+ * @deprecated - controlled within the renderer
370
+ */
371
+ /*synchronized public void setTextOutlineWidth(int width)
372
+ {
373
+ _TextOutlineWidth = width;
374
+ }*/
375
+
376
+ /**
377
+ * if RenderSettings.TextBackgroundMethod_OUTLINE is used,
378
+ * the outline will be this many pixels wide.
379
+ * @return
380
+ */
381
+ public getTextOutlineWidth(): int {
382
+ return RendererSettings._TextOutlineWidth;
383
+ }
384
+
385
+ /**
386
+ * Refers to text color of modifier labels
387
+ * @return
388
+ *
389
+ */
390
+ /*public Color getLabelForegroundColor()
391
+ {
392
+ return _ColorLabelForeground;
393
+ }*/
394
+
395
+ /**
396
+ * Refers to text color of modifier labels
397
+ * Default Color is Black. If NULL, uses line color of symbol
398
+ * @param value
399
+ *
400
+ */
401
+ /* synchronized public void setLabelForegroundColor(Color value)
402
+ {
403
+ _ColorLabelForeground = value;
404
+ }*/
405
+
406
+ /**
407
+ * Refers to background color of modifier labels
408
+ * @return
409
+ *
410
+ */
411
+ /* public Color getLabelBackgroundColor()
412
+ {
413
+ return _ColorLabelBackground;
414
+ }*/
415
+
416
+ /**
417
+ * Refers to text color of modifier labels
418
+ * Default Color is White.
419
+ * Null value means the optimal background color (black or white)
420
+ * will be chose based on the color of the text.
421
+ * @param value
422
+ *
423
+ */
424
+ /*synchronized public void setLabelBackgroundColor(Color value)
425
+ {
426
+ _ColorLabelBackground = value;
427
+ }*/
428
+
429
+ /**
430
+ * Value from 0 to 255. The closer to 0 the lighter the text color has to be
431
+ * to have the outline be black. Default value is 160.
432
+ * @param value
433
+ */
434
+ public setTextBackgroundAutoColorThreshold(value: int): void {
435
+ RendererSettings._TextBackgroundAutoColorThreshold = value;
436
+ }
437
+
438
+ /**
439
+ * Value from 0 to 255. The closer to 0 the lighter the text color has to be
440
+ * to have the outline be black. Default value is 160.
441
+ * @return
442
+ */
443
+ public getTextBackgroundAutoColorThreshold(): int {
444
+ return RendererSettings._TextBackgroundAutoColorThreshold;
445
+ }
446
+
447
+ /**
448
+ * This applies to Single Point Tactical Graphics.
449
+ * Setting this will determine the default value for milStdSymbols when created.
450
+ * 0 for no outline,
451
+ * 1 for outline thickness of 1 pixel,
452
+ * 2 for outline thickness of 2 pixels,
453
+ * greater than 2 is not currently recommended.
454
+ * @deprecated
455
+ * @param width
456
+ */
457
+ public setSinglePointSymbolOutlineWidth(width: int): void {
458
+ RendererSettings._SymbolOutlineWidth = width;
459
+ }
460
+
461
+ /**
462
+ * This applies to Single Point Tactical Graphics.
463
+ * @return
464
+ * @deprecated
465
+ */
466
+ public getSinglePointSymbolOutlineWidth(): int {
467
+ return RendererSettings._SymbolOutlineWidth;
468
+ }
469
+
470
+ public setOutlineSPControlMeasures(value: boolean): void {
471
+ RendererSettings._OutlineSPControlMeasures = value;
472
+ }
473
+
474
+ public getOutlineSPControlMeasures(): boolean {
475
+ return RendererSettings._OutlineSPControlMeasures;
476
+ }
477
+
478
+ public setActionPointDefaultFill(value: boolean): void {
479
+ RendererSettings._ActionPointDefaultFill = value;
480
+ }
481
+
482
+ public getActionPointDefaultFill(): boolean {
483
+ return RendererSettings._ActionPointDefaultFill;
484
+ }
485
+
486
+ /**
487
+ * false to use label font size
488
+ * true to scale it using symbolPixelBounds / 3.5
489
+ * @param value
490
+ */
491
+ public setScaleEchelon(value: boolean): void {
492
+ this._scaleEchelon = value;
493
+ }
494
+ /**
495
+ * Returns the value determining if we scale the echelon font size or
496
+ * just match the font size specified by the label font.
497
+ * @return true or false
498
+ */
499
+ public getScaleEchelon(): boolean {
500
+ return this._scaleEchelon;
501
+ }
502
+
503
+ /**
504
+ * Determines how to draw the Affiliation modifier.
505
+ * True to draw as modifier label in the "E/F" location.
506
+ * False to draw at the top right corner of the symbol
507
+ */
508
+ public setDrawAffiliationModifierAsLabel(value: boolean): void {
509
+ this._DrawAffiliationModifierAsLabel = value;
510
+ }
511
+ /**
512
+ * True to draw as modifier label in the "E/F" location.
513
+ * False to draw at the top right corner of the symbol
514
+ */
515
+ public getDrawAffiliationModifierAsLabel(): boolean {
516
+ return this._DrawAffiliationModifierAsLabel;
517
+ }
518
+
519
+ /**
520
+ * Sets the font to be used for modifier labels
521
+ * @param name Like "arial"
522
+ * @param weight Like "normal" or "bold"
523
+ * @param size Like 12
524
+ */
525
+ public setLabelFont(name: string, weight: string, size: int): void;
526
+
527
+
528
+ /**
529
+ *
530
+ * @param name Like "arial"
531
+ * @param type Like Font.BOLD
532
+ * @param size Like 12
533
+ */
534
+ public setLabelFont(name: string, type: int, size: int): void;
535
+
536
+ public setLabelFont(...args: unknown[]): void {
537
+ switch (args.length) {
538
+ case 3:
539
+ {
540
+ if (typeof args[1] === 'string') {
541
+ const [name, weight, size] = args as [string, string, int];
542
+
543
+ RendererSettings._ModifierFontName = name;
544
+ RendererSettings._ModifierFontWeight = weight;
545
+ RendererSettings._ModifierFontType = Font.getTypeInt(weight);
546
+ RendererSettings._ModifierFontSize = size;
547
+ }
548
+ else if (typeof args[1] === 'number') {
549
+ const [name, type, size] = args as [string, int, int];
550
+
551
+
552
+ RendererSettings._ModifierFontName = name;
553
+ RendererSettings._ModifierFontWeight = Font.getTypeString(type);
554
+ RendererSettings._ModifierFontType = type;
555
+ RendererSettings._ModifierFontSize = size;
556
+ }
557
+
558
+ break;
559
+ }
560
+
561
+
562
+ default: {
563
+ throw Error(`Invalid number of arguments`);
564
+ }
565
+ }
566
+ this.raiseEvents(SettingsChangedEvent.EventType_FontChanged);
567
+ }
568
+
569
+ public setMPLabelFont(name: string, weight: string, size: int): void;
570
+ public setMPLabelFont(name: string, weight: string, size: int, kmlScale: float): void;
571
+ public setMPLabelFont(name: string, type: int, size: int): void;
572
+ public setMPLabelFont(name: string, type: int, size: int, kmlScale: float): void;
573
+ public setMPLabelFont(...args: unknown[]): void {
574
+ switch (args.length) {
575
+ case 3: {
576
+ if (typeof args[1] === 'number') {
577
+ const [name, type, size] = args as [string, int, int];
578
+
579
+
580
+ RendererSettings._MPLabelFontName = name;
581
+ RendererSettings._MPLabelFontType = type;
582
+ RendererSettings._MPLabelFontSize = size;
583
+ RendererSettings._KMLLabelScale = 1.0;
584
+ //_MPLabelFontKerning = 0;
585
+ //_MPLabelFontTracking = TextAttribute.TRACKING_LOOSE;
586
+ } else {
587
+ const [name, weight, size] = args as [string, string, int];
588
+
589
+ RendererSettings._MPLabelFontName = name;
590
+ RendererSettings._MPLabelFontType = Font.getTypeInt(weight);
591
+ RendererSettings._MPLabelFontSize = size;
592
+ RendererSettings._KMLLabelScale = 1.0;
593
+ //_MPLabelFontKerning = 0;
594
+ //_MPLabelFontTracking = TextAttribute.TRACKING_LOOSE;
595
+ }
596
+ break;
597
+ }
598
+
599
+ case 4: {
600
+ if (typeof args[1] === 'number') {
601
+ const [name, type, size, kmlScale] = args as [string, int, int, float];
602
+
603
+ RendererSettings._MPLabelFontName = name;
604
+ RendererSettings._ModifierFontWeight = Font.getTypeString(type);
605
+ RendererSettings._ModifierFontType = type;
606
+ RendererSettings._MPLabelFontSize = Math.round(size * kmlScale);
607
+ RendererSettings._KMLLabelScale = kmlScale;
608
+ //_MPLabelFontKerning = 0;
609
+ //_MPLabelFontTracking = TextAttribute.TRACKING_LOOSE;
610
+ } else {
611
+ const [name, weight, size, kmlScale] = args as [string, string, int, float];
612
+
613
+ RendererSettings._MPLabelFontName = name;
614
+ RendererSettings._ModifierFontWeight = weight;
615
+ RendererSettings._ModifierFontType = Font.getTypeInt(weight);
616
+ RendererSettings._MPLabelFontSize = Math.round(size * kmlScale);
617
+ RendererSettings._KMLLabelScale = kmlScale;
618
+ //_MPLabelFontKerning = 0;
619
+ //_MPLabelFontTracking = TextAttribute.TRACKING_LOOSE;
620
+ }
621
+ break;
622
+ }
623
+
624
+ default: {
625
+ throw Error(`Invalid number of arguments`);
626
+ }
627
+ }
628
+ this.raiseEvents(SettingsChangedEvent.EventType_FontChanged);
629
+ }
630
+
631
+
632
+ /**
633
+ * the font name to be used for modifier labels
634
+ * @return name of the label font
635
+ */
636
+ public getLabelFontName(): string {
637
+ return RendererSettings._ModifierFontName;
638
+ }
639
+
640
+ /**
641
+ * Like Font.BOLD
642
+ * @return type of the label font
643
+ */
644
+ public getLabelFontType(): int {
645
+ return RendererSettings._ModifierFontType;
646
+ }
647
+
648
+ /**
649
+ * get font point size
650
+ * @return size of the label font
651
+ */
652
+ public getLabelFontSize(): int {
653
+ return RendererSettings._ModifierFontSize;
654
+ }
655
+
656
+
657
+ /**
658
+ * get font object used for labels
659
+ * @return Font object
660
+ */
661
+ public getLabelFont(): Font {
662
+ try {
663
+
664
+ let temp: Font = new Font(RendererSettings._ModifierFontName, RendererSettings._ModifierFontType, RendererSettings._ModifierFontSize);
665
+
666
+ return temp;
667
+ } catch (exc) {
668
+ if (exc instanceof Error) {
669
+ let message: string = "font creation error, returning \"" + RendererSettings._ModifierFontName + "\" font, " + RendererSettings._ModifierFontSize + "pt. Check font name and type.";
670
+ ErrorLogger.LogMessage("RendererSettings", "getLabelFont", message);
671
+ ErrorLogger.LogMessage("RendererSettings", "getLabelFont", exc.message);
672
+ return new Font("arial", Font.BOLD, 12);
673
+ } else {
674
+ throw exc;
675
+ }
676
+ }
677
+ }
678
+
679
+ /**
680
+ * get font object used for labels
681
+ * @return Font object
682
+ */
683
+ public getMPLabelFont(): Font {
684
+ try {
685
+
686
+ let temp: Font = new Font(RendererSettings._MPLabelFontName, RendererSettings._MPLabelFontType, RendererSettings._MPLabelFontSize);
687
+
688
+ return temp;//.deriveFont(map);
689
+ } catch (exc) {
690
+ if (exc instanceof Error) {
691
+ let message: string = "font creation error, returning \"" + RendererSettings._MPLabelFontName + "\" font, " + RendererSettings._MPLabelFontSize + "pt. Check font name and type.";
692
+ ErrorLogger.LogMessage("RendererSettings", "getMPLabelFont", message);
693
+ ErrorLogger.LogMessage("RendererSettings", "getMPLabelFont", exc.message);
694
+ return new Font("arial", Font.BOLD, 12);
695
+ } else {
696
+ throw exc;
697
+ }
698
+ }
699
+ }
700
+
701
+ public getKMLLabelScale(): float {
702
+ return RendererSettings._KMLLabelScale;
703
+ }
704
+
705
+ /**
706
+ * the font name to be used for modifier labels
707
+ * @return name of the label font
708
+ */
709
+ public getMPLabelFontName(): string
710
+ {
711
+ return RendererSettings._MPLabelFontName;
712
+ }
713
+
714
+ /**
715
+ * Like Font.BOLD
716
+ * @return type of the label font
717
+ */
718
+ public getMPLabelFontType(): int
719
+ {
720
+ return RendererSettings._MPLabelFontType;
721
+ }
722
+
723
+ /**
724
+ * get font point size
725
+ * @return size of the label font
726
+ */
727
+ public getMPLabelFontSize(): int
728
+ {
729
+ return RendererSettings._MPLabelFontSize;
730
+ }
731
+
732
+
733
+ /**
734
+ ** Get a boolean indicating between the use of supply routes labels in all segments (false) or
735
+ * to only set 2 labels one at the north and the other one at the south of the graphic (true).
736
+ * @return {boolean}
737
+ +* @deprecated
738
+ */
739
+ public getTwoLabelOnly(): boolean {
740
+ return this._TwoLabelOnly;
741
+ }
742
+
743
+ /**
744
+ * Set a boolean indicating between the use of supply routes labels in all segments (false) or
745
+ * to only set 2 labels one at the north and the other one at the south of the graphic (true).
746
+ * @param TwoLabelOnly
747
+ * @deprecated
748
+ */
749
+ public setTwoLabelOnly(TwoLabelOnly: boolean): void {
750
+ this._TwoLabelOnly = TwoLabelOnly;
751
+ }
752
+
753
+ /**
754
+ * When true, if the main icon is normally small to allow room for sector modifiers,
755
+ * make it larger when no sector modifiers are present for better visibility.
756
+ * @param scaleMainIcon
757
+ */
758
+ public setScaleMainIcon(scaleMainIcon:boolean ):void
759
+ {
760
+ this._scaleMainIconWithoutSectorMods = scaleMainIcon;
761
+ }
762
+ /**
763
+ * When true, if the main icon is normally small to allow room for sector modifiers,
764
+ * main icon is made larger when no sector modifiers are present for better visibility.
765
+ */
766
+ public getScaleMainIcon():boolean
767
+ {
768
+ return this._scaleMainIconWithoutSectorMods;
769
+ }
770
+
771
+ /**
772
+ * Multipoint features and patterns scale with line width ({@link MilStdAttributes#LineWidth}).
773
+ * {@code patternScale} is the ratio of how much to increase features and patterns by with line width.
774
+ * default value is 1.0. Can be overwritten on render with {@link MilStdAttributes#PatternScale}
775
+ * @param patternScale
776
+ */
777
+ public setPatternScale( patternScale: double): void {
778
+ this._patternScale = patternScale;
779
+ }
780
+
781
+ public getPatternScale(): double {
782
+ return this._patternScale;
783
+ }
784
+
785
+ /**
786
+ * get the preferred fill affiliation color for units.
787
+ *
788
+ * @return Color like Color(255, 255, 255)
789
+ *
790
+ * */
791
+ public getFriendlyUnitFillColor(): Color {
792
+ return this._friendlyUnitFillColor;
793
+ }
794
+ /**
795
+ * Set the preferred fill affiliation color for units
796
+ *
797
+ * @param friendlyUnitFillColor Color like Color(255, 255, 255)
798
+ *
799
+ * */
800
+ public setFriendlyUnitFillColor(friendlyUnitFillColor: Color): void {
801
+ if (friendlyUnitFillColor != null) {
802
+
803
+ this._friendlyUnitFillColor = friendlyUnitFillColor;
804
+ }
805
+
806
+ }
807
+ /**
808
+ * get the preferred fill affiliation color for units.
809
+ *
810
+ * @return Color like Color(255, 255, 255)
811
+ *
812
+ * */
813
+ public getHostileUnitFillColor(): Color {
814
+ return this._hostileUnitFillColor;
815
+ }
816
+ /**
817
+ * Set the preferred fill affiliation color for units
818
+ *
819
+ * @param hostileUnitFillColor Color like Color(255, 255, 255)
820
+ *
821
+ * */
822
+ public setHostileUnitFillColor(hostileUnitFillColor: Color): void {
823
+ if (hostileUnitFillColor != null) {
824
+
825
+ this._hostileUnitFillColor = hostileUnitFillColor;
826
+ }
827
+
828
+ }
829
+ /**
830
+ * get the preferred fill affiliation color for units.
831
+ *
832
+ * @return Color like Color(255, 255, 255)
833
+ *
834
+ * */
835
+ public getNeutralUnitFillColor(): Color {
836
+ return this._neutralUnitFillColor;
837
+ }
838
+ /**
839
+ * Set the preferred line affiliation color for units
840
+ *
841
+ * @param neutralUnitFillColor Color like Color(255, 255, 255)
842
+ *
843
+ * */
844
+ public setNeutralUnitFillColor(neutralUnitFillColor: Color): void {
845
+ if (neutralUnitFillColor != null) {
846
+
847
+ this._neutralUnitFillColor = neutralUnitFillColor;
848
+ }
849
+
850
+ }
851
+ /**
852
+ * get the preferred fill affiliation color for units.
853
+ *
854
+ * @return Color like Color(255, 255, 255)
855
+ *
856
+ * */
857
+ public getUnknownUnitFillColor(): Color {
858
+ return this._unknownUnitFillColor;
859
+ }
860
+ /**
861
+ * Set the preferred fill affiliation color for units
862
+ *
863
+ * @param unknownUnitFillColor Color like Color(255, 255, 255)
864
+ *
865
+ * */
866
+ public setUnknownUnitFillColor(unknownUnitFillColor: Color): void {
867
+ if (unknownUnitFillColor != null) {
868
+
869
+ this._unknownUnitFillColor = unknownUnitFillColor;
870
+ }
871
+
872
+ }
873
+ /**
874
+ * get the preferred fill affiliation color for graphics.
875
+ *
876
+ * @return Color like Color(255, 255, 255)
877
+ *
878
+ * */
879
+ public getHostileGraphicFillColor(): Color {
880
+ return this._hostileGraphicFillColor;
881
+ }
882
+ /**
883
+ * Set the preferred fill affiliation color for graphics
884
+ *
885
+ * @param hostileGraphicFillColor Color like Color(255, 255, 255)
886
+ *
887
+ * */
888
+ public setHostileGraphicFillColor(hostileGraphicFillColor: Color): void {
889
+ if (hostileGraphicFillColor != null) {
890
+
891
+ this._hostileGraphicFillColor = hostileGraphicFillColor;
892
+ }
893
+
894
+ }
895
+ /**
896
+ * get the preferred fill affiliation color for graphics.
897
+ *
898
+ * @return Color like Color(255, 255, 255)
899
+ *
900
+ * */
901
+ public getFriendlyGraphicFillColor(): Color {
902
+ return this._friendlyGraphicFillColor;
903
+ }
904
+ /**
905
+ * Set the preferred fill affiliation color for graphics
906
+ *
907
+ * @param friendlyGraphicFillColor Color like Color(255, 255, 255)
908
+ *
909
+ * */
910
+ public setFriendlyGraphicFillColor(friendlyGraphicFillColor: Color): void {
911
+ if (friendlyGraphicFillColor != null) {
912
+
913
+ this._friendlyGraphicFillColor = friendlyGraphicFillColor;
914
+ }
915
+
916
+ }
917
+ /**
918
+ * get the preferred fill affiliation color for graphics.
919
+ *
920
+ * @return Color like Color(255, 255, 255)
921
+ *
922
+ * */
923
+ public getNeutralGraphicFillColor(): Color {
924
+ return this._neutralGraphicFillColor;
925
+ }
926
+ /**
927
+ * Set the preferred fill affiliation color for graphics
928
+ *
929
+ * @param neutralGraphicFillColor Color like Color(255, 255, 255)
930
+ *
931
+ * */
932
+ public setNeutralGraphicFillColor(neutralGraphicFillColor: Color): void {
933
+ if (neutralGraphicFillColor != null) {
934
+
935
+ this._neutralGraphicFillColor = neutralGraphicFillColor;
936
+ }
937
+
938
+ }
939
+ /**
940
+ * get the preferred fill affiliation color for graphics.
941
+ *
942
+ * @return Color like Color(255, 255, 255)
943
+ *
944
+ * */
945
+ public getUnknownGraphicFillColor(): Color {
946
+ return this._unknownGraphicFillColor;
947
+ }
948
+ /**
949
+ * Set the preferred fill affiliation color for graphics
950
+ *
951
+ * @param unknownGraphicFillColor Color like Color(255, 255, 255)
952
+ *
953
+ * */
954
+ public setUnknownGraphicFillColor(unknownGraphicFillColor: Color): void {
955
+ if (unknownGraphicFillColor != null) {
956
+
957
+ this._unknownGraphicFillColor = unknownGraphicFillColor;
958
+ }
959
+
960
+ }
961
+ /**
962
+ * get the preferred line affiliation color for units.
963
+ *
964
+ * @return Color like Color(255, 255, 255)
965
+ *
966
+ * */
967
+ public getFriendlyUnitLineColor(): Color {
968
+ return this._friendlyUnitLineColor;
969
+ }
970
+ /**
971
+ * Set the preferred line affiliation color for units
972
+ *
973
+ * @param friendlyUnitLineColor Color like Color(255, 255, 255)
974
+ *
975
+ * */
976
+ public setFriendlyUnitLineColor(friendlyUnitLineColor: Color): void {
977
+ if (friendlyUnitLineColor != null) {
978
+
979
+ this._friendlyUnitLineColor = friendlyUnitLineColor;
980
+ }
981
+
982
+ }
983
+ /**
984
+ * get the preferred line affiliation color for units.
985
+ *
986
+ * @return Color like Color(255, 255, 255)
987
+ *
988
+ * */
989
+ public getHostileUnitLineColor(): Color {
990
+ return this._hostileUnitLineColor;
991
+ }
992
+ /**
993
+ * Set the preferred line affiliation color for units
994
+ *
995
+ * @param hostileUnitLineColor Color like Color(255, 255, 255)
996
+ *
997
+ * */
998
+ public setHostileUnitLineColor(hostileUnitLineColor: Color): void {
999
+ if (hostileUnitLineColor != null) {
1000
+
1001
+ this._hostileUnitLineColor = hostileUnitLineColor;
1002
+ }
1003
+
1004
+ }
1005
+ /**
1006
+ * get the preferred line affiliation color for units.
1007
+ *
1008
+ * @return Color like Color(255, 255, 255)
1009
+ *
1010
+ * */
1011
+ public getNeutralUnitLineColor(): Color {
1012
+ return this._neutralUnitLineColor;
1013
+ }
1014
+ /**
1015
+ * Set the preferred line affiliation color for units
1016
+ *
1017
+ * @param neutralUnitLineColor Color like Color(255, 255, 255)
1018
+ *
1019
+ * */
1020
+ public setNeutralUnitLineColor(neutralUnitLineColor: Color): void {
1021
+ if (neutralUnitLineColor != null) {
1022
+
1023
+ this._neutralUnitLineColor = neutralUnitLineColor;
1024
+ }
1025
+
1026
+ }
1027
+ /**
1028
+ * get the preferred line affiliation color for units.
1029
+ *
1030
+ * @return Color like Color(255, 255, 255)
1031
+ *
1032
+ * */
1033
+ public getUnknownUnitLineColor(): Color {
1034
+ return this._unknownUnitLineColor;
1035
+ }
1036
+ /**
1037
+ * Set the preferred line affiliation color for units
1038
+ *
1039
+ * @param unknownUnitLineColor Color like Color(255, 255, 255)
1040
+ *
1041
+ * */
1042
+ public setUnknownUnitLineColor(unknownUnitLineColor: Color): void {
1043
+ if (unknownUnitLineColor != null) {
1044
+
1045
+ this._unknownUnitLineColor = unknownUnitLineColor;
1046
+ }
1047
+
1048
+ }
1049
+ /**
1050
+ * get the preferred line affiliation color for graphics.
1051
+ *
1052
+ * @return Color like Color(255, 255, 255)
1053
+ *
1054
+ * */
1055
+ public getFriendlyGraphicLineColor(): Color {
1056
+ return this._friendlyGraphicLineColor;
1057
+ }
1058
+ /**
1059
+ * Set the preferred line affiliation color for graphics
1060
+ *
1061
+ * @param friendlyGraphicLineColor Color like Color(255, 255, 255)
1062
+ *
1063
+ * */
1064
+ public setFriendlyGraphicLineColor(friendlyGraphicLineColor: Color): void {
1065
+ if (friendlyGraphicLineColor != null) {
1066
+
1067
+ this._friendlyGraphicLineColor = friendlyGraphicLineColor;
1068
+ }
1069
+
1070
+ }
1071
+ /**
1072
+ * get the preferred line affiliation color for graphics.
1073
+ *
1074
+ * @return Color like Color(255, 255, 255)
1075
+ *
1076
+ * */
1077
+ public getHostileGraphicLineColor(): Color {
1078
+ return this._hostileGraphicLineColor;
1079
+ }
1080
+ /**
1081
+ * Set the preferred line affiliation color for graphics
1082
+ *
1083
+ * @param hostileGraphicLineColor Color like Color(255, 255, 255)
1084
+ *
1085
+ * */
1086
+ public setHostileGraphicLineColor(hostileGraphicLineColor: Color): void {
1087
+ if (hostileGraphicLineColor != null) {
1088
+
1089
+ this._hostileGraphicLineColor = hostileGraphicLineColor;
1090
+ }
1091
+
1092
+ }
1093
+ /**
1094
+ * get the preferred line affiliation color for graphics.
1095
+ *
1096
+ * @return Color like Color(255, 255, 255)
1097
+ *
1098
+ * */
1099
+ public getNeutralGraphicLineColor(): Color {
1100
+ return this._neutralGraphicLineColor;
1101
+ }
1102
+ /**
1103
+ * Set the preferred line affiliation color for graphics
1104
+ *
1105
+ * @param neutralGraphicLineColor Color like Color(255, 255, 255)
1106
+ *
1107
+ * */
1108
+ public setNeutralGraphicLineColor(neutralGraphicLineColor: Color): void {
1109
+ if (neutralGraphicLineColor != null) {
1110
+
1111
+ this._neutralGraphicLineColor = neutralGraphicLineColor;
1112
+ }
1113
+
1114
+ }
1115
+ /**
1116
+ * get the preferred line affiliation color for graphics.
1117
+ *
1118
+ * @return Color like Color(255, 255, 255)
1119
+ *
1120
+ * */
1121
+ public getUnknownGraphicLineColor(): Color {
1122
+ return this._unknownGraphicLineColor;
1123
+ }
1124
+ /**
1125
+ * Set the preferred line affiliation color for graphics
1126
+ *
1127
+ * @param unknownGraphicLineColor Color like Color(255, 255, 255)
1128
+ *
1129
+ * */
1130
+ public setUnknownGraphicLineColor(unknownGraphicLineColor: Color): void {
1131
+ if (unknownGraphicLineColor != null) {
1132
+
1133
+ this._unknownGraphicLineColor = unknownGraphicLineColor;
1134
+ }
1135
+
1136
+ }
1137
+
1138
+ /**
1139
+ * Set the preferred line and fill affiliation color for tactical graphics.
1140
+ *
1141
+ * @param friendlyGraphicLineColor Color
1142
+ * @param hostileGraphicLineColor Color
1143
+ * @param neutralGraphicLineColor Color
1144
+ * @param unknownGraphicLineColor Color
1145
+ * @param friendlyGraphicFillColor Color
1146
+ * @param hostileGraphicFillColor Color
1147
+ * @param neutralGraphicFillColor Color
1148
+ * @param unknownGraphicFillColor Color
1149
+ */
1150
+ public setGraphicPreferredAffiliationColors(friendlyGraphicLineColor: Color,
1151
+ hostileGraphicLineColor: Color,
1152
+ neutralGraphicLineColor: Color,
1153
+ unknownGraphicLineColor: Color,
1154
+ friendlyGraphicFillColor: Color,
1155
+ hostileGraphicFillColor: Color,
1156
+ neutralGraphicFillColor: Color,
1157
+ unknownGraphicFillColor: Color): void {
1158
+
1159
+
1160
+ this.setFriendlyGraphicLineColor(friendlyGraphicLineColor);
1161
+ this.setHostileGraphicLineColor(hostileGraphicLineColor);
1162
+ this.setNeutralGraphicLineColor(neutralGraphicLineColor);
1163
+ this.setUnknownGraphicLineColor(unknownGraphicLineColor);
1164
+ this.setFriendlyGraphicFillColor(friendlyGraphicFillColor);
1165
+ this.setHostileGraphicFillColor(hostileGraphicFillColor);
1166
+ this.setNeutralGraphicFillColor(neutralGraphicFillColor);
1167
+ this.setUnknownGraphicFillColor(unknownGraphicFillColor);
1168
+ }
1169
+
1170
+ /**
1171
+ * Set the preferred line and fill affiliation color for units and tactical graphics.
1172
+ *
1173
+ * @param friendlyUnitLineColor Color like Color(255, 255, 255). Set to null to ignore setting
1174
+ * @param hostileUnitLineColor Color
1175
+ * @param neutralUnitLineColor Color
1176
+ * @param unknownUnitLineColor Color
1177
+ * @param friendlyUnitFillColor Color
1178
+ * @param hostileUnitFillColor Color
1179
+ * @param neutralUnitFillColor Color
1180
+ * @param unknownUnitFillColor Color
1181
+ */
1182
+ public setUnitPreferredAffiliationColors(friendlyUnitLineColor: Color,
1183
+ hostileUnitLineColor: Color,
1184
+ neutralUnitLineColor: Color,
1185
+ unknownUnitLineColor: Color,
1186
+ friendlyUnitFillColor: Color,
1187
+ hostileUnitFillColor: Color,
1188
+ neutralUnitFillColor: Color,
1189
+ unknownUnitFillColor: Color): void {
1190
+
1191
+ this.setFriendlyUnitLineColor(friendlyUnitLineColor);
1192
+ this.setHostileUnitLineColor(hostileUnitLineColor);
1193
+ this.setNeutralUnitLineColor(neutralUnitLineColor);
1194
+ this.setUnknownUnitLineColor(unknownUnitLineColor);
1195
+ this.setFriendlyUnitFillColor(friendlyUnitFillColor);
1196
+ this.setHostileUnitFillColor(hostileUnitFillColor);
1197
+ this.setNeutralUnitFillColor(neutralUnitFillColor);
1198
+ this.setUnknownUnitFillColor(unknownUnitFillColor);
1199
+ }
1200
+
1201
+ }