bring back getImage() to fix #4473

This commit is contained in:
Ben Fry
2016-08-12 21:34:50 -04:00
parent 0e603a151a
commit 2c0c1b9a36
4 changed files with 14 additions and 8 deletions
@@ -253,6 +253,16 @@ public class PGraphicsJava2D extends PGraphics {
}
/**
* Still need a means to get the java.awt.Image object, since getNative()
* is going to return the {@link Graphics2D} object.
*/
@Override
public Image getImage() {
return image;
}
/** Returns the java.awt.Graphics2D object used by this renderer. */
@Override
public Object getNative() {
+1 -1
View File
@@ -345,8 +345,8 @@ public class PImage implements PConstants, Cloneable {
/**
* Use the getNative() method instead, which allows library interfaces to be
* written in a cross-platform fashion for desktop, Android, and others.
* This is still included for PGraphics objects, which may need the image.
*/
@Deprecated
public Image getImage() { // ignore
return (Image) getNative();
}