fixes for mouse/key events, PFont now more promiscuous, loop/noLoop work

This commit is contained in:
benfry
2004-09-20 23:00:31 +00:00
parent bcf8097271
commit 7e169657df
6 changed files with 357 additions and 124 deletions

View File

@@ -101,6 +101,9 @@ public class PFont2 extends PFont {
topExtent = new int[charCount];
leftExtent = new int[charCount];
ascii = new int[128];
for (int i = 0; i < 128; i++) ascii[i] = -1;
int mbox3 = mbox * 3;
BufferedImage playground =
@@ -169,6 +172,9 @@ public class PFont2 extends PFont {
width[index] = (maxX - minX) + 1;
setWidth[index] = metrics.charWidth(c);
// cache locations of the ascii charset
if (value[i] < 128) ascii[value[i]] = i;
// offset from vertical location of baseline
// of where the char was drawn (mbox*2)
topExtent[index] = mbox*2 - minY;