|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A font object. Objects of this class are used by canvas driver to paint glyphs.
Method Summary | |
void |
addDeleteCallback(iFontDeleteNotify func)
Add a font delete notification callback routine. |
int |
getAscent()
Get the font's ascent in pixels. |
int |
getDescent()
Get the font's descent in pixels. |
int[] |
getDimensions(java.lang.String text)
Return the width and height of text written with this font. desc gives the maximum descender. |
iDataBuffer |
getGlyphAlphaBitmap(int c,
csBitmapMetrics metrics)
Return a pointer to a bitmap containing the alpha bitmap for the rendered character. |
iDataBuffer |
getGlyphBitmap(int c,
csBitmapMetrics metrics)
Return a pointer to a bitmap containing a rendered character. |
boolean |
getGlyphMetrics(int c,
csGlyphMetrics metrics)
Return the metrics of a glyph. |
int |
getLength(java.lang.String text,
int maxwidth)
Determine how many characters from this string can be written without exceeding given width (in pixels);. |
int[] |
getMaxSize()
Return the maximum width and height of a single glyph, in pixels. |
int |
getSize()
Query current font size in Point. |
boolean |
hasGlyph(int c)
Returns whether a specific glyph is present in this font. |
boolean |
removeDeleteCallback(iFontDeleteNotify func)
Remove a font delete notification callback. |
void |
setSize(int iSize)
Set the size for this font in Point. |
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe |
Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
Method Detail |
public void addDeleteCallback(iFontDeleteNotify func)
func
- public int getAscent()
public int getDescent()
public int[] getDimensions(java.lang.String text)
text
-
public iDataBuffer getGlyphAlphaBitmap(int c, csBitmapMetrics metrics)
c
- metrics
-
public iDataBuffer getGlyphBitmap(int c, csBitmapMetrics metrics)
c
- metrics
-
public boolean getGlyphMetrics(int c, csGlyphMetrics metrics)
c
- metrics
-
public int getLength(java.lang.String text, int maxwidth)
text
- maxwidth
-
public int[] getMaxSize()
public int getSize()
public boolean hasGlyph(int c)
c
-
public boolean removeDeleteCallback(iFontDeleteNotify func)
func
-
public void setSize(int iSize)
iSize
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |