Class Text

java.lang.Object
hoverball.debug.Debug
hoverball.debug.Text

public class Text
extends Debug
Plots a text.
  • Field Summary

    Fields inherited from class hoverball.debug.Debug

    color, debugs
  • Constructor Summary

    Constructors 
    Constructor Description
    Text​(Vector p, java.lang.String text)
    Creates a Text debug.
    Text​(Vector p, java.lang.String text, double line)
    Creates a Text debug with line number.
    Text​(Vector p, java.lang.String text, double line, int align)
    Creates a Text debug with line number and horizontal alignment.
  • Method Summary

    Modifier and Type Method Description
    void paint​(java.awt.Graphics g, java.awt.Color color, java.awt.Color globe, double scale, Sphere sphere, Matrix base, boolean front)
    [Implementation]

    Methods inherited from class hoverball.debug.Debug

    color, scale, vector

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Text

      public Text​(Vector p, java.lang.String text)
      Creates a Text debug.
      Parameters:
      p - position
      text - text
    • Text

      public Text​(Vector p, java.lang.String text, double line)
      Creates a Text debug with line number.

      The line number shifts the text upward and downward independently of the perspective. It is thus possible to output a multiple line comment without any distorting by perspective.

      Parameters:
      p - position
      text - text
      line - line
    • Text

      public Text​(Vector p, java.lang.String text, double line, int align)
      Creates a Text debug with line number and horizontal alignment.

      The line number shifts the text upward and downward independently of the perspective. It is thus possible to output a multiple line comment without any distorting by perspective.

      With alignment values x < 0 the text is right justified, x = 0 centers, and x > 0 outputs left justified.

      Parameters:
      p - position
      text - text
      line - line
      align - alignment
  • Method Details

    • paint

      public void paint​(java.awt.Graphics g, java.awt.Color color, java.awt.Color globe, double scale, Sphere sphere, Matrix base, boolean front)
      [Implementation]
      Overrides:
      paint in class Debug
      Parameters:
      g - Graphics Context
      color - color of the debug
      globe - color of the sphere
      scale - scaling (sphere radius in pixels)
      sphere - game sphere
      base - perspective matrix
      front - front or back?