|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iproject.wbmpcreator.WBMPCustomFont
Field Summary | |
static int |
DIRECTION_HORIZONTAL
A constant value representing horizontal direction of drawing a line. |
static int |
DIRECTION_VERTICAL
A constant value representing vertical direction of drawing a line. |
static int |
FONT_4X6
A contant value representing a 4x6 font. |
static int |
FONT_CUSTOM
A contant value representing a custom font. |
Constructor Summary | |
WBMPCustomFont(CustomFont cfont)
Constructor creating WBMPCustomFont instance from existing CustomFont instance |
|
WBMPCustomFont(java.lang.String fontname)
Constructor creating WBMPCustomFont instance and loading the specified font. |
Method Summary | |
static CustomFont |
getDefaultFont()
Method returning built-in 4x6 font instance. |
static WBMPfile |
getWBMPImage(java.lang.String text,
int usedFont,
int direction)
A method returning WBMPfile instance containing a string written with the selected font. |
void |
openUDF(java.lang.String fontname)
Method to open the User-Defined Font. |
void |
unloadCustomFont()
Unload previously loaded CustomFont instance. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int FONT_CUSTOM
public static final int FONT_4X6
public static final int DIRECTION_VERTICAL
public static final int DIRECTION_HORIZONTAL
Constructor Detail |
public WBMPCustomFont(java.lang.String fontname) throws java.io.FileNotFoundException
public WBMPCustomFont(CustomFont cfont)
Method Detail |
public static WBMPfile getWBMPImage(java.lang.String text, int usedFont, int direction)
A method returning WBMPfile instance containing a string written with the selected font.
If wrong font is specified - the 96x65pixels image is returned.
text
- the string to be convertedusedFont
- font to be useddirection
- the direction of drawing lineWBMPfile
instance containing the given stringpublic void openUDF(java.lang.String fontname) throws java.io.FileNotFoundException
java.io.FileNotFoundException
exception is raised.
Later this font can be used as follows:
WBMPCustomFont wcf=new WBMPCustomFont(); WBMPfile wf; try{ wcf.openUDF("my_font"); wf=wcf.getWBMPImage("MY FONT TEST",wcf.FONT_CUSTOM); } catch(Exception e){ } // try
fontname
- the name of a font (WITHOUT EXTENSION)public void unloadCustomFont()
CustomFont
instance.public static CustomFont getDefaultFont()
CustomFont
instance for a default font
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |