This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.awt.image.ColorModel
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 25 Jun 2003 13:27:10 +0200
- Subject: FYI: Patch: java.awt.image.ColorModel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I commited the attached patch to trunk to merge
java.awt.image.ColorModel again with classpath.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE++YcOWSOgCCdjSDsRAiegAJ0RIVHzipnH60MbN4wcCPt4D8aj1wCfY0gx
MaNVxw8C+wzHd6PuKBiFe+k=
=QwEy
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1993
diff -u -b -B -r1.1993 ChangeLog
--- ChangeLog 25 Jun 2003 07:00:33 -0000 1.1993
+++ ChangeLog 25 Jun 2003 11:22:58 -0000
@@ -1,5 +1,10 @@
2003-06-25 Michael Koch <konqueror@gmx.de>
+ * java/awt/image/ColorModel.java:
+ New version from classpath.
+
+2003-06-25 Michael Koch <konqueror@gmx.de>
+
* java/net/PlainDatagramSocketImpl.java:
Partly merged with classpath, this mainly adds documentation.
Index: java/awt/image/ColorModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/ColorModel.java,v
retrieving revision 1.12
diff -u -b -B -r1.12 ColorModel.java
--- java/awt/image/ColorModel.java 24 Jun 2003 10:50:21 -0000 1.12
+++ java/awt/image/ColorModel.java 25 Jun 2003 11:22:58 -0000
@@ -76,7 +76,7 @@
* </ul>
*
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
- * @author C. Brian Jones (cbj@gnu.org)
+ * @author C. Brian Jones <cbj@gnu.org>
*/
public abstract class ColorModel implements Transparency
{
@@ -155,6 +155,11 @@
this.transferType = transferType;
}
+ public void finalize()
+ {
+ // Do nothing here.
+ }
+
/**
* Returns the default color model which in Sun's case is an instance
* of <code>DirectColorModel</code>.
@@ -384,7 +389,7 @@
*/
public Object getDataElements(int rgb, Object pixel)
{
- // FIXME: implement
+ // subclasses has to implement this method.
throw new UnsupportedOperationException();
}
@@ -403,8 +408,9 @@
* according to the color model. Each component sample is stored
* as a separate element in the array.
*/
- public int[] getComponents(int pixel, int[] components, int offset) {
- // FIXME: implement
+ public int[] getComponents(int pixel, int[] components, int offset)
+ {
+ // subclasses has to implement this method.
throw new UnsupportedOperationException();
}
@@ -426,6 +432,7 @@
*/
public int[] getComponents(Object pixel, int[] components, int offset)
{
+ // subclasses has to implement this method.
throw new UnsupportedOperationException();
}
@@ -476,6 +483,19 @@
}
/**
+ * Convert unnormalized components to normalized components.
+ *
+ * @since 1.4
+ */
+ public float[] getNormalizedComponents (Object pixel,
+ float[] normComponents,
+ int normOffset)
+ {
+ // subclasses has to implement this method.
+ throw new UnsupportedOperationException();
+ }
+
+ /**
* Converts the unnormalized component samples from an array to a
* pixel value. I.e. composes the pixel from component samples, but
* does not perform any color conversion or scaling of the samples.
@@ -499,11 +519,25 @@
*/
public int getDataElement(int[] components, int offset)
{
+ // subclasses has to implement this method.
+ throw new UnsupportedOperationException();
+ }
+
+ public int getDataElement (float[] components, int offset)
+ {
+ // subclasses has to implement this method.
throw new UnsupportedOperationException();
}
public Object getDataElements(int[] components, int offset, Object obj)
{
+ // subclasses has to implement this method.
+ throw new UnsupportedOperationException();
+ }
+
+ public int getDataElements (float[] components, Object obj)
+ {
+ // subclasses has to implement this method.
throw new UnsupportedOperationException();
}
@@ -592,10 +626,6 @@
public final int getTransferType ()
{
return transferType;
- }
-
- public void finalize()
- {
}
/**