@armyc2.c5isr.renderer/mil-sym-ts
Version:
MIL-STD-2525 D/E symbol rendering TypeScript library
1,562 lines (1,561 loc) • 269 kB
text/typescript
//#region src/main/ts/armyc2/c5isr/graphics2d/BasicTypes.d.ts
type int = number;
type float = number;
type double = number;
//#endregion
//#region src/main/ts/armyc2/c5isr/JavaLineArray/POINT2.d.ts
/**
* Class to provide a Point object with a linestyle to facilitate drawing.
*
*/
declare class POINT2 {
x: double;
y: double;
style: int;
segment: int;
constructor();
constructor(pt: POINT2);
constructor(x: double, y: double);
constructor(x: double, y: double, style: int);
constructor(x: double, y: double, segment: int, style: int);
getX(): number;
getY(): number;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/graphics2d/Point2D.d.ts
/**
* The <code>Point2D</code> class defines a point representing a location in
*
* <p>
* This class is only the abstract superclass for all objects that store a 2D
* coordinate. The actual storage representation of the coordinates is left to
* the subclass.
*
* @author Jim Graham
* @since 1.2
*/
declare class Point2D {
/**
* The X coordinate of this <code>Point2D</code>.
*
* @since 1.2
*/
x: double;
/**
* The Y coordinate of this <code>Point2D</code>.
*
* @since 1.2
*/
y: double;
/**
* Constructs and initializes a <code>Point2D</code> with coordinates
* (0, 0).
*
* @since 1.2
*/
constructor();
/**
* add the constructor
* @param pt
*/
constructor(pt: POINT2);
/**
* Constructs and initializes a <code>Point2D</code> with the specified
* coordinates.
*
* @param x
* the X coordinate of the newly constructed
* <code>Point2D</code>
* @param y
* the Y coordinate of the newly constructed
* <code>Point2D</code>
* @since 1.2
*/
constructor(x: double, y: double);
/**
* {@inheritDoc}
*
* @since 1.2
*/
getX(): double;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getY(): double;
/**
* Returns a <code>String</code> that represents the value of this
* <code>Point2D</code>.
*
* @return a string representation of this <code>Point2D</code>.
* @since 1.2
*/
toString(): string;
clone(): Point2D;
private static readonly serialVersionUID;
/**
* Sets the location of this <code>Point2D</code> to the same coordinates as
* the specified <code>Point2D</code> object.
*
* @param p
* the specified <code>Point2D</code> to which to set this
* <code>Point2D</code>
* @since 1.2
*/
setLocation(p: Point2D): void;
/**
* Sets the location of this <code>Point2D</code> to the specified
* <code>double</code> coordinates.
*
* @param x
* the new X coordinate of this {Point2D}
* @param y
* the new Y coordinate of this {Point2D}
* @since 1.2
*/
setLocation(x: double, y: double): void;
/**
* Returns the square of the distance between two points.
*
* @param x1
* the X coordinate of the first specified point
* @param y1
* the Y coordinate of the first specified point
* @param x2
* the X coordinate of the second specified point
* @param y2
* the Y coordinate of the second specified point
* @return the square of the distance between the two sets of specified
* coordinates.
* @since 1.2
*/
static distanceSq(x1: double, y1: double, x2: double, y2: double): double;
/**
* Returns the distance between two points.
*
* @param x1
* the X coordinate of the first specified point
* @param y1
* the Y coordinate of the first specified point
* @param x2
* the X coordinate of the second specified point
* @param y2
* the Y coordinate of the second specified point
* @return the distance between the two sets of specified coordinates.
* @since 1.2
*/
static distance(x1: double, y1: double, x2: double, y2: double): double;
/**
* Returns the distance from this <code>Point2D</code> to
* a specified point.
*
* @param px the X coordinate of the specified point to be measured
* against this <code>Point2D</code>
* @param py the Y coordinate of the specified point to be measured
* against this <code>Point2D</code>
* @return the distance between this <code>Point2D</code>
* and a specified point.
* @since 1.2
*/
distance(px: double, py: double): number;
/**
* Determines whether or not two points are equal. Two instances of
* <code>Point2D</code> are equal if the values of their <code>x</code> and
* <code>y</code> member fields, representing their position in the
* coordinate space, are the same.
*
* @param obj
* an object to be compared with this <code>Point2D</code>
* @return <code>true</code> if the object to be compared is an instance of
* <code>Point2D</code> and has the same values; <code>false</code>
* otherwise.
* @since 1.2
*/
equals(obj: Point2D): boolean;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/graphics2d/Point.d.ts
/**
*
*
*/
declare class Point {
x: number;
y: number;
constructor();
constructor(x1: number, y1: number);
getX(): number;
getY(): number;
setLocation(x1: number, y1: number): void;
/**
* Returns a string representing one of the shape types
* from "armyc2.c2sd.renderer.so.ShapeTypes"
* @returns {String}
*/
getShapeType(): string;
/**
* move x & y by specified amounts.
* @param {Number} x shift x point by this value
* @param {Number} y shift y point by this value
* @returns {void}
*/
shift(x: number, y: number): void;
/**
* @returns {String} like "{x:#,y:#}"
*/
toStringFormatted(): string;
/**
* Makes a copy of this point object.
* @returns {armyc2.c2sd.renderer.so.Point} Copy of original point.
*/
clone(): Point;
toPoint2D(): Point2D;
/**
* @param {OffscreenCanvasRenderingContext2D} context object from html5 canvas
* @returns {void}
*/
setPath(context: OffscreenCanvasRenderingContext2D): void;
/**
* @param {context} context object from html5 canvas
* @returns {void}
*/
stroke(context: OffscreenCanvasRenderingContext2D): void;
/**
* @param {context} context object from html5 canvas
* @returns {void}
*/
fill(context: OffscreenCanvasRenderingContext2D): void;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/graphics2d/Line2D.d.ts
/**
* This <code>Line2D</code> represents a line segment in {@code (x,y)}
* coordinate space. This class, like all of the Java 2D API, uses a default
* coordinate system called <i>user space</i> in which the y-axis values
* increase downward and x-axis values increase to the right. For more
* information on the user space coordinate system, see the <a href=
* "http://java.sun.com/j2se/1.3/docs/guide/2d/spec/j2d-intro.fm2.html#61857">
* Coordinate Systems</a> section of the Java 2D Programmer's Guide.
* <p>
* This class is only the abstract superclass for all objects that store a 2D
* line segment. The actual storage representation of the coordinates is left to
* the subclass.
*
* @author Jim Graham
* @since 1.2
*/
declare class Line2D {
intersectsLine(edge: Line2D): boolean;
static linesIntersect(x1: double, y1: double, x2: double, y2: double, x3: double, y3: double, x4: double, y4: double): boolean;
/**
* The X coordinate of the start point of the line segment.
*
* @since 1.2
* @serial
*/
x1: double;
/**
* The Y coordinate of the start point of the line segment.
*
* @since 1.2
* @serial
*/
y1: double;
/**
* The X coordinate of the end point of the line segment.
*
* @since 1.2
* @serial
*/
x2: double;
/**
* The Y coordinate of the end point of the line segment.
*
* @since 1.2
* @serial
*/
y2: double;
/**
* Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
*
* @since 1.2
*/
constructor();
/**
* Constructs and initializes a <code>Line2D</code> from the specified
* <code>Point2D</code> objects.
*
* @param p1
* the start <code>Point2D</code> of this line segment
* @param p2
* the end <code>Point2D</code> of this line segment
* @since 1.2
*/
constructor(p1: Point2D, p2: Point2D);
/**
* Constructs and initializes a <code>Line2D</code> from the specified
* coordinates.
*
* @param x1
* the X coordinate of the start point
* @param y1
* the Y coordinate of the start point
* @param x2
* the X coordinate of the end point
* @param y2
* the Y coordinate of the end point
* @since 1.2
*/
constructor(x1: double, y1: double, x2: double, y2: double);
/**
* {@inheritDoc}
*
* @since 1.2
*/
getX1(): double;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getY1(): double;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getP1(): Point2D;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getX2(): double;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getY2(): double;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getP2(): Point2D;
/**
* {@inheritDoc}
*
* @since 1.2
*/
getBounds2D(): Rectangle2D;
private static readonly serialVersionUID;
/**
* Sets the location of the end points of this <code>Line2D</code> to the
* same as those end points of the specified <code>Line2D</code>.
*
* @param l
* the specified <code>Line2D</code>
* @since 1.2
*/
setLine(l: Line2D): void;
/**
* Sets the location of the end points of this <code>Line2D</code> to the
* specified <code>Point2D</code> coordinates.
*
* @param p1
* the start <code>Point2D</code> of the line segment
* @param p2
* the end <code>Point2D</code> of the line segment
* @since 1.2
*/
setLine(p1: Point2D, p2: Point2D): void;
/**
* Sets the location of the end points of this <code>Line2D</code> to the
* specified double coordinates.
*
* @param x1
* the X coordinate of the start point
* @param y1
* the Y coordinate of the start point
* @param x2
* the X coordinate of the end point
* @param y2
* the Y coordinate of the end point
* @since 1.2
*/
setLine(x1: double, y1: double, x2: double, y2: double): void;
/**
* Returns an indicator of where the specified point {@code (px,py)} lies
* with respect to the line segment from {@code (x1,y1)} to {@code (x2,y2)}.
* The return value can be either 1, -1, or 0 and indicates in which
* direction the specified line must pivot around its first end point,
* {@code (x1,y1)}, in order to point at the specified point {@code (px,py)}
* .
* <p>
* A return value of 1 indicates that the line segment must turn in the
* direction that takes the positive X axis towards the negative Y axis. In
* the default coordinate system used by Java 2D, this direction is
* counterclockwise.
* <p>
* A return value of -1 indicates that the line segment must turn in the
* direction that takes the positive X axis towards the positive Y axis. In
* the default coordinate system, this direction is clockwise.
* <p>
* A return value of 0 indicates that the point lies exactly on the line
* segment. Note that an indicator value of 0 is rare and not useful for
* determining colinearity because of floating point rounding issues.
* <p>
* If the point is colinear with the line segment, but not between the end
* points, then the value will be -1 if the point lies "beyond {@code
* (x1,y1)}" or 1 if the point lies "beyond {@code (x2,y2)}".
*
* @param x1
* the X coordinate of the start point of the specified line
* segment
* @param y1
* the Y coordinate of the start point of the specified line
* segment
* @param x2
* the X coordinate of the end point of the specified line
* segment
* @param y2
* the Y coordinate of the end point of the specified line
* segment
* @param px
* the X coordinate of the specified point to be compared with
* the specified line segment
* @param py
* the Y coordinate of the specified point to be compared with
* the specified line segment
* @return an integer that indicates the position of the third specified
* coordinates with respect to the line segment formed by the first
* two specified coordinates.
* @since 1.2
*/
static relativeCCW(x1: double, y1: double, x2: double, y2: double, px: double, py: double): int;
/**
* Returns an indicator of where the specified point {@code (px,py)} lies
* with respect to this line segment. See the method comments of
* {@link #relativeCCW(double, double, double, double, double, double)} to
* interpret the return value.
*
* @param px
* the X coordinate of the specified point to be compared with
* this <code>Line2D</code>
* @param py
* the Y coordinate of the specified point to be compared with
* this <code>Line2D</code>
* @return an integer that indicates the position of the specified
* coordinates with respect to this <code>Line2D</code>
* @see #relativeCCW(double, double, double, double, double, double)
* @since 1.2
*/
relativeCCW(px: double, py: double): int;
/**
* Returns the square of the distance from a point to a line. The distance
* measured is the distance between the specified point and the closest
* point on the infinitely-extended line defined by the specified
* coordinates. If the specified point intersects the line, this method
* returns 0.0.
*
* @param x1
* the X coordinate of the start point of the specified line
* @param y1
* the Y coordinate of the start point of the specified line
* @param x2
* the X coordinate of the end point of the specified line
* @param y2
* the Y coordinate of the end point of the specified line
* @param px
* the X coordinate of the specified point being measured against
* the specified line
* @param py
* the Y coordinate of the specified point being measured against
* the specified line
* @return a double value that is the square of the distance from the
* specified point to the specified line.
* @since 1.2
*/
static ptLineDistSq(x1: double, y1: double, x2: double, y2: double, px: double, py: double): double;
/**
* Returns the distance from a point to a line. The distance measured is the
* distance between the specified point and the closest point on the
* infinitely-extended line defined by the specified coordinates. If the
* specified point intersects the line, this method returns 0.0.
*
* @param x1
* the X coordinate of the start point of the specified line
* @param y1
* the Y coordinate of the start point of the specified line
* @param x2
* the X coordinate of the end point of the specified line
* @param y2
* the Y coordinate of the end point of the specified line
* @param px
* the X coordinate of the specified point being measured against
* the specified line
* @param py
* the Y coordinate of the specified point being measured against
* the specified line
* @return a double value that is the distance from the specified point to
* the specified line.
* @since 1.2
*/
static ptLineDist(x1: double, y1: double, x2: double, y2: double, px: double, py: double): double;
/**
* Returns the square of the distance from a specified <code>Point2D</code>
* to this line. The distance measured is the distance between the specified
* point and the closest point on the infinitely-extended line defined by
* this <code>Line2D</code>. If the specified point intersects the line,
* this method returns 0.0.
*
* @param pt
* the specified <code>Point2D</code> being measured against this
* line
* @return a double value that is the square of the distance from a
* specified <code>Point2D</code> to the current line.
* @since 1.2
*/
ptLineDistSq(pt: Point2D): double;
/**
* Returns the square of the distance from a point to this line. The
* distance measured is the distance between the specified point and the
* closest point on the infinitely-extended line defined by this
* <code>Line2D</code>. If the specified point intersects the line, this
* method returns 0.0.
*
* @param px
* the X coordinate of the specified point being measured against
* this line
* @param py
* the Y coordinate of the specified point being measured against
* this line
* @return a double value that is the square of the distance from a
* specified point to the current line.
* @since 1.2
*/
ptLineDistSq(px: double, py: double): double;
/**
* Returns the distance from a <code>Point2D</code> to this line. The
* distance measured is the distance between the specified point and the
* closest point on the infinitely-extended line defined by this
* <code>Line2D</code>. If the specified point intersects the line, this
* method returns 0.0.
*
* @param pt
* the specified <code>Point2D</code> being measured
* @return a double value that is the distance from a specified
* <code>Point2D</code> to the current line.
* @since 1.2
*/
ptLineDist(pt: Point2D): double;
/**
* Returns the distance from a point to this line. The distance measured is
* the distance between the specified point and the closest point on the
* infinitely-extended line defined by this <code>Line2D</code>. If the
* specified point intersects the line, this method returns 0.0.
*
* @param px
* the X coordinate of the specified point being measured against
* this line
* @param py
* the Y coordinate of the specified point being measured against
* this line
* @return a double value that is the distance from a specified point to the
* current line.
* @since 1.2
*/
ptLineDist(px: double, py: double): double;
/**
* Tests if a given <code>Point2D</code> is inside the boundary of this
* <code>Line2D</code>. This method is required to implement the
* {@link Shape} interface, but in the case of <code>Line2D</code> objects
* it always returns <code>false</code> since a line contains no area.
*
* @param p
* the specified <code>Point2D</code> to be tested
* @return <code>false</code> because a <code>Line2D</code> contains no
* area.
* @since 1.2
*/
contains(p: Point2D): boolean;
/**
* Tests if the interior of this <code>Line2D</code> entirely contains the
* specified <code>Rectangle2D</code>. This method is required to implement
* the <code>Shape</code> interface, but in the case of <code>Line2D</code>
* objects it always returns <code>false</code> since a line contains no
* area.
*
* @param r
* the specified <code>Rectangle2D</code> to be tested
* @return <code>false</code> because a <code>Line2D</code> contains no
* area.
* @since 1.2
*/
contains(r: Rectangle2D): boolean;
/**
* Tests if a specified coordinate is inside the boundary of this
* <code>Line2D</code>. This method is required to implement the
* {@link Shape} interface, but in the case of <code>Line2D</code> objects
* it always returns <code>false</code> since a line contains no area.
*
* @param x
* the X coordinate of the specified point to be tested
* @param y
* the Y coordinate of the specified point to be tested
* @return <code>false</code> because a <code>Line2D</code> contains no
* area.
* @since 1.2
*/
contains(x: double, y: double): boolean;
/**
* Tests if the interior of this <code>Line2D</code> entirely contains the
* specified set of rectangular coordinates. This method is required to
* implement the <code>Shape</code> interface, but in the case of
* <code>Line2D</code> objects it always returns false since a line contains
* no area.
*
* @param x
* the X coordinate of the upper-left corner of the specified
* rectangular area
* @param y
* the Y coordinate of the upper-left corner of the specified
* rectangular area
* @param w
* the width of the specified rectangular area
* @param h
* the height of the specified rectangular area
* @return <code>false</code> because a <code>Line2D</code> contains no
* area.
* @since 1.2
*/
contains(x: double, y: double, w: double, h: double): boolean;
/**
* Creates a new object of the same class as this object.
*
* @return a clone of this instance.
* @exception OutOfMemoryError
* if there is not enough memory.
* @see java.lang.Cloneable
* @since 1.2
*/
clone(): Line2D | null;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.d.ts
/**
*
*
*/
declare class Rectangle2D {
x: double;
y: double;
width: double;
height: double;
add(newx: double, newy: double): void;
createIntersection(r: Rectangle2D): Rectangle2D | null;
createUnion(r: Rectangle2D): Rectangle2D;
getX(): double;
getY(): double;
getCenterX(): double;
getCenterY(): double;
getMinX(): double;
getMinY(): double;
getMaxX(): double;
getMaxY(): double;
getHeight(): double;
getWidth(): double;
contains(rect: Rectangle2D): boolean;
contains(pt: Point2D): boolean;
contains(x1: double, y1: double): boolean;
contains(x: int, y: int, width: int, height: int): boolean;
intersects(rect: Rectangle2D): boolean;
intersects(x1: int, y1: int, width1: int, height1: int): boolean;
intersectsLine(line: Line2D): boolean;
isEmpty(): boolean;
setRect(r: Rectangle2D): void;
setRect(x1: double, y1: double, width1: double, height1: double): void;
grow(size: int): void;
grow(h: int, v: int): void;
stroke(context: OffscreenCanvasRenderingContext2D): void;
fill(context: OffscreenCanvasRenderingContext2D): void;
clone(): Rectangle2D;
/**
* Will merge the bounds of two rectangle.
* @param rect
*/
union(rect: Rectangle2D): void;
constructor();
constructor(x1: double, y1: double, width1: double, height1: double);
/**
*
* @param stroke named color or hex color
* @param strokeWidth width of line in # of pixels
* @param fill named color or hex color
* @returns
*/
toSVGElement(stroke: string | null, strokeWidth: number, fill: string | null): string;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/graphics2d/Font.d.ts
/**
*
*
*/
declare class Font {
static readonly PLAIN: number;
static readonly BOLD: number;
static readonly ITALIC: number;
protected _size: number;
protected _text: string;
protected _type: number;
constructor(s: string, type: number, size: number);
getSize(): number;
getName(): string;
getType(): number;
isBold(): boolean;
getTypeString(): string;
static getTypeString(type: number): string;
static getTypeInt(type: string): number;
toString(): string;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/Color.d.ts
/**
* Integer based Color class with utility functions
*/
declare class Color {
/**
* The color white. In the default sRGB space.
*/
static readonly white: Color;
/**
* The color white. In the default sRGB space.
*
*/
static readonly WHITE: Color;
/**
* The color light gray. In the default sRGB space.
*/
static readonly lightGray: Color;
/**
* The color light gray. In the default sRGB space.
*
*/
static readonly LIGHT_GRAY: Color;
/**
* The color gray. In the default sRGB space.
*/
static readonly gray: Color;
/**
* The color gray. In the default sRGB space.
*
*/
static readonly GRAY: Color;
/**
* The color dark gray. In the default sRGB space.
*/
static readonly darkGray: Color;
/**
* The color dark gray. In the default sRGB space.
*
*/
static readonly DARK_GRAY: Color;
/**
* The color black. In the default sRGB space.
*/
static readonly black: Color;
/**
* The color black. In the default sRGB space.
*
*/
static readonly BLACK: Color;
/**
* The color red. In the default sRGB space.
*/
static readonly red: Color;
/**
* The color red. In the default sRGB space.
*
*/
static readonly RED: Color;
/**
* The color pink. In the default sRGB space.
*/
static readonly pink: Color;
/**
* The color pink. In the default sRGB space.
*
*/
static readonly PINK: Color;
/**
* The color orange. In the default sRGB space.
*/
static readonly orange: Color;
/**
* The color orange. In the default sRGB space.
*
*/
static readonly ORANGE: Color;
/**
* The color yellow. In the default sRGB space.
*/
static readonly yellow: Color;
/**
* The color yellow. In the default sRGB space.
*
*/
static readonly YELLOW: Color;
/**
* The color green. In the default sRGB space.
*/
static readonly green: Color;
/**
* The color green. In the default sRGB space.
*
*/
static readonly GREEN: Color;
/**
* The color magenta. In the default sRGB space.
*/
static readonly magenta: Color;
/**
* The color magenta. In the default sRGB space.
*
*/
static readonly MAGENTA: Color;
/**
* The color cyan. In the default sRGB space.
*/
static readonly cyan: Color;
/**
* The color cyan. In the default sRGB space.
*
*/
static readonly CYAN: Color;
/**
* The color blue. In the default sRGB space.
*/
static readonly blue: Color;
/**
* The color blue. In the default sRGB space.
*
*/
static readonly BLUE: Color;
private _A;
private _R;
private _G;
private _B;
/**
*
* @param hexValue - String representing hex value (formatted "0xRRGGBB"
* i.e. "0xFFFFFF") OR formatted "0xAARRGGBB" i.e. "0x00FFFFFF" for a color
* with an alpha value I will also put up with "RRGGBB" and "AARRGGBB"
* without the starting "0x" or "#"
* @return
*/
private getColorsFromHexString;
constructor();
constructor(color: Color);
constructor(color: number);
constructor(hexString: string);
constructor(R: number, G: number, B: number);
constructor(R: number, G: number, B: number, A: number);
static makeColor(r: number, g: number, b: number): Color;
toRGB(): number;
toARGB(): number;
private convert;
/**
* A hex string in the format of AARRGGBB
* @param {Boolean} withAlpha Optional, default is true. If set to false,
* will return a hex string without alpha values.
*/
toHexString(withAlpha?: boolean): string;
toString(): string;
getRed(): number;
getGreen(): number;
getBlue(): number;
getAlpha(): number;
/**
*
* @param alpha 0-255
*/
setAlpha(alpha: number): void;
toInt(): number;
/**
* get alpha value from uint
* */
private getAlphaFromColor;
/**
* get red value from uint
* */
private getRedFromColor;
/**
* get green value from uint
* */
private getGreenFromColor;
/**
* get blue value from uint
* */
private getBlueFromColor;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.d.ts
/**
* Default Affiliation Colors for the symbols
*
*/
declare class AffiliationColors {
static FriendlyUnitFillColor: Color;
static HostileUnitFillColor: Color;
static NeutralUnitFillColor: Color;
static UnknownUnitFillColor: Color;
static SuspectUnitFillColor: Color;
static FriendlyGraphicFillColor: Color;
static HostileGraphicFillColor: Color;
static NeutralGraphicFillColor: Color;
static UnknownGraphicFillColor: Color;
static SuspectGraphicFillColor: Color;
static FriendlyUnitLineColor: Color;
static HostileUnitLineColor: Color;
static NeutralUnitLineColor: Color;
static UnknownUnitLineColor: Color;
static SuspectUnitLineColor: Color;
static FriendlyGraphicLineColor: Color;
static HostileGraphicLineColor: Color;
static NeutralGraphicLineColor: Color;
static UnknownGraphicLineColor: Color;
static SuspectGraphicLineColor: Color;
static ObstacleGreenDark: Color;
static ObstacleGreen: Color;
static WeatherRed: Color;
static WeatherBlue: Color;
static WeatherPurpleDark: Color;
static WeatherPurpleLight: Color;
static WeatherBrownDark: Color;
static WeatherBrownLight: Color;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.d.ts
/**
* Units of Measure to be used with {@link MilStdAttributes#DistanceUnits}
* Default is meters.
*/
declare class DistanceUnit {
private static readonly FEET_PER_METER;
private static readonly FLIGHT_LEVEL_PER_METER;
readonly conversionFactor: double;
readonly label: string;
constructor(conversionFactor: double, label: string);
static parse(distanceUnitText: string): DistanceUnit | null;
toAttribute(): string;
static METERS: DistanceUnit;
static FEET: DistanceUnit;
static FLIGHT_LEVEL: DistanceUnit;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.d.ts
/**
* Port of java.util.logging.Level class
*/
declare class LogLevel {
/**
* OFF is a special level that can be used to turn off logging.
* This level is initialized to <CODE>Integer.MAX_VALUE</CODE>.
*/
static OFF: LogLevel;
/**
* SEVERE is a message level indicating a serious failure.
* <p>
* In general SEVERE messages should describe events that are
* of considerable importance and which will prevent normal
* program execution. They should be reasonably intelligible
* to end users and to system administrators.
* This level is initialized to <CODE>1000</CODE>.
*/
static SEVERE: LogLevel;
/**
* WARNING is a message level indicating a potential problem.
* <p>
* In general WARNING messages should describe events that will
* be of interest to end users or system managers, or which
* indicate potential problems.
* This level is initialized to <CODE>900</CODE>.
*/
static WARNING: LogLevel;
/**
* INFO is a message level for informational messages.
* <p>
* Typically INFO messages will be written to the console
* or its equivalent. So the INFO level should only be
* used for reasonably significant messages that will
* make sense to end users and system administrators.
* This level is initialized to <CODE>800</CODE>.
*/
static INFO: LogLevel;
/**
* CONFIG is a message level for static configuration messages.
* <p>
* CONFIG messages are intended to provide a variety of static
* configuration information, to assist in debugging problems
* that may be associated with particular configurations.
* For example, CONFIG message might include the CPU type,
* the graphics depth, the GUI look-and-feel, etc.
* This level is initialized to <CODE>700</CODE>.
*/
static CONFIG: LogLevel;
/**
* FINE is a message level providing tracing information.
* <p>
* All of FINE, FINER, and FINEST are intended for relatively
* detailed tracing. The exact meaning of the three levels will
* vary between subsystems, but in general, FINEST should be used
* for the most voluminous detailed output, FINER for somewhat
* less detailed output, and FINE for the lowest volume (and
* most important) messages.
* <p>
* In general the FINE level should be used for information
* that will be broadly interesting to developers who do not have
* a specialized interest in the specific subsystem.
* <p>
* FINE messages might include things like minor (recoverable)
* failures. Issues indicating potential performance problems
* are also worth logging as FINE.
* This level is initialized to <CODE>500</CODE>.
*/
static FINE: LogLevel;
/**
* FINER indicates a fairly detailed tracing message.
* By default logging calls for entering, returning, or throwing
* an exception are traced at this level.
* This level is initialized to <CODE>400</CODE>.
*/
static FINER: LogLevel;
/**
* FINEST indicates a highly detailed tracing message.
* This level is initialized to <CODE>300</CODE>.
*/
static FINEST: LogLevel;
/**
* ALL indicates that all messages should be logged.
* This level is initialized to <CODE>Integer.MIN_VALUE</CODE>.
*/
static ALL: LogLevel;
private name;
private value;
constructor(name: string, value: number);
intValue(): number;
getName(): string;
toString(): string;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.d.ts
/**
* Error Logging class for Renderer
*
*/
declare class ErrorLogger {
static readonly LoggerName: string;
private static _level;
private static _LoggingEnabled;
private static dateFormatOptions;
/**
* True if logging is enabled
* @return {@link Boolean}
*/
static getLoggingStatus(): boolean;
/**
* Takes a throwable and puts it's stacktrace into a string.
* @param error {@link Error}
* @return {@link String}
*/
static getStackTrace(error: Error): string;
/**
* TRUE: Creates a file handler that will log message to a file.
* FALSE: logging just goes to console.
* @param enable {@link Boolean}
*/
static EnableLogging(enable: boolean): void;
/**
* Folder location to store the log file.
* Defaults to "System.getProperty("user.dir")"
* @param path {@link String}
* @deprecated
*/
static setLoggingPath(path: string): void;
/**
* clears log files that are beyond a passed number of days old
* @param DaysOld {@link Integer}
* @deprecated
*/
static CleanupOldFiles(DaysOld: number): void;
/**
* Set minimum level at which an item can be logged.
* In descending order:
* Severe
* Warning
* Info
* Config
* Fine
* Finer
* Finest
* @param newLevel {@link Level}
*/
static setLevel(newLevel: LogLevel): void;
/**
* Set minimum level at which an item can be logged.
* In descending order:
* Severe
* Warning
* Info
* Config
* Fine
* Finer
* Finest
* @param newLevel {@link Level}
* @param setConsoleHandler logger could be set to FINE but the console
* handler could be set to INFO. In that case, anything logged at FINE
* wouldn't show because it'd get blocked by the console handler. Set to
* "true" to make sure the console handler will let you log at the level
* you want. If you're only concerned with the log file, you can leave
* "false"
*/
static setLevel(newLevel: LogLevel, setConsoleHandler: boolean): void;
/**
* Specify whether or not this logger should send its output
* to it's parent Logger. This means that any LogRecords will
* also be written to the parent's Handlers, and potentially
* to its parent, recursively up the namespace.
* Defaults to true;
*
* @param useParentHandlers true if output is to be sent to the
* logger's parent.
*/
static setUseParentHandlers(useParentHandlers: boolean): void;
/**
* Gets the java.util.logging.Level that the logger is set to.
* @return {@link Level}
*/
static getLevel(): LogLevel;
/**
*
* @return {@link String}
* @deprecated
*/
private static getFileName;
/**
* Log a method entry.
* <p>
* This is a convenience method that can be used to log entry
* to a method. A LogRecord with message "ENTRY", log level
* FINER, and the given sourceMethod and sourceClass is logged.
* <p>
* @param sourceClass name of class that issued the logging request
* @param sourceMethod name of method that is being entered
*/
static Entering(sourceClass: string, sourceMethod: string): void;
/**
* Log a method entry, with one parameter.
* <p>
* This is a convenience method that can be used to log entry
* to a method. A LogRecord with message "ENTRY {0}", log level
* FINER, and the given sourceMethod, sourceClass, and parameter
* is logged.
* <p>
* @param sourceClass name of class that issued the logging request
* @param sourceMethod name of method that is being entered
* @param param1 parameter to the method being entered
*/
static Entering(sourceClass: string, sourceMethod: string, param1: any): void;
/**
* Log a method entry, with an array of parameters.
* <p>
* This is a convenience method that can be used to log entry
* to a method. A LogRecord with message "ENTRY" (followed by a
* format {N} indicator for each entry in the parameter array),
* log level FINER, and the given sourceMethod, sourceClass, and
* parameters is logged.
* <p>
* @param sourceClass name of class that issued the logging request
* @param sourceMethod name of method that is being entered
* @param params array of parameters to the method being entered
*/
static Entering(sourceClass: string, sourceMethod: string, params: any[]): void;
/**
* Log a method return.
* <p>
* This is a convenience method that can be used to log returning
* from a method. A LogRecord with message "RETURN", log level
* FINER, and the given sourceMethod and sourceClass is logged.
* <p>
* @param sourceClass name of class that issued the logging request
* @param sourceMethod name of the method
*/
static Exiting(sourceClass: string, sourceMethod: string): void;
/**
* Log a method return, with result object.
* <p>
* This is a convenience method that can be used to log returning
* from a method. A LogRecord with message "RETURN {0}", log level
* FINER, and the gives sourceMethod, sourceClass, and result
* object is logged.
* <p>
* @param sourceClass name of class that issued the logging request
* @param sourceMethod name of the method
* @param result Object that is being returned
*/
static Exiting(sourceClass: string, sourceMethod: string, result: any): void;
/**
* Defaults to Level.INFO
* @param message {@link String}
*/
static LogMessage(message: string): void;
/**
* Defaults to Level.INFO
* @param message {@link String}
* @param showMessageBox (@link {@link Boolean}
*/
static LogMessage(message: string, showMessageBox: boolean): void;
/**
*
* @param message {@link String}
* @param lvl {@link Level}
* @param showMessageBox {@link Boolean}
*/
static LogMessage(message: string, lvl: LogLevel, showMessageBox: boolean): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string, showMessageBox: boolean): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string, lvl: LogLevel): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string, lvl: LogLevel, showMessageBox: boolean): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string, lvl: LogLevel, param1: any, showMessageBox: boolean): void;
static LogMessage(sourceClass: string, sourceMethod: string, message: string, lvl: LogLevel, params: any[], showMessageBox: boolean): void;
static LogException(sourceClass: string, sourceMethod: string, exc: Error): void;
static LogException(sourceClass: string, sourceMethod: string, exc: Error, showMessageBox: boolean): void;
static LogException(sourceClass: string, sourceMethod: string, exc: Error, lvl: LogLevel): void;
static LogException(sourceClass: string, sourceMethod: string, exc: Error, lvl: LogLevel, showMessageBox: boolean): void;
static PrintList(list: Array<any>): string;
static PrintObjectMap(map: Map<string, any>): string;
static PrintStringMap(map: Map<string, string>): string;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.d.ts
/**
* Symbol attribute constants
*/
declare class MilStdAttributes {
/**
* Line color of the symbol. hex value.
*/
static readonly LineColor: string;
/**
* Fill color of the symbol. hex value
*/
static readonly FillColor: string;
/**
* Main color of internal icon. Only relevant to framed symbols. hex value
*/
static readonly IconColor: string;
/**
* size of the single point image
*/
static readonly PixelSize: string;
/**
* defaults to true
*/
static readonly KeepUnitRatio: string;
/**
* transparency value of the symbol with values from 0 - 255.
*/
static readonly Alpha: string;
/**
* outline the symbol, true/false
*/
static readonly OutlineSymbol: string;
/**
* specify and outline color rather than letting renderer picking
* the best contrast color. hex value
*/
static readonly OutlineColor: string;
/**
* just draws the core symbol
*/
static readonly DrawAsIcon: string;
/**
* Specifies the line width of the multipoint symbology
*/
static readonly LineWidth: string;
/**
* Specifies the color for text labels
*/
static readonly TextColor: string;
/**
* Specifies the color for the text background (color outline or fill)
*/
static readonly TextBackgroundColor: string;
/**
* If false, the renderer will create a bunch of little lines to create
* the "dash" effect (expensive but necessary for KML).
* If true, it will be on the user to create the dash effect using the
* DashArray from the Stroke object from the ShapeInfo object.
*/
static readonly UseDashArray: string;
/**
* The mode that altitude labels will be displayed in, the default value is AMSL.
*
* This value acts as a label, appending whatever string that is passed in to the end of the altitude units.
* Currently only effective for multi-point graphics.
*/
static readonly AltitudeMode: string;
/**
* At the moment, this refers to the optional range fan labels.
*/
static readonly HideOptionalLabels: string;
/**
* For internal use
*/
static readonly UsePatternFill: string;
/**
* For internal use
*/
static readonly PatternFillType: string;
/**
* The conversion factor and the label that you want all distances to display in. The conversion factor
* is converting from meters. The default unit is meters.<br><br>
*
* Must be in the form [conversionFactor],[label]. So for example converting to feet would be "3.28084,FT".
* The helper class {@link DistanceUnit} can be used.
*/
static readonly DistanceUnits: string;
/**
* The conversion factor and the label that you want all distances to display in.
* Conventionally, the conversion factor is converting from meters by default,
* but other values could be passed, like "1,KM" to use an unaltered value in kilometers.<br><br>
*
* Must be in the form [conversionFactor],[label]. So for example converting meters to feet would be "3.28084,FT".
* The helper class {@link DistanceUnit} can be used.
* Currently only effective for multi-point graphics.
*/
static readonly AltitudeUnits: string;
/**
* If the engagement/target amplifier bar is to be used to designate targets, non-targets, and
* pruned or expired targets, a different coloring schema shall be used. Hostile tracks which
* are deemed targets shall have a red bar (RGB: 255, 0, 0) to indicate target. For hostile
* tracks deemed to be non-targets, white (RGB: 255, 255, 255) should be used to indicate non
* target. Finally, for hostile tracks which have been pruned or have expired shall be colored
* orange (RGB: 255, 120, 0).
* This attribute expects a hex string for the color
*/
static readonly EngagementBarColor: string;
/**
* Multipoint features and patterns scale with line width ({@link MilStdAttributes#LineWidth}).
* {@code PatternScale} is the ratio of how much to increase features and patterns by with line width.
* default value is {@link RendererSettings#getPatternScale()}
*/
static readonly PatternScale: string;
/**
* like "arial"
*/
static readonly FontFamily: string;
/**
* Like Font.BOLD
*/
static readonly FontStyle: string;
static readonly FontSize: string;
/**
* Strict ("0") for always placing their labels in the specified location
* even if there's empty space from other labels that weren't populated
* Flexible ("1") to collapse label vertically to the center to eliminate
* empty space from labels that weren't populated.
* Does not apply to Control Measures or METOCS
* Set with values like:
* RendererSettings.ModifierPlacement_STRICT ("0")
* RendererSettings.ModifierPlacement_FLEXIBLE ("1")
*/
static readonly ModifierPlacement: string;
/**
* No Longer relevant
* @return
* @deprecated see {@link GetAttributesList()}
*/
static GetModifierList(): Array<string>;
static GetAttributesList(symbolID: string): Array<string>;
/**
* @param attribute constant like MilStdAttributes.LineColor
* @return attribute name based on attribute constants
*/
static getAttributeName(attribute: string): string;
/**
* Takes a string representation of an attribute and returns the appropriate int key value
* @param attribute "LINECOLOR" will return MilStdAtttributes.LineColor
* @return number value representing Attribute constant.
*/
static getAttributeKey(attribute: string): string | null;
}
//#endregion
//#region src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.d.ts
/**
* Modifier Constants to be used as keys in the modifiers map
*/
declare class Modifiers {
/**
* <pre>
* Symbol Icon
* The innermost part of a symbol, comprised of an icon and optional modifiers, that represents a joint military object (see 5.3.4).
* Format: Graphic
* Symbol Set: All
* Remarks: Determined by SIDC positions 11-20.
* </pre>
*/
static readonly A_SYMBOL_ICON: string;
/**
* <pre>
* Echelon
* An amplifier in a unit symbol that identifies command level (see 5.3.7.1 and table VII).
* Format: Graphic
* Symbol Set: All
* Remarks: Determined by SIDC positions 9-10.
* </pre>
*/
static readonly B_ECHELON: string;
/**
* <pre>
* Quantity
* An amplifier in an equipment symbol that identifies the number of items present.
* Examples include:
* 350 Beds 50 Gallons
* Format:
* Alphanumeric - {1,19}
* [#########] [XXXXXXXXXX]
* Symbol Set: 10, 11, 15, 25, 27, 60
* Remarks: Two-part composite field.
* Where # is the numeric value [1-999999999], and X is the unit of measure.
* Note: There should be a space between the numeric and the unit of measure values.
* </pre>
*/
static readonly C_QUANTITY: string;
/**
* <pre>
* Task Force Indicator
* An amplifier that identifies a unit or activities symbol as a task force (see 5.3.7.2 and figure 14).
* Format: Graphic
* Symbol Set: 10
* Remarks: Determined by SIDC position 8.
* </pre>
*/
static readonly D_TASK_FORCE_INDICATOR: string;
/**
* <pre>
* Frame Shape Modifier
* A graphic modifier that displays standard identity, battle dimension, or exercise
* amplifying descriptors of an object (see 5.3.1 and table II).
* Format: Graphic
* Symbol Set: ALL BUT 25,45,46,47
* Remarks: 2525C, not processed as a modifier in 2525D+
* </pre>
*/
static readonly E_FRAME_SHAPE_MODIFIER: string;
/**
* <pre>
* Reinforced or Reduced
* An amplifier in a unit symbol that displays (+) for reinforced, (-) for reduced, (<u>+</u>) reinforced and reduced.
* Format: Alphanumeric - {1,1}
* Symbol Set: 10
* Remarks:
* </pre>
*/
static readonly F_REINFORCED_REDUCED: string;
/**
* <pre>
* Staff Comments
* An amplifier for units, equipment and installations; content is implementation specific.
* Format: Alphanumeric - {1,20}
* Symbol Set: 01, 05, 10, 15, 20, 27, 30, 35, 40
* Remarks:
* </pre>
*/
static readonly G_STAFF_COMMENTS: string;
/**
* <pre>
* Additional Information
* An amplifier for units, equipment and installations; content is implementation specific.
* Format: Alphanumeric - {1,20}
* Symbol Set: ALL
* Remarks:
* </pre>
*/
static readonly H_ADDITIONAL_INFO_1: string;
/**
* <pre>
* Unlisted Point Information
* An alphanumeric text amplifier used to provide an up to a three-character letter field acronym to describe a point that is not already listed.
* Format: Alphanumeric - {1,3}
* Symbol Set: 25
* Remarks: Only used with Action Points (General) control measure. SIDC 130100.
* </pre>
*/
static readonly H1_ADDITIONAL_INFO_2: string;
/**
* A text modifier for tactical graphics; content is
* implementation specific.
* CM: P,L,A,N,B/C,R/N
* Length: 20
* @deprecated 2525C
*/
static readonly H2_ADDITIONAL_INFO_3: string;
/**
* <pre>
* Evaluation Rating
* An amplifier that consists of a one-letter reliability rating and a one-number credibility rating. (See ATP 2-33.4)
* Format: Alphanumeric - {2,2} [X][#]
* Symbol Set: 10, 15, 20,27, 40
* Remarks:
*
* Reliability Ratings:
* A-completely reliable
* B-usually reliable
* C-fairly reliable
* D-not usually reliable
* E-unreliable
* F-reliability cannot be judged
*
* Credibility Ratings:
* 1-confirmed by other sources
* 2-probably true
* 3-possibly true
* 4-doubtfully true
* 5-improbable
* 6-truth cannot be judged
* </pre>
*/
static readonly J_EVALUATION_RATING: string;
/**
* <pre>
* Effectiveness
* An amplifier for units and installations that indicates unit effectiveness or installation capability.
* Format: Alphanumeric - {2,3}
* Symbol Set: 10, 15, 27
* Remarks:
* List of Values:
* FO - Fully Operational
* SO - Substantially operational
* MO - Marginally operational
* NO - Not operational
* UNK - Unknown
* </pre>
*/
static readonly K_COMBAT_EFFECTIVENESS: string;
/**
* <pre>
* Signature Equipment
* An amplifier for hostile equipment; "!" indicates detectable electronic signatures.
* Format: Alphanumeric - {1,1}
* Symbol Set: 15
* Remarks: The amplifier displayed is the exclamation mark "!".
* </pre>
*/
static readonly L_SIGNATURE_EQUIP: string;
/**
* <pre>
* Higher Form