new fixes and changes for 0080.

This commit is contained in:
benfry
2005-04-01 04:02:04 +00:00
parent 5b5e8a734d
commit 91bbf75291
14 changed files with 899 additions and 815 deletions

View File

@@ -998,10 +998,11 @@ public class PGraphics2 extends PGraphics {
// blit image to the screen
//g2.drawImage((BufferedImage) image.cache, 0, 0, null);
//graphics.drawImage((BufferedImage) image.cache, 0, 0, null);
push();
resetMatrix();
imageImpl(image, 0, 0, width, height, 0, 0, width, height);
pop();
set(0, 0, image);
//push();
//resetMatrix();
//imageImpl(image, 0, 0, width, height, 0, 0, width, height);
//pop();
}
@@ -1064,6 +1065,7 @@ public class PGraphics2 extends PGraphics {
public int get(int x, int y) {
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) return 0;
return ((BufferedImage) image).getRGB(x, y);
}
@@ -1115,10 +1117,22 @@ public class PGraphics2 extends PGraphics {
public void set(int x, int y, int argb) {
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) return;
((BufferedImage) image).setRGB(x, y, argb);
}
public void set(int dx, int dy, PImage src) {
push();
imageImpl(src, 0, 0, width, height, 0, 0, width, height);
resetMatrix();
pop();
//loadPixels();
//super.set(dx, dy, src);
//updatePixels();
}
//////////////////////////////////////////////////////////////
@@ -1139,13 +1153,6 @@ public class PGraphics2 extends PGraphics {
//////////////////////////////////////////////////////////////
public void copy(PImage src, int dx, int dy) {
loadPixels();
super.copy(src, dx, dy);
updatePixels();
}
public void copy(PImage src, int sx1, int sy1, int sx2, int sy2,
int dx1, int dy1, int dx2, int dy2) {
loadPixels();