[Top][All Lists]

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

Re: Patch for java.awt.image.ColorModel

From: Ingo Prötel
Subject: Re: Patch for java.awt.image.ColorModel
Date: Tue, 06 Apr 2004 19:15:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Thomas Fitzsimmons wrote:
On Mon, 2004-04-05 at 07:11, Ingo Prötel wrote:

I suggest the following patch

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

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


-  // Typically overridden
+  /**
+   * Checks if the given raster has a compatible data-layout
+   * @param raster The Raster to test.
+   * @return true if raster is compatible.
+ */

This implementation is different from the description in Sun's
javadocs.  Their default implementation is to throw an
UnsupportedOperationException, since ColorModel is an abstract class. Does the implementation here need to be moved into one of the derived

  public boolean isCompatibleRaster(Raster raster)
    SampleModel sampleModel = raster.getSampleModel();


Again one of the cases where I put something for convenience (the comment).
But looking at the doc this method should be changed. I will look into it.


Ingo Prötel                                          address@hidden
aicas GmbH                              
Haid-und-Neu-Str. 18                        phone   +49 721 663 968-32
76131 Karlsruhe                             fax     +49 721 663 968-93

reply via email to

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