[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: Fixes for BufferedImage

Kaffe CVS cvs-commits at kaffe.org
Sun Mar 21 10:39:03 PST 2004


PatchSet 4548 
Date: 2004/03/21 18:15:12
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: Fixes for BufferedImage

2004-03-21  Dalibor Topic <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2004-03-19  Olga Rodimina  <rodimina at redhat.com>

        * java/awt/image/BufferedImage.java:
        (createGraphics): Implemented.

        2004-03-19 Olga Rodimina <rodimina at redhat.com>

        * java/awt/image/BufferedImage.java:
        (copyData): if dest is null, create raster with same
        dimensions as the current image.

Members: 
	ChangeLog:1.2126->1.2127 
	libraries/javalib/java/awt/image/BufferedImage.java:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2126 kaffe/ChangeLog:1.2127
--- kaffe/ChangeLog:1.2126	Sun Mar 21 17:45:44 2004
+++ kaffe/ChangeLog	Sun Mar 21 18:15:12 2004
@@ -2,6 +2,21 @@
 
 	Resynced with GNU Classpath.
 
+	2004-03-19  Olga Rodimina  <rodimina at redhat.com>
+
+        * java/awt/image/BufferedImage.java:
+        (createGraphics): Implemented.
+
+	2004-03-19 Olga Rodimina <rodimina at redhat.com>
+
+        * java/awt/image/BufferedImage.java:
+        (copyData): if dest is null, create raster with same
+        dimensions as the current image.
+
+2004-03-21  Dalibor Topic <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2004-03-19  David Jee  <djee at redhat.com>
 
         * java/awt/GridBagLayout.java
Index: kaffe/libraries/javalib/java/awt/image/BufferedImage.java
diff -u kaffe/libraries/javalib/java/awt/image/BufferedImage.java:1.4 kaffe/libraries/javalib/java/awt/image/BufferedImage.java:1.5
--- kaffe/libraries/javalib/java/awt/image/BufferedImage.java:1.4	Wed Oct 22 10:34:51 2003
+++ kaffe/libraries/javalib/java/awt/image/BufferedImage.java	Sun Mar 21 18:15:13 2004
@@ -39,6 +39,7 @@
 
 import java.awt.Graphics;
 import java.awt.Graphics2D;
+import java.awt.GraphicsEnvironment;
 import java.awt.Image;
 import java.awt.Point;
 import java.awt.Rectangle;
@@ -255,7 +256,8 @@
   public WritableRaster copyData(WritableRaster dest)
   {
     if (dest == null)
-      dest = raster.createCompatibleWritableRaster();
+      dest = raster.createCompatibleWritableRaster(getMinX(), getMinY(),
+                                                   getWidth(),getHeight());
 
     int x = dest.getMinX();
     int y = dest.getMinY();
@@ -282,8 +284,9 @@
 
   public Graphics2D createGraphics()
   {
-    throw new UnsupportedOperationException("not implemented");
-    // will require a lot of effort to implement
+    GraphicsEnvironment env;
+    env = GraphicsEnvironment.getLocalGraphicsEnvironment ();
+    return env.createGraphics (this);
   }
 
   public void flush() {




More information about the kaffe mailing list