From a1937ddbfca67c4aa000d6e57cf238be2642621b Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 25 Jun 2003 11:23:33 +0000 Subject: 2003-06-25 Michael Koch * java/awt/image/ColorModel.java: New version from classpath. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68474 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 5 ++++ libjava/java/awt/image/ColorModel.java | 48 +++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 9 deletions(-) (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 01188835bd4..901e4b7c4a4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-06-25 Michael Koch + + * java/awt/image/ColorModel.java: + New version from classpath. + 2003-06-25 Michael Koch * java/net/PlainDatagramSocketImpl.java: diff --git a/libjava/java/awt/image/ColorModel.java b/libjava/java/awt/image/ColorModel.java index 360a7b49323..767b83f7dd0 100644 --- a/libjava/java/awt/image/ColorModel.java +++ b/libjava/java/awt/image/ColorModel.java @@ -76,7 +76,7 @@ import gnu.java.awt.Buffers; * * * @author Rolf W. Rasmussen - * @author C. Brian Jones (cbj@gnu.org) + * @author C. Brian Jones */ public abstract class ColorModel implements Transparency { @@ -155,6 +155,11 @@ public abstract class ColorModel implements Transparency this.transferType = transferType; } + public void finalize() + { + // Do nothing here. + } + /** * Returns the default color model which in Sun's case is an instance * of DirectColorModel. @@ -226,7 +231,7 @@ public abstract class ColorModel implements Transparency * * @see #getRed(int) */ - public abstract int getGreen(int pixel); + public abstract int getGreen(int pixel); /** * Converts pixel value to sRGB and extract blue int sample @@ -384,7 +389,7 @@ public abstract class ColorModel implements Transparency */ public Object getDataElements(int rgb, Object pixel) { - // FIXME: implement + // subclasses has to implement this method. throw new UnsupportedOperationException(); } @@ -403,8 +408,9 @@ public abstract class ColorModel implements Transparency * 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 abstract class ColorModel implements Transparency */ public int[] getComponents(Object pixel, int[] components, int offset) { + // subclasses has to implement this method. throw new UnsupportedOperationException(); } @@ -475,6 +482,19 @@ public abstract class ColorModel implements Transparency return normComponents; } + /** + * 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 @@ -499,14 +519,28 @@ public abstract class ColorModel implements Transparency */ 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(); + } + public boolean equals(Object obj) { if (!(obj instanceof ColorModel)) return false; @@ -594,10 +628,6 @@ public abstract class ColorModel implements Transparency return transferType; } - public void finalize() - { - } - /** * Subclasses must override this method if it is possible for the * color model to have an alpha channel. -- cgit v1.2.3