mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
size(300, 300, OPENGL).. rewrite of present mode.. java 1.4 only.. a
zillion other runtime fixes
This commit is contained in:
@@ -74,8 +74,9 @@ public class PGraphics2 extends PGraphics {
|
||||
* @param iwidth viewport width
|
||||
* @param iheight viewport height
|
||||
*/
|
||||
public PGraphics2(int iwidth, int iheight) {
|
||||
resize(iwidth, iheight);
|
||||
public PGraphics2(int iwidth, int iheight, PApplet parent) {
|
||||
super(iwidth, iheight, parent);
|
||||
//resize(iwidth, iheight);
|
||||
}
|
||||
|
||||
|
||||
@@ -1048,11 +1049,23 @@ public class PGraphics2 extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the pixels[] buffer to the PGraphics image.
|
||||
* <P>
|
||||
* Unlike in PImage, where updatePixels() only asks that the
|
||||
* update happens, in PGraphics2, this will happen immediately.
|
||||
*/
|
||||
public void updatePixels() {
|
||||
updatePixels(0, 0, width, height);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the pixels[] buffer to the PGraphics image.
|
||||
* <P>
|
||||
* Unlike in PImage, where updatePixels() only asks that the
|
||||
* update happens, in PGraphics2, this will happen immediately.
|
||||
*/
|
||||
public void updatePixels(int x, int y, int c, int d) {
|
||||
((BufferedImage) image).setRGB(x, y,
|
||||
(imageMode == CORNER) ? c : (c - x),
|
||||
|
||||
Reference in New Issue
Block a user