classpath
[Top][All Lists]
Advanced

[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/ColorModel.java (getRGBdefault): Default ColorModel has 32 bit pixels not 8 bit pixels.
        (isCompatibleRaster): Added javadoc comment.

ingo



-  // 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.
+ */


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
classes?


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


Tom

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

--
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




reply via email to

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