visad
Class PlotText
- java.lang.Object
-
- visad.PlotText
-
public class PlotText extends java.lang.ObjectPlotText 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()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static VisADTriangleArrayrender_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.static VisADTriangleArrayrender_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.static VisADTriangleArrayrender_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.static VisADTriangleArrayrender_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.static VisADTriangleArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static VisADLineArrayrender_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.static java.lang.StringshortString(double val)make a short string for value for use in slider label
-
-
-
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 usestart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorcenter- istrueif 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 usestart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorjustification- 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 usestart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorjustification- 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 usestart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorjustification- 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 usestart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorjustification- 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 usefont- non-null HersheyFont fontstart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorcenter- istrueif 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 usefont- non-null HersheyFont namestart-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 usefont- non-null HersheyFont namestart-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 usefont- non-null HersheyFont namestart-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 usefont- non-null HersheyFont namestart-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 usefont- non-null fontstart- point (x,y,z)base- (x,y,z) of baseline vectorup- (x,y,z) of "up" direction vectorcenter- istrueif 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 usefont- non-null fontstart-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 usefont- non-null fontstart-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 usefont- non-null fontstart-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 usefont- non-null fontstart-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