|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.font.GlyphPage
public class GlyphPage
Stores a number of glyphs on a single texture.
Field Summary | |
---|---|
static int |
MAX_GLYPH_SIZE
The maxium size of an individual glyph |
static java.awt.font.FontRenderContext |
renderContext
The render context in which the glyphs will be generated |
Constructor Summary | |
---|---|
GlyphPage(UnicodeFont unicodeFont,
int pageWidth,
int pageHeight)
Create a new page of glyphs |
Method Summary | |
---|---|
java.util.List |
getGlyphs()
Returns the glyphs stored on this page. |
Image |
getImage()
Returns the backing texture for this page. |
static java.awt.Graphics2D |
getScratchGraphics()
Get the scratch graphics used to generate the page of glyphs |
int |
loadGlyphs(java.util.List glyphs,
int maxGlyphsToLoad)
Loads glyphs to the backing texture and sets the image on each loaded glyph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_GLYPH_SIZE
public static java.awt.font.FontRenderContext renderContext
Constructor Detail |
---|
public GlyphPage(UnicodeFont unicodeFont, int pageWidth, int pageHeight) throws SlickException
unicodeFont
- The font this page forms part ofpageWidth
- The width of the backing texture.pageHeight
- The height of the backing texture.
SlickException
- if the backing texture could not be created.Method Detail |
---|
public static java.awt.Graphics2D getScratchGraphics()
public int loadGlyphs(java.util.List glyphs, int maxGlyphsToLoad) throws SlickException
glyphs
- The glyphs to load.maxGlyphsToLoad
- This is the maximum number of glyphs to load from the list. Set to -1 to attempt to load all the
glyphs.
SlickException
- if the glyph could not be rendered.public java.util.List getGlyphs()
Glyph
elements on this pagepublic Image getImage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |