--- /home/tromey/gnu/Nightly/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics.java 2004-10-10 02:17:53.000000000 -0600 +++ gnu/java/awt/peer/gtk/GdkGraphics.java 2004-11-25 02:23:49.000000000 -0700 @@ -127,15 +127,6 @@ return new GdkGraphics (this); } -// public Graphics create (int x, int y, int width, int height) -// { -// GdkGraphics g = new GdkGraphics (this); -// g.translate (x, y); -// g.clipRect (0, 0, width, height); - -// return g; -// } - native public void dispose (); native void copyPixmap (Graphics g, int x, int y, int width, int height); @@ -152,13 +143,20 @@ if (img instanceof GtkOffScreenImage) { + int width = img.getWidth (null); + int height = img.getHeight (null); copyPixmap (img.getGraphics (), - x, y, img.getWidth (null), img.getHeight (null)); + x, y, width, height); + // FIXME: need to differentiate between SOMEBITS and FRAMEBITS. + if (observer != null) + observer.imageUpdate (img, + ImageObserver.FRAMEBITS, + x, y, width, height); return true; } GtkImage image = (GtkImage) img; - new GtkImagePainter (image, this, x, y, -1, -1, bgcolor); + new GtkImagePainter (image, this, x, y, -1, -1, bgcolor, observer); return image.isLoaded (); } @@ -169,8 +167,16 @@ if (img instanceof GtkOffScreenImage) { + int width = img.getWidth (null); + int height = img.getHeight (null); copyPixmap (img.getGraphics (), - x, y, img.getWidth (null), img.getHeight (null)); + x, y, width, height); + + // FIXME: need to differentiate between SOMEBITS and FRAMEBITS. + if (observer != null) + observer.imageUpdate (img, + ImageObserver.FRAMEBITS, + x, y, width, height); return true; } @@ -191,11 +197,16 @@ copyAndScalePixmap (img.getGraphics (), false, false, 0, 0, img.getWidth (null), img.getHeight (null), x, y, width, height); + // FIXME: need to differentiate between SOMEBITS and FRAMEBITS. + if (observer != null) + observer.imageUpdate (img, + ImageObserver.FRAMEBITS, + x, y, width, height); return true; } GtkImage image = (GtkImage) img; - new GtkImagePainter (image, this, x, y, width, height, bgcolor); + new GtkImagePainter (image, this, x, y, width, height, bgcolor, observer); return image.isLoaded (); } @@ -275,12 +286,18 @@ copyAndScalePixmap (img.getGraphics (), x_flip, y_flip, sx_start, sy_start, s_width, s_height, dx_start, dy_start, d_width, d_height); + + // FIXME: need to differentiate between SOMEBITS and FRAMEBITS. + if (observer != null) + observer.imageUpdate (img, + ImageObserver.FRAMEBITS, + dx_start, dy_start, d_width, d_height); return true; } GtkImage image = (GtkImage) img; new GtkImagePainter (image, this, dx1, dy1, dx2, dy2, - sx1, sy1, sx2, sy2, bgcolor); + sx1, sy1, sx2, sy2, bgcolor, observer); return image.isLoaded (); }