|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsk.upjs.fontmapper.TexturePage
class TexturePage
Texture page class. Handles storage of multiple subtextures on a single larger texture, using user specified texture packer.
| Field Summary | |
|---|---|
private java.awt.Graphics2D |
graphics_
Graphics2D used to draw textures on the page. |
private java.awt.image.BufferedImage |
image_
Image containing the texture data. |
private TexturePacker |
packer_
Texture packer used to place textures on the page. |
(package private) GlyphDataWriter |
writer_
Used for glyph metadata output. |
| Constructor Summary | |
|---|---|
TexturePage(java.awt.Dimension size,
int colorMode,
TexturePacker packer,
GlyphDataWriter writer)
Constructs a texture page with specified dimensions, color format and passes texture packer to use. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Finalizer - clean up the graphics objects. |
java.awt.font.FontRenderContext |
fontRenderContext()
|
int |
height()
|
java.awt.image.BufferedImage |
image()
|
java.awt.geom.Rectangle2D.Float |
insertTexture(java.awt.image.BufferedImage image)
Insert a texture image to the page. |
int |
width()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.awt.image.BufferedImage image_
private java.awt.Graphics2D graphics_
private TexturePacker packer_
GlyphDataWriter writer_
| Constructor Detail |
|---|
public TexturePage(java.awt.Dimension size,
int colorMode,
TexturePacker packer,
GlyphDataWriter writer)
size - Size of the page.colorMode - Color format of the pixels of the page.packer - Texture packer to use to place textures on the page.writer - GlyphDataWriter used to write glyyph metadata output.| Method Detail |
|---|
public java.awt.geom.Rectangle2D.Float insertTexture(java.awt.image.BufferedImage image)
throws TextureAllocationException,
TexturePageFullException
image - Image to insert.
TexturePageFullException - if not enough space left to insert the texture.
TextureAllocationException - if the texture is too large to fit to the page.public int width()
public int height()
public java.awt.image.BufferedImage image()
public java.awt.font.FontRenderContext fontRenderContext()
protected void finalize()
finalize in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||