mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
fixes for mouse/key events, PFont now more promiscuous, loop/noLoop work
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user