Closed
Description
Created by: clankill3r
OSX 10.15.7
Processing 4.1.1
void setup() {
size(600, 600, JAVA2D);
PGraphics pg1 = createGraphics(600, 600, JAVA2D);
pg1.beginDraw();
pg1.background(0);
pg1.endDraw();
PGraphics pg2 = createGraphics(600, 600, JAVA2D);
pg2.beginDraw();
pg2.background(255);
pg2.copy(pg1, 0, 0, width/2, height/2, 0, 0, width/2, height/2);
pg2.endDraw();
}
In PGraphicsJava2D we have:
@Override
public void copy(PImage src,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh) {
g2.drawImage((Image) src.getNative(),
dx, dy, dx + dw, dy + dh,
sx, sy, sx + sw, sy + sh, null);
}
The cast happens there, (but a fix seems to be more complex then changing the cast there).
Metadata
Metadata
Assignees
Labels
No labels