mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
Fixed an index error in FontTexture (issue #1308)
This commit is contained in:
@@ -159,14 +159,14 @@ class FontTexture implements PConstants {
|
||||
currentTex = textures.length - 1;
|
||||
|
||||
PImage[] tempImg = images;
|
||||
images = new PImage[textures.length + 1];
|
||||
images = new PImage[textures.length];
|
||||
PApplet.arrayCopy(tempImg, images, tempImg.length);
|
||||
images[tempImg.length] = pg.wrapTexture(tex);
|
||||
}
|
||||
lastTex = currentTex;
|
||||
|
||||
// Make sure that the current texture is bound.
|
||||
//tex.bind();
|
||||
tex.bind();
|
||||
|
||||
return resize;
|
||||
}
|
||||
@@ -324,14 +324,6 @@ class FontTexture implements PConstants {
|
||||
}
|
||||
}
|
||||
|
||||
if (lastTex == -1) {
|
||||
lastTex = 0;
|
||||
}
|
||||
|
||||
if (currentTex != lastTex || resized) {
|
||||
currentTex = idx;
|
||||
}
|
||||
|
||||
TextureInfo tinfo = new TextureInfo(currentTex, offsetX, offsetY,
|
||||
w, h, rgba);
|
||||
offsetX += w;
|
||||
|
||||
Reference in New Issue
Block a user