Package RenderMultipoints
Class clsUtilityCPOF
java.lang.Object
RenderMultipoints.clsUtilityCPOF
CPOF utility functions taken from JavaLineArrayCPOF
- Author:
- Michael Deutch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddCircularRangeFanFillShapesFromTG(ArrayList<Shape2> tgShapes, ArrayList<Shape2> fillShapes) Deprecated.@param tgClips a ShapeSpec.static BooleancanClipPoints(TGLight tg) returns true if the line type can be clipped before calculating the shapesprotected static booleanChange1TacticalAreas(TGLight tg, int lineType, ArmyC2.C2SD.Utilities.IPointConversion converter, ArrayList<Shape2> shapes) protected static voidafter filtering pixels it needs to reinitialize the style to 0 or it causes CELineArraydotNet to build wrong shapesprotected static voidFilterPoints2(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter) Filters too close points after segmenting and clippingprotected static TGLightCreate a tg with a new line type to used for circular range fan fillprotected static voidGetFarPixels(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter, ArrayList farLeftPixels, ArrayList farRightPixels) Do a 360 degree horizontal shift for points on either side of the midpoint of the display, if the MBR for the pixels is greater than 180 degrees wide.protected static booleanLinesWithSeparateFill(int linetype, ArrayList<Shape2> shapes) These get clipped so the fill must be treated as a separate shape.Point2DtoPOINT2(ArrayList<Point2D> pts2d) uses a hash map to set the POINT2 style when creating tg.Pixels from Point2D ArrayListPOINT2toPoint2D(ArrayList<POINT2> pts) postClipShapes(TGLight tg, ArrayList<Shape2> shapeSpecsArray, Object clipArea) Currently assumes no MeTOC symbols are post clippedprotected static voidpostSegmentFSA(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter) cannot pre-segment the fire support areas, must post segment them after the pixels were calculatedprotected static voidSegmentGeoPoints(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter, double zoomFactor) Pre-segment the lines based on max or min latitude for the segment interval.protected static voidSetLCColor(TGLight tg, Shape2 shape) Deprecated.@param tgprotected static voidTransformPixels(TGLight tg, Rectangle2D clipBounds) if y axis flippedprotected static ArmyC2.C2SD.Utilities.ShapeInfo[]ValidateShapeSpecs(ArmyC2.C2SD.Utilities.ShapeInfo[] originalShapes, Rectangle2D clipRect)
-
Constructor Details
-
clsUtilityCPOF
public clsUtilityCPOF()
-
-
Method Details
-
SetLCColor
Deprecated.@param tg- Parameters:
shape-
-
ValidateShapeSpecs
protected static ArmyC2.C2SD.Utilities.ShapeInfo[] ValidateShapeSpecs(ArmyC2.C2SD.Utilities.ShapeInfo[] originalShapes, Rectangle2D clipRect) - Parameters:
originalShapes-clipRect-- Returns:
-
TransformPixels
if y axis flipped- Parameters:
tg-clipBounds-
-
GetFarPixels
protected static void GetFarPixels(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter, ArrayList farLeftPixels, ArrayList farRightPixels) Do a 360 degree horizontal shift for points on either side of the midpoint of the display, if the MBR for the pixels is greater than 180 degrees wide. Builds pixels for two symbols to draw a symbol flipped about the left edge and also a symbol flipped about the right edge. This function is typically used at world view. Caller must instantiate last two parameters.- Parameters:
tg-converter-farLeftPixels- - OUT - the resultant pixels for left shift symbolfarRightPixels- - OUT - the result pixels for the right shift symbol
-
Change1TacticalAreas
protected static boolean Change1TacticalAreas(TGLight tg, int lineType, ArmyC2.C2SD.Utilities.IPointConversion converter, ArrayList<Shape2> shapes) - Parameters:
tg-lineType-converter-shapes-- Returns:
-
GetCircularRangeFanFillTG
Create a tg with a new line type to used for circular range fan fill- Parameters:
tg-- Returns:
-
addCircularRangeFanFillShapesFromTG
protected static void addCircularRangeFanFillShapesFromTG(ArrayList<Shape2> tgShapes, ArrayList<Shape2> fillShapes) Deprecated.@param tg- Parameters:
fillTG-
-
ClearPixelsStyle
after filtering pixels it needs to reinitialize the style to 0 or it causes CELineArraydotNet to build wrong shapes- Parameters:
tg-
-
FilterPoints2
Filters too close points after segmenting and clipping- Parameters:
tg-converter-
-
canClipPoints
returns true if the line type can be clipped before calculating the shapes- Parameters:
tg- tactical graphic- Returns:
- true if can pre-clip points
-
LinesWithSeparateFill
These get clipped so the fill must be treated as a separate shape. Normally lines with fill do not have a separate shape for the fill.- Parameters:
linetype-- Returns:
-
Point2DtoPOINT2Mapped
protected static ArrayList<POINT2> Point2DtoPOINT2Mapped(ArrayList<Point2D> pts2d, Map<String, Object> hashMap) uses a hash map to set the POINT2 style when creating tg.Pixels from Point2D ArrayList- Parameters:
pts2d-hashMap-- Returns:
-
Point2DtoPOINT2
-
POINT2toPoint2D
-
buildShapeSpecFromPoints
protected static ArrayList<Shape2> buildShapeSpecFromPoints(TGLight tg0, Shape2 shapeSpec, ArrayList<POINT2> pts, Object clipArea) Clips a ShapeSpec. Assumes we are not post clipping splines, therefore all the operations are moveTo, lineTo. Each ShapeSpec is assumed to be: moveTo, lineTo ... lineTo, followed by another moveTo, lineTo, ... lineTo, followed by ...- Parameters:
shapeSpec-pts-clipBounds-- Returns:
- a single clipped shapeSpec
-
postClipShapes
protected static ArrayList<Shape2> postClipShapes(TGLight tg, ArrayList<Shape2> shapeSpecsArray, Object clipArea) Currently assumes no MeTOC symbols are post clipped- Parameters:
shapeSpecs-clipBounds-- Returns:
-
postSegmentFSA
cannot pre-segment the fire support areas, must post segment them after the pixels were calculated- Parameters:
tg-converter-
-
SegmentGeoPoints
protected static void SegmentGeoPoints(TGLight tg, ArmyC2.C2SD.Utilities.IPointConversion converter, double zoomFactor) Pre-segment the lines based on max or min latitude for the segment interval. This is necessary because GeoPixelconversion does not work well over distance greater than 1M meters, especially at extreme latitudes.- Parameters:
geoPoints-lineType-
-