mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
cleaning up from some changes
This commit is contained in:
@@ -6390,12 +6390,6 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public void updatePixels() {
|
||||
if (recorder != null) recorder.updatePixels();
|
||||
g.updatePixels();
|
||||
}
|
||||
|
||||
|
||||
public void endPixels() {
|
||||
if (recorder != null) recorder.endPixels();
|
||||
g.endPixels();
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.awt.image.*;
|
||||
* Subclass for PGraphics that implements the graphics API
|
||||
* in Java 1.3+ using Java 2D.
|
||||
*/
|
||||
public class PGraphics2 extends PGraphics {
|
||||
public class PGraphicsJava extends PGraphics {
|
||||
|
||||
public Graphics2D g2;
|
||||
GeneralPath gpath;
|
||||
@@ -59,11 +59,11 @@ public class PGraphics2 extends PGraphics {
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for the PGraphics2 object.
|
||||
* Constructor for the PGraphicsJava object.
|
||||
* This prototype only exists because of annoying
|
||||
* java compilers, and should not be used.
|
||||
*/
|
||||
public PGraphics2() { }
|
||||
public PGraphicsJava() { }
|
||||
|
||||
|
||||
/**
|
||||
@@ -75,7 +75,7 @@ public class PGraphics2 extends PGraphics {
|
||||
* @param iwidth viewport width
|
||||
* @param iheight viewport height
|
||||
*/
|
||||
public PGraphics2(int iwidth, int iheight, PApplet parent) {
|
||||
public PGraphicsJava(int iwidth, int iheight, PApplet parent) {
|
||||
super(iwidth, iheight, parent);
|
||||
//resize(iwidth, iheight);
|
||||
}
|
||||
@@ -987,7 +987,7 @@ public class PGraphics2 extends PGraphics {
|
||||
* Update the pixels[] buffer to the PGraphics image.
|
||||
* <P>
|
||||
* Unlike in PImage, where endPixels() only asks that the
|
||||
* update happens, in PGraphics2, this will happen immediately.
|
||||
* update happens, in PGraphicsJava, this will happen immediately.
|
||||
*/
|
||||
public void endPixels() {
|
||||
//endPixels(0, 0, width, height);
|
||||
@@ -1000,7 +1000,7 @@ public class PGraphics2 extends PGraphics {
|
||||
* Update the pixels[] buffer to the PGraphics image.
|
||||
* <P>
|
||||
* Unlike in PImage, where endPixels() only asks that the
|
||||
* update happens, in PGraphics2, this will happen immediately.
|
||||
* update happens, in PGraphicsJava, this will happen immediately.
|
||||
*/
|
||||
public void endPixels(int x, int y, int c, int d) {
|
||||
if ((x == 0) && (y == 0) && (c == width) && (d == height)) {
|
||||
|
||||
+6
-4
@@ -586,8 +586,9 @@ public class PImage implements PConstants, Cloneable {
|
||||
* <A HREF="http://incubator.quasimondo.com">Mario Klingemann</A>
|
||||
*/
|
||||
public void filter(int kind) {
|
||||
switch (kind) {
|
||||
beginPixels();
|
||||
|
||||
switch (kind) {
|
||||
case BLUR:
|
||||
// TODO write basic low-pass filter blur here
|
||||
// what does photoshop do on the edges with this guy?
|
||||
@@ -641,7 +642,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
dilate(false);
|
||||
break;
|
||||
}
|
||||
updatePixels(); // mark as modified
|
||||
endPixels(); // mark as modified
|
||||
}
|
||||
|
||||
|
||||
@@ -662,8 +663,9 @@ public class PImage implements PConstants, Cloneable {
|
||||
* and later updated by toxi for better speed.
|
||||
*/
|
||||
public void filter(int kind, float param) {
|
||||
switch (kind) {
|
||||
beginPixels();
|
||||
|
||||
switch (kind) {
|
||||
case BLUR:
|
||||
if (format == ALPHA)
|
||||
blurAlpha(param);
|
||||
@@ -729,7 +731,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
throw new RuntimeException("Use filter(DILATE) instead of " +
|
||||
"filter(DILATE, param)");
|
||||
}
|
||||
updatePixels(); // mark as modified
|
||||
endPixels(); // mark as modified
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user