org.xwt
Class Font

java.lang.Object
  extended byorg.xwt.Font

public class Font
extends java.lang.Object


Nested Class Summary
 class Font.Glyph
           
 
Field Summary
 Font.Glyph[] glyphs
           
 int max_ascent
           
 int max_descent
           
 int pointsize
           
 Res res
           
 
Method Summary
static Font getFont(Res res, int pointsize)
           
 long rasterizeGlyphs(java.lang.String text, PixelBuffer pb, int textcolor, int x, int y, int cx1, int cy1, int cx2, int cy2, Scheduler.Task callback)
          If the glyphs of text are not yet loaded, spawn a Task to load them and invoke callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pointsize

public final int pointsize

res

public final Res res

max_ascent

public int max_ascent

max_descent

public int max_descent

glyphs

public Font.Glyph[] glyphs
Method Detail

getFont

public static Font getFont(Res res,
                           int pointsize)

rasterizeGlyphs

public long rasterizeGlyphs(java.lang.String text,
                            PixelBuffer pb,
                            int textcolor,
                            int x,
                            int y,
                            int cx1,
                            int cy1,
                            int cx2,
                            int cy2,
                            Scheduler.Task callback)
If the glyphs of text are not yet loaded, spawn a Task to load them and invoke callback. returns the width (in the high-order int) and height (in the low-order int) of the string's rasterization, or -1 if some glyphs are not loaded.