## visad
Class PlotText

    java.lang.Object
      visad.PlotText

public class PlotText
extends Object

PlotText calculates an array of points to be plotted to the screen as vector pairs, given a String and location, orientation and size in space.

The font is a simple one, and includes characters from the ASCII collating sequence from 0x20 thru 0x7E. Most of this was taken from the original visad.PlotText.

Field Summary
`(package private) static double[]` `bx`
`(package private) static double[]` `by`
`(package private) static double[]` `bz`
`(package private) static float[][]` `charCodes`
`(package private) static double[]` `ux`
`(package private) static double[]` `uy`
`(package private) static double[]` `uz`
`(package private) static double` `WIDTH`
`(package private) static double` `XMIN`
`(package private) static double` `YMIN`
`(package private) static double` `ZMIN`

Constructor Summary
`PlotText()`

Method Summary
`static VisADTriangleArray` `render_font(String str, Font font, double[] start, double[] base, double[] up, boolean center)` Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.
`static VisADTriangleArray` `render_font(String str, Font font, double[] start, double[] base, double[] up, TextControl.Justification justification)` Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.
`static VisADTriangleArray` `render_font(String str, Font font, double[] start, double[] base, double[] up, TextControl.Justification justification, double characRotation)` Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.
`static VisADTriangleArray` `render_font(String str, Font font, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification)` Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.
`static VisADTriangleArray` `render_font(String str, Font font, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification, double characRotation, double scale, double[] offsets)` Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.
`static VisADLineArray` `render_font(String str, HersheyFont font, double[] start, double[] base, double[] up, boolean center)` Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.
`static VisADLineArray` `render_font(String str, HersheyFont font, double[] start, double[] base, double[] up, TextControl.Justification justification)` Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.
`static VisADLineArray` `render_font(String str, HersheyFont font, double[] start, double[] base, double[] up, TextControl.Justification justification, double characRotation)` Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.
`static VisADLineArray` `render_font(String str, HersheyFont font, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification)` Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.
`static VisADLineArray` `render_font(String str, HersheyFont font, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification, double characRotation, double scale, double[] offsets)` Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.
`static VisADLineArray` `render_label(int axis, double pos, String str, int line, long c)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static VisADLineArray` `render_label(String str, double[] start, double[] base, double[] up, boolean center)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static VisADLineArray` `render_label(String str, double[] start, double[] base, double[] up, TextControl.Justification justification)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static VisADLineArray` `render_label(String str, double[] start, double[] base, double[] up, TextControl.Justification justification, double characRotation)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static VisADLineArray` `render_label(String str, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static VisADLineArray` `render_label(String str, double[] start, double[] base, double[] up, TextControl.Justification justification, TextControl.Justification verticalJustification, double characRotation, double scale, double[] offsets)` Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.
`static String` `shortString(double val)` make a short string for value for use in slider label

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### XMIN

    static final double XMIN

See Also:
  Constant Field Values

### YMIN

    static final double YMIN

See Also:
  Constant Field Values

### ZMIN

    static final double ZMIN

See Also:
  Constant Field Values

### WIDTH

    static final double WIDTH

See Also:
  Constant Field Values

### bx

    static double[] bx

### ux

    static double[] ux

### by

    static double[] by

### uy

    static double[] uy

### bz

    static double[] bz

### uz

    static double[] uz

### charCodes

    static float[][] charCodes

Constructor Detail

### PlotText

    public PlotText()

Method Detail

