From c8dc63b77f59a76dbd6b2fc08d214822f29c6286 Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 14 Feb 2005 19:46:26 +0000 Subject: [PATCH] work on getting things to compile again --- core/PGraphics2.java | 13 +++++++++---- core/PMethods.java | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/PGraphics2.java b/core/PGraphics2.java index 09b55fcea..8a2d0408f 100644 --- a/core/PGraphics2.java +++ b/core/PGraphics2.java @@ -44,6 +44,7 @@ public class PGraphics2 extends PGraphics { new AffineTransform[MATRIX_STACK_DEPTH]; double transform[] = new double[6]; + Line2D.Float line = new Line2D.Float(); Ellipse2D.Float ellipse = new Ellipse2D.Float(); Rectangle2D.Float rect = new Rectangle2D.Float(); Arc2D.Float arc = new Arc2D.Float(); @@ -370,8 +371,10 @@ public class PGraphics2 extends PGraphics { public void line(float x1, float y1, float x2, float y2) { - graphics.setColor(strokeColorObject); - graphics.drawLine(x1, y1, x2, y2); + //graphics.setColor(strokeColorObject); + //graphics.drawLine(x1, y1, x2, y2); + line.setLine(x1, y1, x2, y2); + stroke_shape(line); } @@ -514,8 +517,10 @@ public class PGraphics2 extends PGraphics { x1 -= image.width /2f; y1 -= image.height / 2f; } - check_image_cache(); - graphics.drawImage((Image) image.cache, x1, y1, x2, y2, null); + check_image_cache(image); + //graphics.drawImage((Image) image.cache, x1, y1, x2, y2, null); + graphics.drawImage((Image) image.cache, + (int)x1, (int)y1, (int)x2, (int)y2, null); } diff --git a/core/PMethods.java b/core/PMethods.java index 2ac603fc0..0b33ab77d 100755 --- a/core/PMethods.java +++ b/core/PMethods.java @@ -65,6 +65,7 @@ public interface PMethods { // + /* // WOULD LIKE A NICER NAME static public boolean saveHeaderTIF(OutputStream output, int width, int height); @@ -78,6 +79,7 @@ public interface PMethods { static public boolean saveTGA(OutputStream output, int pixels[], int width, int height); + */ public void save(String filename);