From 48b6f117d40a6da190d320dc0676a9ba9c434fce Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 15 Feb 2005 05:48:26 +0000 Subject: [PATCH] got things compiling again (but nothing actually works) --- core/PFont.java | 6 +++--- core/PGraphics.java | 17 ++++++++++------- core/PGraphics2.java | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/core/PFont.java b/core/PFont.java index 614556054..4533b4b64 100644 --- a/core/PFont.java +++ b/core/PFont.java @@ -428,10 +428,10 @@ public class PFont implements PConstants { float lextent = (float) leftExtent[glyph] / fwidth; float textent = (float) topExtent[glyph] / fheight; - int savedTextureMode = parent.textureMode; + //int savedTextureMode = parent.textureMode; boolean savedStroke = parent.stroke; - parent.textureMode = IMAGE_SPACE; + //parent.textureMode = IMAGE_SPACE; //parent.drawing_text = true; parent.stroke = false; @@ -457,7 +457,7 @@ public class PFont implements PConstants { parent.vertex(x2, y1, z, width[glyph], 0); parent.endShape(); - parent.textureMode = savedTextureMode; + //parent.textureMode = savedTextureMode; //parent.drawing_text = false; parent.stroke = savedStroke; diff --git a/core/PGraphics.java b/core/PGraphics.java index a677c8d06..68f4a7c31 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -699,21 +699,24 @@ public class PGraphics extends PImage implements PConstants { // STROKE/FILL/DRAW - protected void fill_shape(Shape s) { + //protected void fill_shape(Shape s) { + protected void fill_shape(Path s) { if (fill) { //graphics.setColor(fillColorObject); //graphics.fill(s); } } - protected void stroke_shape(Shape s) { + //protected void stroke_shape(Shape s) { + protected void stroke_shape(Path s) { if (stroke) { //graphics.setColor(strokeColorObject); //graphics.draw(s); } } - protected void draw_shape(Shape s) { + //protected void draw_shape(Shape s) { + protected void draw_shape(Path s) { if (fill) { //graphics.setColor(fillColorObject); //graphics.fill(s); @@ -1558,7 +1561,7 @@ public class PGraphics extends PImage implements PConstants { if (y2 < y1) { float temp = y1; y1 = y2; y2 = temp; } - textFont.text(s, x1, y1, z, x2, y2, this); + textFont.text(s, x1, y1, x2, y2, this); } else { System.err.println("text(): first set a font before drawing text"); @@ -1695,7 +1698,7 @@ public class PGraphics extends PImage implements PConstants { throw new RuntimeException("too many calls to pop() " + "(and not enough to push)"); //message(COMPLAINT, "matrix stack underflow, to many popmatrix"); - return; + //return; } matrixStackDepth--; float mat[] = matrixStack[matrixStackDepth]; @@ -2570,7 +2573,7 @@ public class PGraphics extends PImage implements PConstants { } } - class Shape extends Path { - } + //class Shape extends Path { + //} } diff --git a/core/PGraphics2.java b/core/PGraphics2.java index 87370afe5..4baf5a570 100644 --- a/core/PGraphics2.java +++ b/core/PGraphics2.java @@ -526,7 +526,7 @@ public class PGraphics2 extends PGraphics { public void image(PImage image, float a, float b, float c, float d, - float u1, float v1, float u2, float v2) { + int u1, int v1, int u2, int v2) { check_image_cache(image); super.image(image, a, b, c, d, u1, v1, u2, v2); }