X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FGlyph.java;fp=src%2Forg%2Fxwt%2FGlyph.java;h=0000000000000000000000000000000000000000;hb=99ca130d23feab443f062b8389c2c12426ef7575;hp=71cf19e629facbb1d94f8e4134770cd32cb85ee7;hpb=b205a30ca1e66d49676d807969dd73da999c26f0;p=org.ibex.core.git
diff --git a/src/org/xwt/Glyph.java b/src/org/xwt/Glyph.java
deleted file mode 100644
index 71cf19e..0000000
--- a/src/org/xwt/Glyph.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
-package org.xwt;
-import org.xwt.translators.*;
-import org.xwt.util.*;
-import org.xwt.js.*;
-import java.util.*;
-
-public class Glyph {
- public char c;
- public int max_ascent; // same value for every glyph in font; the max ascent of all chars
- public int max_descent; // same value for every glyph in font; the max descent of all chars
- public int baseline; // within the picture, this is the y-coordinate of the baseline
- public int advance; // amount to increment the x-coordinate
- public int pointsize;
- public Picture p;
- public Res res;
- public boolean rendered = false;
-
- // k1=font.res k2=(c << 16 | pointsize)
- private static Cache glyphCache = new Cache();
-
- private static Queue glyphsToBeRendered = new Queue(255);
- private static Freetype freetype = new Freetype();
-
- private static Scheduler.Task glyphRenderingTask = new Scheduler.Task() {
- public Object call(Object arg) {
- Glyph g = (Glyph)glyphsToBeRendered.remove(false);
- if (g == null) return null;
- if (g.p != null) return null;
- Log.log(Glyph.class, "rendering glyph " + g.c);
- freetype.renderGlyph(g.res, g);
- g.rendered = true;
- Scheduler.add(this);
- return null;
- }
- };
-
- /**
-
- * 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.
-
- */
- public static long rasterizeGlyphs(final Res res, final int pointsize, final String text, PixelBuffer pb, int textcolor,
- int x, int y, int cx1, int cy1, int cx2, int cy2, final Callback callback) {
- boolean ret = true;
- int width = 0;
- int height = 0;
- for(int i=0; i