classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch for java.awt.image.ColorModel


From: Ingo Prötel
Subject: Patch for java.awt.image.ColorModel
Date: Mon, 05 Apr 2004 13:11:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

I suggest the following patch

2004-04-05  Ingo Proetel <address@hidden>

* java/awt/image/ColorModel.java (getRGBdefault): Default ColorModel has 32 bit pixels not 8 bit pixels.
        (isCompatibleRaster): Added javadoc comment.

ingo

--
Ingo Prötel                                          address@hidden
aicas GmbH                                        http://www.aicas.com
Haid-und-Neu-Str. 18                        phone   +49 721 663 968-32
76131 Karlsruhe                             fax     +49 721 663 968-93
Germany
Index: java/awt/image/ColorModel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/ColorModel.java,v
retrieving revision 1.17
diff -u -r1.17 ColorModel.java
--- java/awt/image/ColorModel.java      24 Jun 2003 17:07:07 -0000      1.17
+++ java/awt/image/ColorModel.java      5 Apr 2004 11:06:05 -0000
@@ -166,7 +166,7 @@
    */
   public static ColorModel getRGBdefault()
   {
-    return new DirectColorModel(8, 0xff0000, 0xff00, 0xff, 0xff000000);
+    return new DirectColorModel(32, 0xff0000, 0xff00, 0xff, 0xff000000);
   }
 
   public final boolean hasAlpha()
@@ -597,7 +597,11 @@
     return null;
   }
     
-  // Typically overridden
+  /**
+   * Checks if the given raster has a compatible data-layout (SampleModel).
+   * @param raster The Raster to test.
+   * @return true if raster is compatible.
+   */ 
   public boolean isCompatibleRaster(Raster raster)
   {
     SampleModel sampleModel = raster.getSampleModel();

reply via email to

[Prev in Thread] Current Thread [Next in Thread]