Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields

sdl4gcj::ttf::Font Class Reference

Inheritance diagram for sdl4gcj::ttf::Font:

Inheritance graph
[legend]
Collaboration diagram for sdl4gcj::ttf::Font:

Collaboration graph
[legend]

Public Member Functions

native int getFontStyle ()
 Get font render style.
native void setFontStyle (int fontStyle)
 Set font render style.
native int fontHeight ()
 Get font maximum total height.
native int fontAscent ()
 Get font highest ascent (height above base).
native int fontDescent ()
 Get font lowest descent (height below base).
native int fontLineSkip ()
 Get font recommended line spacing.
native int fontFaces ()
 Get the number of faces in a font.
native boolean fontFaceIsFixedWidth ()
 Check font has fixed width.
native String fontFaceFamilyName ()
 Get font face family name.
native String fontFaceStyleName ()
 Get font face style name.
native int widthText (CharSequence text)
 Get width of rendered string.
native int heightText (CharSequence text)
 Get height of rendered string.
native Surface renderTextSolid (CharSequence text, Color foregroundColor)
 renderTextSolid
native Surface renderTextShaded (CharSequence text, Color foregroundColor, Color backgroundColor)
 renderTextShaded
native Surface renderTextBlended (CharSequence text, Color foregroundColor)
 renderTextBlended
native void closeFont ()
 Close font.
void finalize ()

Static Public Member Functions

static native Font openFont (String fontFilePath, int ptSize)
 Open font.
static native Font openFontIndex (String fontFilePath, int ptSize, long index)
 Open font with face index.

Protected Attributes

gnu.gcj.RawData implementation = null

Private Member Functions

 Font ()

Constructor & Destructor Documentation

sdl4gcj::ttf::Font::Font  )  [inline, private]
 


Member Function Documentation

native void sdl4gcj::ttf::Font::closeFont  ) 
 

Close font.

void sdl4gcj::ttf::Font::finalize  )  [inline]
 

native int sdl4gcj::ttf::Font::fontAscent  ) 
 

Get font highest ascent (height above base).

Returns:
The maximum pixel ascent of all glyphs in the font.

native int sdl4gcj::ttf::Font::fontDescent  ) 
 

Get font lowest descent (height below base).

Returns:
The maximum pixel height of all glyphs in the font.

native String sdl4gcj::ttf::Font::fontFaceFamilyName  ) 
 

Get font face family name.

Returns:
font face family name.

native boolean sdl4gcj::ttf::Font::fontFaceIsFixedWidth  ) 
 

Check font has fixed width.

Returns:
true if receiver is a fixed width font. false otherwise.

native int sdl4gcj::ttf::Font::fontFaces  ) 
 

Get the number of faces in a font.

Returns:
The number of font faces in this font.

native String sdl4gcj::ttf::Font::fontFaceStyleName  ) 
 

Get font face style name.

Returns:
font face style name.

native int sdl4gcj::ttf::Font::fontHeight  ) 
 

Get font maximum total height.

Returns:
The maximum pixel height of all glyphs in the font.

native int sdl4gcj::ttf::Font::fontLineSkip  ) 
 

Get font recommended line spacing.

Returns:
The reccomended pixel height of a rendered line of text.

native int sdl4gcj::ttf::Font::getFontStyle  ) 
 

Get font render style.

The style as a bitmask composed of the following masks:

  • TTF_STYLE_BOLD
  • TTF_STYLE_ITALIC
  • TTF_STYLE_UNDERLINE
If no style is set then TTF_STYLE_NORMAL is returned.
Returns:
Font Style
See also:
TTF_STYLE_BOLD

TTF_STYLE_ITALIC

TTF_STYLE_UNDERLINE

TTF_STYLE_NORMAL

native int sdl4gcj::ttf::Font::heightText CharSequence  text  ) 
 

Get height of rendered string.

Parameters:
text The char sequence to calculate height
Returns:
height of rendered string

static native Font sdl4gcj::ttf::Font::openFont String  fontFilePath,
int  ptSize
[static]
 

Open font.

Parameters:
fontFilePath A path to TTF font file
ptSize Point size.
Returns:
The loaded font object.

static native Font sdl4gcj::ttf::Font::openFontIndex String  fontFilePath,
int  ptSize,
long  index
[static]
 

Open font with face index.

Parameters:
fontFilePath A path to TTF font file
ptSize Point size.
index choose a font face from a multiple font face containing file. The first face is always index 0.
Returns:
The loaded font object.

native Surface sdl4gcj::ttf::Font::renderTextBlended CharSequence  text,
Color  foregroundColor
 

renderTextBlended

Parameters:
text Char sequence to render
foregroundColor The color to redner the text
Returns:
Rendered Surface

native Surface sdl4gcj::ttf::Font::renderTextShaded CharSequence  text,
Color  foregroundColor,
Color  backgroundColor
 

renderTextShaded

Parameters:
text Char sequence to render
foregroundColor The color to redner the text
backgroundColor The color to redner the background box
Returns:
Rendered Surface

native Surface sdl4gcj::ttf::Font::renderTextSolid CharSequence  text,
Color  foregroundColor
 

renderTextSolid

Parameters:
text Char sequence to render
foregroundColor The color to redner the text
Returns:
Rendered Surface

native void sdl4gcj::ttf::Font::setFontStyle int  fontStyle  ) 
 

Set font render style.

The style as a bitmask composed of the following masks:

  • TTF_STYLE_BOLD
  • TTF_STYLE_ITALIC
  • TTF_STYLE_UNDERLINE
If you want no style, set TTF_STYLE_NORMAL.
Parameters:
fontStyle The font render style
See also:
TTF_STYLE_BOLD

TTF_STYLE_ITALIC

TTF_STYLE_UNDERLINE

TTF_STYLE_NORMAL

native int sdl4gcj::ttf::Font::widthText CharSequence  text  ) 
 

Get width of rendered string.

Parameters:
text The char sequence to calculate width
Returns:
width of rendered string


Field Documentation

gnu.gcj.RawData sdl4gcj::ttf::Font::implementation = null [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 17 15:02:34 2006 for sdl4gcj by  doxygen 1.4.3