Package draw

Class Font3D

java.lang.Object
draw.Font3D
All Implemented Interfaces:
Serializable

public class Font3D extends Object implements Serializable
Class for a simple 3D drawing of strings.
Since:
2004.06.03
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    direction flag: horizontal direction is negative x
    static final int
    direction flag: horizontal direction is negative y
    static final int
    direction flag: horizontal direction is negative z
    static final int
    direction flag: horizontal direction is positive x
    static final int
    direction flag: horizontal direction is positive y
    static final int
    direction flag: horizontal direction is positive z
    static final int
    direction flag: vertical direction is negative x
    static final int
    direction flag: vertical direction is negative y
    static final int
    direction flag: vertical direction is negative z
    static final int
    direction flag: vertical direction is positive x
    static final int
    direction flag: vertical direction is positive y
    static final int
    direction flag: vertical direction is positive z
  • Constructor Summary

    Constructors
    Constructor
    Description
    Font3D(Proj3D proj)
    Create a 3D font manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
    Intersect/shrink the current clipping box.
    void
    draw(Graphics g, double x, double y, double z, int dir, String s)
    Draw a string at a given reference point.
    void
    setClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
    Set the clipping box.
    void
    Set the 3D to 2D projection to use.
    void
    setSize(double size)
    Set the font size.

    Methods inherited from class java.lang.Object

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

    • H_POS_X

      public static final int H_POS_X
      direction flag: horizontal direction is positive x
      See Also:
    • H_POS_Y

      public static final int H_POS_Y
      direction flag: horizontal direction is positive y
      See Also:
    • H_POS_Z

      public static final int H_POS_Z
      direction flag: horizontal direction is positive z
      See Also:
    • H_NEG_X

      public static final int H_NEG_X
      direction flag: horizontal direction is negative x
      See Also:
    • H_NEG_Y

      public static final int H_NEG_Y
      direction flag: horizontal direction is negative y
      See Also:
    • H_NEG_Z

      public static final int H_NEG_Z
      direction flag: horizontal direction is negative z
      See Also:
    • V_POS_X

      public static final int V_POS_X
      direction flag: vertical direction is positive x
      See Also:
    • V_POS_Y

      public static final int V_POS_Y
      direction flag: vertical direction is positive y
      See Also:
    • V_POS_Z

      public static final int V_POS_Z
      direction flag: vertical direction is positive z
      See Also:
    • V_NEG_X

      public static final int V_NEG_X
      direction flag: vertical direction is negative x
      See Also:
    • V_NEG_Y

      public static final int V_NEG_Y
      direction flag: vertical direction is negative y
      See Also:
    • V_NEG_Z

      public static final int V_NEG_Z
      direction flag: vertical direction is negative z
      See Also:
  • Constructor Details

    • Font3D

      public Font3D(Proj3D proj)
      Create a 3D font manager.
      Parameters:
      proj - the 3D to 2D projection to use
      Since:
      2004.06.03 (Christian Borgelt)
  • Method Details

    • setProj3D

      public void setProj3D(Proj3D proj)
      Set the 3D to 2D projection to use.
      Parameters:
      proj - the 3d to 2d projection to use
      Since:
      2004.06.03 (Christian Borgelt)
    • setSize

      public void setSize(double size)
      Set the font size.
      Parameters:
      size - the font size
      Since:
      2004.06.03 (Christian Borgelt)
    • setClip

      public void setClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
      Set the clipping box.
      Parameters:
      xmin - the minimum in x-direction
      xmax - the maximum in x-direction
      ymin - the minimum in y-direction
      ymax - the maximum in y-direction
      zmin - the minimum in z-direction
      zmax - the maximum in z-direction
      Since:
      2004.06.06 (Christian Borgelt)
    • addClip

      public void addClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
      Intersect/shrink the current clipping box.
      Parameters:
      xmin - the minimum in x-direction
      xmax - the maximum in x-direction
      ymin - the minimum in y-direction
      ymax - the maximum in y-direction
      zmin - the minimum in z-direction
      zmax - the maximum in z-direction
      Since:
      2004.06.06 (Christian Borgelt)
    • draw

      public void draw(Graphics g, double x, double y, double z, int dir, String s)
      Draw a string at a given reference point.
      Parameters:
      g - the graphics to use for the drawing
      x - the x-coordinate of the reference point
      y - the y-coordinate of the reference point
      z - the z-coordinate of the reference point
      dir - the drawing direction (given by flags)
      s - the string to draw
      Since:
      2004.06.04 (Christian Borgelt)