mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
new fixes and changes for 0080.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user