public class GlyphCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GlyphCache.GlyphData |
Modifier and Type | Field and Description |
---|---|
private BaseContext |
context |
private static java.nio.ByteBuffer |
emptyMask |
(package private) java.util.HashMap<java.lang.Integer,GlyphCache.GlyphData[]> |
glyphDataMap |
(package private) static java.util.WeakHashMap<BaseContext,RectanglePacker> |
greyPackerMap |
private static int |
HEIGHT |
private boolean |
isLCDCache |
(package private) static java.util.WeakHashMap<BaseContext,RectanglePacker> |
lcdPackerMap |
private RectanglePacker |
packer |
private static int |
SEGSHIFT |
private static int |
SEGSIZE |
private FontStrike |
strike |
private static int |
SUBPIXEL_SHIFT |
private static int |
WIDTH |
Constructor and Description |
---|
GlyphCache(BaseContext context,
FontStrike strike) |
Modifier and Type | Method and Description |
---|---|
private void |
addDataToQuad(GlyphCache.GlyphData data,
VertexBuffer vb,
Texture tex,
float x,
float y,
float dstw,
float dsth) |
void |
clear() |
private void |
clearAll() |
Texture |
getBackingStore() |
private GlyphCache.GlyphData |
getCachedGlyph(int glyphCode,
int subPixel) |
void |
render(BaseContext ctx,
GlyphList gl,
float x,
float y,
int start,
int end,
Color rangeColor,
Color textColor,
BaseTransform xform,
BaseBounds clip) |
private static final int WIDTH
private static final int HEIGHT
private static java.nio.ByteBuffer emptyMask
private final BaseContext context
private final FontStrike strike
private static final int SEGSHIFT
private static final int SEGSIZE
java.util.HashMap<java.lang.Integer,GlyphCache.GlyphData[]> glyphDataMap
private static final int SUBPIXEL_SHIFT
private RectanglePacker packer
private boolean isLCDCache
static java.util.WeakHashMap<BaseContext,RectanglePacker> greyPackerMap
static java.util.WeakHashMap<BaseContext,RectanglePacker> lcdPackerMap
public GlyphCache(BaseContext context, FontStrike strike)
public void render(BaseContext ctx, GlyphList gl, float x, float y, int start, int end, Color rangeColor, Color textColor, BaseTransform xform, BaseBounds clip)
private void addDataToQuad(GlyphCache.GlyphData data, VertexBuffer vb, Texture tex, float x, float y, float dstw, float dsth)
public Texture getBackingStore()
public void clear()
private void clearAll()
private GlyphCache.GlyphData getCachedGlyph(int glyphCode, int subPixel)