[Patch] java.awt.image merged
Michael Koch
konqueror@gmx.de
Sat Oct 16 15:31:00 GMT 2004
Hi list,
I just merged the attached patch from GNU classpath.
Michael
2004-10-16 Michael Koch <konqueror@gmx.de>
* java/awt/image/ByteLookupTable.java
(ByteLookupTable) :Fixed HTML entities in javadocs.
(lookupPixel): Fix case when dst is null.
* java/awt/image/ShortLookupTable.java
(ShortLookupTable) :Fixed HTML entities in javadocs.
(lookupPixel): Fix case when dst is null.
* java/awt/image/DataBufferByte.java,
java/awt/image/DataBufferDouble.java,
java/awt/image/DataBufferFloat.java,
java/awt/image/DataBufferInt.java,
java/awt/image/DataBufferShort.java,
java/awt/image/DataBufferUShort.java:
Fix initialization of bankData in constructors.
-------------- next part --------------
Index: java/awt/image/ByteLookupTable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/ByteLookupTable.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 ByteLookupTable.java
--- java/awt/image/ByteLookupTable.java 15 Jul 2004 05:36:13 -0000 1.1.2.1
+++ java/awt/image/ByteLookupTable.java 16 Oct 2004 15:30:24 -0000
@@ -61,7 +61,7 @@
*
* @param offset Offset to be subtracted.
* @param data Array of lookup tables.
- * @exception IllegalArgumentException if offset < 0 or data.length < 1.
+ * @exception IllegalArgumentException if offset < 0 or data.length < 1.
*/
public ByteLookupTable(int offset, byte[][] data)
throws IllegalArgumentException
@@ -78,7 +78,7 @@
*
* @param offset Offset to be subtracted.
* @param data Lookup table for all components.
- * @exception IllegalArgumentException if offset < 0.
+ * @exception IllegalArgumentException if offset < 0.
*/
public ByteLookupTable(int offset, byte[] data)
throws IllegalArgumentException
@@ -114,7 +114,7 @@
throws ArrayIndexOutOfBoundsException
{
if (dst == null)
- dst = new int[numComponents];
+ dst = new int[src.length];
if (data.length == 1)
for (int i=0; i < src.length; i++)
@@ -147,7 +147,7 @@
throws ArrayIndexOutOfBoundsException
{
if (dst == null)
- dst = new byte[numComponents];
+ dst = new byte[src.length];
if (data.length == 1)
for (int i=0; i < src.length; i++)
Index: java/awt/image/ShortLookupTable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/ShortLookupTable.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 ShortLookupTable.java
--- java/awt/image/ShortLookupTable.java 15 Jul 2004 05:36:13 -0000 1.1.2.1
+++ java/awt/image/ShortLookupTable.java 16 Oct 2004 15:30:24 -0000
@@ -61,7 +61,7 @@
*
* @param offset Offset to be subtracted.
* @param data Array of lookup tables.
- * @exception IllegalArgumentException if offset < 0 or data.length < 1.
+ * @exception IllegalArgumentException if offset < 0 or data.length < 1.
*/
public ShortLookupTable(int offset, short[][] data)
throws IllegalArgumentException
@@ -78,7 +78,7 @@
*
* @param offset Offset to be subtracted.
* @param data Lookup table for all components.
- * @exception IllegalArgumentException if offset < 0.
+ * @exception IllegalArgumentException if offset < 0.
*/
public ShortLookupTable(int offset, short[] data)
throws IllegalArgumentException
@@ -114,7 +114,7 @@
throws ArrayIndexOutOfBoundsException
{
if (dst == null)
- dst = new int[numComponents];
+ dst = new int[src.length];
if (data.length == 1)
for (int i=0; i < src.length; i++)
@@ -147,7 +147,7 @@
throws ArrayIndexOutOfBoundsException
{
if (dst == null)
- dst = new short[numComponents];
+ dst = new short[src.length];
if (data.length == 1)
for (int i=0; i < src.length; i++)
Index: java/awt/image/DataBufferByte.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferByte.java,v
retrieving revision 1.5.18.1
diff -u -r1.5.18.1 DataBufferByte.java
--- java/awt/image/DataBufferByte.java 23 Sep 2004 07:02:59 -0000 1.5.18.1
+++ java/awt/image/DataBufferByte.java 16 Oct 2004 15:30:24 -0000
@@ -62,8 +62,10 @@
*/
public DataBufferByte(int size)
{
- super(TYPE_BYTE, size);
+ super(TYPE_BYTE, size, 1, 0);
+ bankData = new byte[1][];
data = new byte[size];
+ bankData[0] = data;
}
/**
@@ -92,8 +94,10 @@
*/
public DataBufferByte(byte[] dataArray, int size)
{
- super(TYPE_BYTE, size);
+ super(TYPE_BYTE, size, 1, 0);
+ bankData = new byte[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -111,7 +115,9 @@
public DataBufferByte(byte[] dataArray, int size, int offset)
{
super(TYPE_BYTE, size, 1, offset);
+ bankData = new byte[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
Index: java/awt/image/DataBufferDouble.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferDouble.java,v
retrieving revision 1.1.16.2
diff -u -r1.1.16.2 DataBufferDouble.java
--- java/awt/image/DataBufferDouble.java 23 Sep 2004 07:02:59 -0000 1.1.16.2
+++ java/awt/image/DataBufferDouble.java 16 Oct 2004 15:30:24 -0000
@@ -66,8 +66,10 @@
*/
public DataBufferDouble(int size)
{
- super(TYPE_DOUBLE, size);
+ super(TYPE_DOUBLE, size, 1, 0);
+ bankData = new double[1][];
data = new double[size];
+ bankData[0] = data;
}
/**
@@ -96,8 +98,10 @@
*/
public DataBufferDouble(double[] dataArray, int size)
{
- super(TYPE_DOUBLE, size);
+ super(TYPE_DOUBLE, size, 1, 0);
+ bankData = new double[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -115,7 +119,9 @@
public DataBufferDouble(double[] dataArray, int size, int offset)
{
super(TYPE_DOUBLE, size, 1, offset);
+ bankData = new double[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
Index: java/awt/image/DataBufferFloat.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferFloat.java,v
retrieving revision 1.1.16.2
diff -u -r1.1.16.2 DataBufferFloat.java
--- java/awt/image/DataBufferFloat.java 23 Sep 2004 07:02:59 -0000 1.1.16.2
+++ java/awt/image/DataBufferFloat.java 16 Oct 2004 15:30:24 -0000
@@ -64,8 +64,10 @@
*/
public DataBufferFloat(int size)
{
- super(TYPE_FLOAT, size);
+ super(TYPE_FLOAT, size, 1, 0);
+ bankData = new float[1][];
data = new float[size];
+ bankData[0] = data;
}
/**
@@ -94,8 +96,10 @@
*/
public DataBufferFloat(float[] dataArray, int size)
{
- super(TYPE_FLOAT, size);
+ super(TYPE_FLOAT, size, 1, 0);
+ bankData = new float[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -113,7 +117,9 @@
public DataBufferFloat(float[] dataArray, int size, int offset)
{
super(TYPE_FLOAT, size, 1, offset);
+ bankData = new float[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
Index: java/awt/image/DataBufferInt.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferInt.java,v
retrieving revision 1.5.18.1
diff -u -r1.5.18.1 DataBufferInt.java
--- java/awt/image/DataBufferInt.java 23 Sep 2004 07:02:59 -0000 1.5.18.1
+++ java/awt/image/DataBufferInt.java 16 Oct 2004 15:30:24 -0000
@@ -62,8 +62,10 @@
*/
public DataBufferInt(int size)
{
- super(TYPE_INT, size);
+ super(TYPE_INT, size, 1, 0);
+ bankData = new int[1][];
data = new int[size];
+ bankData[0] = data;
}
/**
@@ -92,8 +94,10 @@
*/
public DataBufferInt(int[] dataArray, int size)
{
- super(TYPE_INT, size);
+ super(TYPE_INT, size, 1, 0);
+ bankData = new int[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -111,7 +115,9 @@
public DataBufferInt(int[] dataArray, int size, int offset)
{
super(TYPE_INT, size, 1, offset);
+ bankData = new int[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
Index: java/awt/image/DataBufferShort.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferShort.java,v
retrieving revision 1.1.16.2
diff -u -r1.1.16.2 DataBufferShort.java
--- java/awt/image/DataBufferShort.java 23 Sep 2004 07:02:59 -0000 1.1.16.2
+++ java/awt/image/DataBufferShort.java 16 Oct 2004 15:30:24 -0000
@@ -62,8 +62,10 @@
*/
public DataBufferShort(int size)
{
- super(TYPE_SHORT, size);
+ super(TYPE_SHORT, size, 1, 0);
+ bankData = new short[1][];
data = new short[size];
+ bankData[0] = data;
}
/**
@@ -92,8 +94,10 @@
*/
public DataBufferShort(short[] dataArray, int size)
{
- super(TYPE_SHORT, size);
+ super(TYPE_SHORT, size, 1, 0);
+ bankData = new short[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -111,7 +115,9 @@
public DataBufferShort(short[] dataArray, int size, int offset)
{
super(TYPE_SHORT, size, 1, offset);
+ bankData = new short[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
Index: java/awt/image/DataBufferUShort.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/DataBufferUShort.java,v
retrieving revision 1.5.18.1
diff -u -r1.5.18.1 DataBufferUShort.java
--- java/awt/image/DataBufferUShort.java 23 Sep 2004 07:02:59 -0000 1.5.18.1
+++ java/awt/image/DataBufferUShort.java 16 Oct 2004 15:30:24 -0000
@@ -62,8 +62,10 @@
*/
public DataBufferUShort(int size)
{
- super(TYPE_USHORT, size);
+ super(TYPE_USHORT, size, 1, 0);
+ bankData = new short[1][];
data = new short[size];
+ bankData[0] = data;
}
/**
@@ -88,8 +90,10 @@
*/
public DataBufferUShort(short[] dataArray, int size)
{
- super(TYPE_USHORT, size);
+ super(TYPE_USHORT, size, 1, 0);
+ bankData = new short[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
@@ -103,7 +107,9 @@
public DataBufferUShort(short[] dataArray, int size, int offset)
{
super(TYPE_USHORT, size, 1, offset);
+ bankData = new short[1][];
data = dataArray;
+ bankData[0] = data;
}
/**
More information about the Java-patches
mailing list