Documentation of 'visad.PlotText' Java class
PlotText
visad

Class PlotText



  • public class PlotText
    extends java.lang.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.

    • Constructor Summary

      Constructors 
      Constructor and Description
      PlotText() 
    • Constructor Detail

      • PlotText

        public PlotText()
    • Method Detail

      • render_label

        public static VisADLineArray render_label(int axis,
                                                  double pos,
                                                  java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.lang.String shortString(double val)
        make a short string for value for use in slider label
      • render_font

        public static VisADLineArray render_font(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String str,
                                                     java.awt.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(java.lang.String str,
                                                     java.awt.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(java.lang.String str,
                                                     java.awt.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(java.lang.String str,
                                                     java.awt.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(java.lang.String str,
                                                     java.awt.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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.