More fixes
This commit is contained in:
1 parent
a7705a51ca
commit
ca7878303d
4 files changed
+21
-3
No files matched your search
@@ -31,6 +31,6 @@ public class Graphics {
|
||||
|
||||
public boolean drawImage(Image image, int x, int y, ImageObserver observer) {
|
||||
if (!(image instanceof BufferedImage)) return true;
|
||||
return g2d.drawImage(((BufferedImage) image).getBaseImage());
|
||||
return g2d.drawImage(((BufferedImage) image).getBaseImage(), x, y, observer);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package jdpi.awt.image;
|
||||
|
||||
import jdpi.awt.*;
|
||||
import jdpi.awt.Image;
|
||||
|
||||
public class BufferedImage extends Image {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package jdpi.awt.image;
|
||||
|
||||
public class ImageObserver {
|
||||
import jdpi.awt.Image;
|
||||
|
||||
}
|
||||
public interface ImageObserver extends java.awt.image.ImageObserver {
|
||||
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package jdpi.awt.image;
|
||||
|
||||
import jdpi.awt.Image;
|
||||
|
||||
public void ImageObserverWrapper {
|
||||
public java.awt.image.ImageObserver wrap(final ImageObserver observer) {
|
||||
return new java.awt.image.ImageObserver() {
|
||||
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height) {
|
||||
if (img instanceof BufferedImage) {
|
||||
observer.imageUpdate((BufferedImage) imf, infoflags, x, y, width, height);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user