Package JavaTacticalRenderer
Class Modifier2
java.lang.Object
JavaTacticalRenderer.Modifier2
-
Field Summary
Fields -
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) Function to replace AddModifiers for most clients.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)
-
Field Details
-
textPath
-
textID
-
featureID
-
text
-
iteration
public int iteration -
justify
public int justify -
type
public int type -
lineFactor
public double lineFactor -
_className
- See Also:
-
isIntegral
public boolean isIntegral -
fitsMBR
public boolean fitsMBR -
toEnd
public static final int toEnd- See Also:
-
aboveMiddle
public static final int aboveMiddle- See Also:
-
area
public static final int area- See Also:
-
screen
public static final int screen- See Also:
-
aboveEnd
public static final int aboveEnd- See Also:
-
fillAlphaCanObscureText
public static final double fillAlphaCanObscureText- See Also:
-
-
Method Details
-
get_TextPath
-
set_TextPath
-
set_IsIntegral
protected void set_IsIntegral(boolean value) -
get_IsIntegral
protected boolean 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) Function to replace AddModifiers for most clients. The additional converter parameter enables better accuracy locating the modifiers. Do not deprecate AddModifers for clients which still use it.- Parameters:
tg-g2d-clipBounds-converter-
-
AddModifiers2RevD
Handles rev D codes- Parameters:
tg-
-
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-
-
addSectorModifiers
Added sector range fan modifiers based using the calculated orientation indicator points- Parameters:
tg-converter-- Returns:
-
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 arrayconverter- to convert between geographic and pixel coordinatesisTextflipped- true if text is flipped
-
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
-
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-
-