Class Modifier2

java.lang.Object
armyc2.c2sd.JavaTacticalRenderer.Modifier2

public class Modifier2 extends Object
  • Method Details

    • get_TextPath

      public POINT2[] get_TextPath()
    • set_TextPath

      protected void set_TextPath(POINT2[] value)
    • set_IsIntegral

      protected void set_IsIntegral(boolean value)
    • get_IsIntegral

      protected boolean get_IsIntegral()
    • GetMBR

      public static void GetMBR(TGLight tg, POINT2 ptUl, POINT2 ptUr, POINT2 ptLr, POINT2 ptLl)
      Returns symbol MBR. Assumes points have been initialized with value of 0th point
      Parameters:
      tg - the tactical graphic object
      ptUl - OUT - MBR upper left
      ptUr - OUT - MBR upper right
      ptLr - OUT - MBR lower right
      ptLl - 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 orientation
      iteration - 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

      public static boolean addSectorModifiers(TGLight tg, IPointConversion converter)
      Added sector range fan modifiers based using the calculated orientation indicator points
      Parameters:
      tg -
      converter -
      Returns:
    • AddModifiers2

      public static void AddModifiers2(TGLight tg)
      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

      public static void DisplayModifiers(TGLight tg, Graphics2D g2d)
      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 graphic
      g2d - 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 object
      pt0 - 1st point of segment
      pt1 - last point of segment
      stringWidth - string width
      stringHeight - string height
      lineFactor - number of text lines above or below the segment
      isTextFlipped - true if text is flipped
      Returns:
      the modifier shape
    • GetIntegralTextShapes

      public static void GetIntegralTextShapes(TGLight tg, Graphics2D g2d, ArrayList<Shape2> shapes)
      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 drawing
      shapes - 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 graphic
      g2d - the Graphic for drawing
      shapes - the shape array
      isTextFlipped - true if text is flipped
      converter - to convert between geographic and pixel coordinates
    • getTextShape

      public static Shape getTextShape(Graphics2D g2d, String str, Font font, AffineTransform tx)
      Builds a shape object to wrap text
      Parameters:
      g2d - the Graphic object for drawing
      str - text to wrap
      font - the draw font
      tx - the drawing transform, text rotation and translation
      Returns:
    • createTextOutline

      public static Shape2 createTextOutline(Shape2 originalText)
      Creates text outline as a shape
      Parameters:
      originalText - the original text
      Returns:
      text shape
    • AddModifiers2RevD

      public static void AddModifiers2RevD(TGLight tg, ArrayList<Shape2> shapes)
      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 -