mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
bring back getImage() to fix #4473
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user