final fixes
This commit is contained in:
1 parent
ca7878303d
commit
2a115d7dd1
3 files changed
+8
-8
No files matched your search
@@ -4,10 +4,6 @@ import jdpi.awt.image.*;
|
||||
|
||||
public class Graphics {
|
||||
protected java.awt.Graphics2D g2d;
|
||||
|
||||
public Graphics(java.awt.Graphics g2d) {
|
||||
this((java.awt.Graphics2D) g2d);
|
||||
}
|
||||
|
||||
public Graphics(java.awt.Graphics2D g2d) {
|
||||
this.g2d = g2d;
|
||||
|
||||
@@ -6,11 +6,15 @@ import jdpi.awt.Image;
|
||||
public class BufferedImage extends Image {
|
||||
private java.awt.image.BufferedImage mImg;
|
||||
public BufferedImage(int width, int height, int imageType) {
|
||||
mImg = new java.awt.image.BufferedImage(width, height, imageType);
|
||||
this(new java.awt.image.BufferedImage(width, height, imageType));
|
||||
}
|
||||
|
||||
public BufferedImage(java.awt.image.BufferedImage img) {
|
||||
mImg = img;
|
||||
}
|
||||
|
||||
public Graphics getGraphics() {
|
||||
return new Graphics2D(mImg.getGraphics());
|
||||
return new Graphics2D((java.awt.Graphics2D) mImg.getGraphics());
|
||||
}
|
||||
|
||||
public Graphics2D createGraphics() {
|
||||
|
||||
@@ -6,8 +6,8 @@ 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);
|
||||
if (img instanceof java.awt.image.BufferedImage) {
|
||||
observer.imageUpdate(new BufferedImage((java.awt.image.BufferedImage) img), infoflags, x, y, width, height);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user