### render_label

    public static VisADLineArray render_label(int axis,
                                              double pos,
                                              String str,
                                              int line,
                                              long c)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `axis` - [=0 (x), =1 (y), or =2 (z)
    `pos` - position along axis to put label in [-1,1]
    `str` - the text string to "print"
    `line` - line number for multi-line text (0 = first line)
    `c` - color (not used yet)
  Returns:
    VisADLineArray of all the vectors needed to draw the characters in this string

### render_label

    public static VisADLineArray render_label(String str,
                                              double[] start,
                                              double[] base,
                                              double[] up,
                                              boolean center)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `str` - String to use
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `center` - is `true` if string is to be centered
  Returns:
    VisADLineArray of all the vectors needed to draw the characters in this string

### render_label

    public static VisADLineArray render_label(String str,
                                              double[] start,
                                              double[] base,
                                              double[] up,
                                              TextControl.Justification justification,
                                              TextControl.Justification verticalJustification)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `str` - String to use
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
  Returns:
    VisADLineArray of all the vectors needed to draw the characters in this string

### render_label

    public static VisADLineArray render_label(String str,
                                              double[] start,
                                              double[] base,
                                              double[] up,
                                              TextControl.Justification justification)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `str` - String to use
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
  Returns:
    VisADLineArray of all the vectors needed to draw the characters in this string

### render_label

    public static VisADLineArray render_label(String str,
                                              double[] start,
                                              double[] base,
                                              double[] up,
                                              TextControl.Justification justification,
                                              double characRotation)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `str` - String to use
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
  Returns:
    VisADLineArray of all the vectors needed to draw the characters in this string

### render_label

    public static VisADLineArray render_label(String str,
                                              double[] start,
                                              double[] base,
                                              double[] up,
                                              TextControl.Justification justification,
                                              TextControl.Justification verticalJustification,
                                              double characRotation,
                                              double scale,
                                              double[] offsets)

  Convert a string of characters (ASCII collating sequence) into a series of vectors for drawing.

  Parameters:
    `str` - String to use
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
    `scale` - is the scaling factor.
    `offsets` - is a 1x3 array defining the offsets in X, Y, Z, respectively.
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### shortString

    public static String shortString(double val)

  make a short string for value for use in slider label

### render_font

    public static VisADLineArray render_font(String str,
                                             HersheyFont font,
                                             double[] start,
                                             double[] base,
                                             double[] up,
                                             boolean center)

  Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null HersheyFont font
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `center` - is `true` if string is to be centered
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### render_font

    public static VisADLineArray render_font(String str,
                                             HersheyFont font,
                                             double[] start,
                                             double[] base,
                                             double[] up,
                                             TextControl.Justification justification)

  Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null HersheyFont name
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### render_font

    public static VisADLineArray render_font(String str,
                                             HersheyFont font,
                                             double[] start,
                                             double[] base,
                                             double[] up,
                                             TextControl.Justification justification,
                                             double characRotation)

  Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null HersheyFont name
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### render_font

    public static VisADLineArray render_font(String str,
                                             HersheyFont font,
                                             double[] start,
                                             double[] base,
                                             double[] up,
                                             TextControl.Justification justification,
                                             TextControl.Justification verticalJustification)

  Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null HersheyFont name
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### render_font

    public static VisADLineArray render_font(String str,
                                             HersheyFont font,
                                             double[] start,
                                             double[] base,
                                             double[] up,
                                             TextControl.Justification justification,
                                             TextControl.Justification verticalJustification,
                                             double characRotation,
                                             double scale,
                                             double[] offsets)

  Convert a string of characters (ASCII collating sequence) into a series of lines for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null HersheyFont name
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
    `scale` - is the scaling factor.
    `offsets` - is a 1x3 array defining the offsets in X, Y, Z, respectively.
  Returns:
    VisADLineArray of all the lines needed to draw the characters in this string

### render_font

    public static VisADTriangleArray render_font(String str,
                                                 Font font,
                                                 double[] start,
                                                 double[] base,
                                                 double[] up,
                                                 boolean center)

  Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null font
    `start` - point (x,y,z)
    `base` - (x,y,z) of baseline vector
    `up` - (x,y,z) of "up" direction vector
    `center` - is `true` if string is to be centered
  Returns:
    VisADTriangleArray of all the triangles needed to draw the characters in this string

### render_font

    public static VisADTriangleArray render_font(String str,
                                                 Font font,
                                                 double[] start,
                                                 double[] base,
                                                 double[] up,
                                                 TextControl.Justification justification)

  Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null font
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
  Returns:
    VisADTriangleArray of all the triangles needed to draw the characters in this string

### render_font

    public static VisADTriangleArray render_font(String str,
                                                 Font font,
                                                 double[] start,
                                                 double[] base,
                                                 double[] up,
                                                 TextControl.Justification justification,
                                                 double characRotation)

  Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null font
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
  Returns:
    VisADTriangleArray of all the triangles needed to draw the characters in this string

### render_font

    public static VisADTriangleArray render_font(String str,
                                                 Font font,
                                                 double[] start,
                                                 double[] base,
                                                 double[] up,
                                                 TextControl.Justification justification,
                                                 TextControl.Justification verticalJustification)

  Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null font
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
  Returns:
    VisADTriangleArray of all the triangles needed to draw the characters in this string

### render_font

    public static VisADTriangleArray render_font(String str,
                                                 Font font,
                                                 double[] start,
                                                 double[] base,
                                                 double[] up,
                                                 TextControl.Justification justification,
                                                 TextControl.Justification verticalJustification,
                                                 double characRotation,
                                                 double scale,
                                                 double[] offsets)

  Convert a string of characters (ASCII collating sequence) into a series of triangles for drawing.

  Parameters:
    `str` - String to use
    `font` - non-null font
    `start` -
    `base` -
    `up` -
    `justification` - is one of:
    - TextControl.Justification.LEFT - Left justified text (ie: normal text)
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.RIGHT - Right justified text
    `verticalJustification` - is one of:
    - TextControl.Justification.TOP - Top justified text
    - TextControl.Justification.CENTER - Centered text
    - TextControl.Justification.BOTTOM - Bottom justified text (normal)
    `characRotation` - is the angle (in degrees) at which each character in str is rotated with respect to the base line of the text. A positive value rotates the characters clockwise; a negative value rotates them counterclockwise.
    `scale` - is the scaling factor.
    `offsets` - is a 1x3 array defining the offsets in X, Y, Z, respectively.
  Returns:
    VisADTriangleArray of all the triangles needed to draw the characters in this string