From b5bb0a11554da9a0f9d46ccdca07b90b0dcaf4dc Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 13 Dec 2004 03:21:16 +0000 Subject: [PATCH] text working in gl but buggy --- core/PFont.java | 7 ++++++- core/PGraphics.java | 1 + core/PImage.java | 2 ++ core/todo.txt | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/PFont.java b/core/PFont.java index c30cce551..e73405a57 100644 --- a/core/PFont.java +++ b/core/PFont.java @@ -180,6 +180,7 @@ public class PFont implements PConstants { int pixels[] = new int[twidth * theight]; //images[i] = new PImage(pixels, 64, 64, ALPHA); images[i] = new PImage(pixels, twidth, theight, ALPHA); + //images[i] = new PImage(pixels, twidth, theight, RGBA); int bitmapSize = height[i] * width[i]; byte temp[] = new byte[bitmapSize]; @@ -194,7 +195,11 @@ public class PFont implements PConstants { //images[i].pixels[y * twidth + x] = valu; images[i].pixels[y * twidth + x] = - (valu << 24) | (valu << 16) | (valu << 8) | valu; + (valu << 24) | 0xFFFFFF; + //0xFFFFFF00 | valu; + //(valu << 24) | (valu << 16) | (valu << 8) | valu; + //0x8040ff40; + //(valu << 24) | (valu << 16) | (valu << 8) | valu; //System.out.print((images[i].pixels[y*64+x] > 128) ? "*" : "."); } //System.out.println(); diff --git a/core/PGraphics.java b/core/PGraphics.java index 6533447aa..3b42ad6df 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -1187,6 +1187,7 @@ public class PGraphics extends PImage implements PMethods, PConstants { lines[lineCount][INDEX] = -1; lines[lineCount][STROKE_MODE] = strokeCap | strokeJoin; + lines[lineCount][STROKE_WEIGHT] = (int) (strokeWeight + 0.5f); // hmm lineCount++; // mark this piece as being part of the current path diff --git a/core/PImage.java b/core/PImage.java index 94522e541..c62568997 100644 --- a/core/PImage.java +++ b/core/PImage.java @@ -163,6 +163,8 @@ public class PImage implements PConstants, Cloneable { if ((width2 == width) && (height2 == height)) { // image can be used by itself as the texture image tpixels = pixels; + twidth = width; + theight = height; } else { if ((width2 > twidth) || (height2 > theight)) { diff --git a/core/todo.txt b/core/todo.txt index e5c411e98..9b9592d9b 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -15,6 +15,7 @@ X writeTIFF, writeHeaderTIFF, writeTGA, writeHeaderTGA _ remove need to use depth() at the beginning _ and cameraMode(PERSPECTIVE) on each frame _ reverse y coordinates +_ minimum texture size may be 64x64 _ implement size(0, 0) -> just doesn't bother doing a frame.show(); _ implement fullscreen().. this takes over the screen as best it can