Package armyc2.c2sd.JavaTacticalRenderer
Class Modifier2
java.lang.Object
armyc2.c2sd.JavaTacticalRenderer.Modifier2
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAddModifiers2(TGLight tg) Called by the renderer after tg.Pixels has been filled with the calculated points.static voidAddModifiers2RevD(TGLight tg, ArrayList<Shape2> shapes) Handles rev D codesstatic voidAddModifiersGeo(TGLight tg, Graphics2D g2d, Object clipBounds, IPointConversion converter) Calculate modifiers identical to addModifiers except use geodesic calculations for the center point.static voidAddModifiersGeo2(TGLight tg, Graphics2D g2d, Object clipBounds, IPointConversion converter) The new public interface to handle Mil-Std-2525 Rev D, replaces or calls AddModifiersGeostatic booleanaddSectorModifiers(TGLight tg, IPointConversion converter) Added sector range fan modifiers based using the calculated orientation indicator pointsstatic Shape2BuildModifierShape(TGLight tg, POINT2 pt0, POINT2 pt1, int stringWidth, int stringHeight, double lineFactor, boolean isTextFlipped) Returns a Shape object for the text background for labels and modifiersstatic Shape2createTextOutline(Shape2 originalText) Creates text outline as a shapestatic voidDisplayModifiers(TGLight tg, Graphics2D g2d) Displays the tg modifiers using a client Graphics2D, this is an option provided to clients for displaying modifiers without using shapesstatic voidDisplayModifiers2(TGLight tg, Graphics2D g2d, ArrayList<Shape2> shapes, boolean isTextFlipped, IPointConversion converter) Displays the modifiers to a Graphics2D from a BufferedImageprotected booleanPOINT2[]static voidGetIntegralTextShapes(TGLight tg, Graphics2D g2d, ArrayList<Shape2> shapes) For BOUNDARY and other line types which require breaks for the integral text.static voidReturns symbol MBR.static ShapegetTextShape(Graphics2D g2d, String str, Font font, AffineTransform tx) Builds a shape object to wrap textstatic voidRemoveModifiers(TGLight tg, Graphics2D g2d, boolean isTextFlipped, int iteration) removes text modifiers for CPOF tactical areas which do not fit inside the symbol MBRprotected voidset_IsIntegral(boolean value) protected voidset_TextPath(POINT2[] value)
-
Method Details
-
get_TextPath
-
set_TextPath
-
set_IsIntegral
-
get_IsIntegral
-
GetMBR
Returns symbol MBR. Assumes points have been initialized with value of 0th point- Parameters:
tg- the tactical graphic objectptUl- OUT - MBR upper leftptUr- OUT - MBR upper rightptLr- OUT - MBR lower rightptLl- OUT - MBR lower left
-
RemoveModifiers
public static void RemoveModifiers(TGLight tg, Graphics2D g2d, boolean isTextFlipped, int iteration) removes text modifiers for CPOF tactical areas which do not fit inside the symbol MBR- Parameters:
tg-g2d-isTextFlipped- true if text is flipped from the last segment orientationiteration- the instance count for this modifier
-
AddModifiersGeo
public static void AddModifiersGeo(TGLight tg, Graphics2D g2d, Object clipBounds, IPointConversion converter) Calculate modifiers identical to addModifiers except use geodesic calculations for the center point.- Parameters:
tg-g2d-clipBounds-converter-
-
addSectorModifiers
Added sector range fan modifiers based using the calculated orientation indicator points- Parameters:
tg-converter-- Returns:
-
AddModifiers2
Called by the renderer after tg.Pixels has been filled with the calculated points. The modifier path depends on points calculated by CELineArray.- Parameters:
tg-
-
DisplayModifiers
Displays the tg modifiers using a client Graphics2D, this is an option provided to clients for displaying modifiers without using shapes- Parameters:
tg- the tactical graphicg2d- the graphics object for drawing
-
BuildModifierShape
public static Shape2 BuildModifierShape(TGLight tg, POINT2 pt0, POINT2 pt1, int stringWidth, int stringHeight, double lineFactor, boolean isTextFlipped) Returns a Shape object for the text background for labels and modifiers- Parameters:
tg- the tactical graphic objectpt0- 1st point of segmentpt1- last point of segmentstringWidth- string widthstringHeight- string heightlineFactor- number of text lines above or below the segmentisTextFlipped- true if text is flipped- Returns:
- the modifier shape
-
GetIntegralTextShapes
For BOUNDARY and other line types which require breaks for the integral text. Currently only boundary uses this- Parameters:
tg-g2d- the graphics object for drawingshapes- the shape array
-
DisplayModifiers2
public static void DisplayModifiers2(TGLight tg, Graphics2D g2d, ArrayList<Shape2> shapes, boolean isTextFlipped, IPointConversion converter) Displays the modifiers to a Graphics2D from a BufferedImage- Parameters:
tg- the tactical graphicg2d- the Graphic for drawingshapes- the shape arrayisTextFlipped- true if text is flippedconverter- to convert between geographic and pixel coordinates
-
getTextShape
Builds a shape object to wrap text- Parameters:
g2d- the Graphic object for drawingstr- text to wrapfont- the draw fonttx- the drawing transform, text rotation and translation- Returns:
-
createTextOutline
Creates text outline as a shape- Parameters:
originalText- the original text- Returns:
- text shape
-
AddModifiers2RevD
Handles rev D codes- Parameters:
tg-
-
AddModifiersGeo2
public static void AddModifiersGeo2(TGLight tg, Graphics2D g2d, Object clipBounds, IPointConversion converter) The new public interface to handle Mil-Std-2525 Rev D, replaces or calls AddModifiersGeo- Parameters:
tg-g2d-clipBounds-converter-
-