[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: MultiPixelPackedSampleModel fixes
Kaffe CVS
cvs-commits at kaffe.org
Fri Dec 3 03:42:49 PST 2004
PatchSet 5517
Date: 2004/12/03 11:38:32
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: MultiPixelPackedSampleModel fixes
2004-12-03 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:
Resynced with GNU Classpath.
2004-11-25 Sven de Marothy <sven at physto.se>
* java/awt/image/MultiPixelPackedSampleModel.java
(MultiPixelPackedSampleModel): Corrected parameters, order of bit
shifts and masks, stride length off by one.
Members:
ChangeLog:1.3063->1.3064
libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3063 kaffe/ChangeLog:1.3064
--- kaffe/ChangeLog:1.3063 Fri Dec 3 09:15:59 2004
+++ kaffe/ChangeLog Fri Dec 3 11:38:32 2004
@@ -1,3 +1,14 @@
+2004-12-03 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:
+ Resynced with GNU Classpath.
+
+ 2004-11-25 Sven de Marothy <sven at physto.se>
+
+ * java/awt/image/MultiPixelPackedSampleModel.java
+ (MultiPixelPackedSampleModel): Corrected parameters, order of bit
+ shifts and masks, stride length off by one.
+
2004-12-02 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/awt/image/IndexColorModel.java:
Index: kaffe/libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java
diff -u kaffe/libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:1.1 kaffe/libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:1.2
--- kaffe/libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java:1.1 Mon Sep 27 17:41:08 2004
+++ kaffe/libraries/javalib/java/awt/image/MultiPixelPackedSampleModel.java Fri Dec 3 11:38:35 2004
@@ -59,7 +59,7 @@
public MultiPixelPackedSampleModel(int dataType, int w, int h,
int numberOfBits)
{
- this(dataType, w, h, 0, numberOfBits, 0);
+ this(dataType, w, h, numberOfBits, 0, 0);
}
public MultiPixelPackedSampleModel(int dataType, int w, int h,
@@ -101,7 +101,7 @@
// Compute scan line large enough for w pixels.
if (scanlineStride == 0)
- scanlineStride = ((dataBitOffset + w * numberOfBits) / elemBits) + 1;
+ scanlineStride = ((dataBitOffset + w * numberOfBits) / elemBits);
this.scanlineStride = scanlineStride;
@@ -112,8 +112,9 @@
bitOffsets = new int[numElems];
for (int i=0; i < numElems; i++)
{
- bitOffsets[i] = numberOfBits * i;
- bitMasks[i] = ((1 << numberOfBits) - 1) << bitOffsets[i];
+ bitOffsets[numElems - i- 1] = numberOfBits * i;
+ bitMasks[numElems - i - 1] = ((1 << numberOfBits) - 1) <<
+ bitOffsets[numElems - i - 1];
}
}
More information about the kaffe
mailing list