Package rma.swing

Class HersheyFont

java.lang.Object
rma.swing.HersheyFont

public class HersheyFont extends Object
  • Field Details

    • HORIZONTAL_CENTER

      public static final int HORIZONTAL_CENTER
      See Also:
    • HORIZONTAL_LEFT

      public static final int HORIZONTAL_LEFT
      See Also:
    • HORIZONTAL_RIGHT

      public static final int HORIZONTAL_RIGHT
      See Also:
    • HORIZONTAL_NORMAL

      public static final int HORIZONTAL_NORMAL
      See Also:
    • VERTICAL_TOP

      public static final int VERTICAL_TOP
      See Also:
    • VERTICAL_HALF

      public static final int VERTICAL_HALF
      See Also:
    • VERTICAL_CAP

      public static final int VERTICAL_CAP
      See Also:
    • VERTICAL_BOTTOM

      public static final int VERTICAL_BOTTOM
      See Also:
    • VERTICAL_NORMAL

      public static final int VERTICAL_NORMAL
      See Also:
    • X

      protected static final int X
      See Also:
    • Y

      protected static final int Y
      See Also:
    • name

      protected String name
    • characterVectors

      protected char[][][] characterVectors
    • numberOfPoints

      protected int[] numberOfPoints
    • characterMinX

      protected int[] characterMinX
    • characterMaxX

      protected int[] characterMaxX
    • characterSetMinY

      protected int characterSetMinY
    • characterSetMaxY

      protected int characterSetMaxY
    • charactersInSet

      protected int charactersInSet
  • Constructor Details

    • HersheyFont

      public HersheyFont(String fontName)
    • HersheyFont

      public HersheyFont(URL base, String fontName)
    • HersheyFont

      public HersheyFont(URL base)
  • Method Details

    • calculateCharacterSize

      protected void calculateCharacterSize(int j, int xadj)
    • drawString

      public void drawString(String text, int x, int y, Graphics g)
    • stringLimit

      public Rectangle stringLimit(String text, int x, int y, Graphics g)
    • setRotation

      public void setRotation(double theta)
    • setWidth

      public void setWidth(float width)
    • setHeight

      public void setHeight(float height)
    • setVerticalAlignment

      public void setVerticalAlignment(int alignment)
    • setHorizontalAlignment

      public void setHorizontalAlignment(int alignment)
    • setItalics

      public void setItalics(boolean flag)
    • setItalicsSlant

      public void setItalicsSlant(float slant)
    • setLineWidth

      public void setLineWidth(int width)
    • getName

      public String getName()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • drawText

      protected int drawText(String text, int xc, int yc, float width, float height, int Horizontal_Alignment, int Vertical_Alignment, double theta, boolean Draw, Rectangle r, Graphics g)
    • drawFontLine

      protected void drawFontLine(int x1, int y1, int x2, int y2, int width, Graphics g)
    • fontAdjustment

      protected int fontAdjustment(String fontname)
    • drawCharacter

      protected void drawCharacter(int xp, int yp, int rotpx, int rotpy, float width, float height, boolean rotate, float sinTheta, float cosTheta, boolean Draw, Rectangle r, char[][] Vectors, int numberOfPoints, int minX, int characterSetMinY, boolean Italics, float slant, Graphics g)
    • transformX

      protected final int transformX(int xoffset, int px, int minx, float mag)
    • transformY

      protected final int transformY(int yoffset, int py, int miny, float mag)