com.monica.javacom.virtualdisplay
Class MJCSoftFont
java.lang.Object
|
+--com.monica.javacom.virtualdisplay.MJCSoftFont
- All Implemented Interfaces:
- MJCText
- public class MJCSoftFont
- extends java.lang.Object
- implements MJCText
Class for implementing software font rendering. This class will read the font
configuration from an InputStream.
Method Summary |
void |
drawChar(char c,
int x,
int y,
java.awt.Color f,
java.awt.Color b,
java.awt.Graphics g)
Draws the specified character (c) at the specified position (x,y: lower left corner)
with the specified foregroung (f) and background (b) colors on the specified Graphics (g). |
int |
getHeight()
Returns the charHeight of a single character. |
java.lang.String |
getTextName()
Returns the MJC name of the MJCText. |
java.lang.String |
getTextVersion()
Returns the MJC version of the MJCText. |
int |
getWidth()
Returns the charWidth of a single character. |
void |
init(int psX,
int psY,
java.io.InputStream is)
Initializes the MJCText by specifying charWith, charHeight and an InputStream
for configuration processing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MJCSoftFont
public MJCSoftFont()
getTextName
public java.lang.String getTextName()
- Description copied from interface:
MJCText
- Returns the MJC name of the MJCText.
- Specified by:
getTextName
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Returns:
- String: the MJC name of the MJCText
getTextVersion
public java.lang.String getTextVersion()
- Description copied from interface:
MJCText
- Returns the MJC version of the MJCText.
- Specified by:
getTextVersion
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Returns:
- String: the MJC version of the MJCText
init
public void init(int psX,
int psY,
java.io.InputStream is)
- Description copied from interface:
MJCText
- Initializes the MJCText by specifying charWith, charHeight and an InputStream
for configuration processing.
- Specified by:
init
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Parameters:
int
- sX: the charWith in pixelsint
- sY: the charheight in pixelsInputStream
- is: the configuration InputStream
getHeight
public int getHeight()
- Description copied from interface:
MJCText
- Returns the charHeight of a single character.
- Specified by:
getHeight
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Returns:
- int: the charHeight of a single character
getWidth
public int getWidth()
- Description copied from interface:
MJCText
- Returns the charWidth of a single character.
- Specified by:
getWidth
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Returns:
- int: the charWidth of a single characted
drawChar
public void drawChar(char c,
int x,
int y,
java.awt.Color f,
java.awt.Color b,
java.awt.Graphics g)
- Description copied from interface:
MJCText
- Draws the specified character (c) at the specified position (x,y: lower left corner)
with the specified foregroung (f) and background (b) colors on the specified Graphics (g).
- Specified by:
drawChar
in interface MJCText
- Following copied from interface:
com.monica.javacom.interfaces.MJCText
- Parameters:
char
- c: the char to be drawnint
- x: the left X coordinate of the charint
- y: the lower Y coordinate of the charColor
- f: the foreground color of the charColor
- b: the background color of the charGraphics
- g: the Graphics on that the char is drawn