daoc.editor.image
Class Font

java.lang.Object
  extended bydaoc.editor.image.Font
All Implemented Interfaces:
Asset

public class Font
extends java.lang.Object
implements Asset

Reads in a camelot font file.


Constructor Summary
Font(AssetNode n)
           
 
Method Summary
 void drawRow(java.awt.Graphics g, MultiColumnString mcs, int textoffset, java.awt.image.ImageObserver obs, java.awt.Color col, int iconsize)
          Draws a row of strings.
 void drawString(java.awt.Graphics g, int x, int y, java.lang.String msg, java.awt.image.ImageObserver obs, java.awt.Color col, int maxchars, int linepadding, int width, int height, boolean multi)
           
 int getHeight()
          The font height is the height of the tallest character.
 java.awt.image.BufferedImage getImage()
           
 java.awt.image.BufferedImage[] getMapForColor(java.awt.Color c)
          Grabs a color map from the cache.
 java.lang.String getName()
           
 AssetNode getNode()
           
 int getWidth(java.lang.String msg)
          Returns the pixel width of the given string in this font.
 void update(AssetNode n)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Font

public Font(AssetNode n)
Method Detail

update

public void update(AssetNode n)

getName

public java.lang.String getName()
Specified by:
getName in interface Asset

getImage

public java.awt.image.BufferedImage getImage()
Specified by:
getImage in interface Asset

getNode

public AssetNode getNode()

getHeight

public int getHeight()
The font height is the height of the tallest character.


getWidth

public int getWidth(java.lang.String msg)
Returns the pixel width of the given string in this font.


drawString

public final void drawString(java.awt.Graphics g,
                             int x,
                             int y,
                             java.lang.String msg,
                             java.awt.image.ImageObserver obs,
                             java.awt.Color col,
                             int maxchars,
                             int linepadding,
                             int width,
                             int height,
                             boolean multi)

drawRow

public void drawRow(java.awt.Graphics g,
                    MultiColumnString mcs,
                    int textoffset,
                    java.awt.image.ImageObserver obs,
                    java.awt.Color col,
                    int iconsize)
Draws a row of strings.


getMapForColor

public java.awt.image.BufferedImage[] getMapForColor(java.awt.Color c)
Grabs a color map from the cache.