aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/image
diff options
context:
space:
mode:
authorIngo Proetel <proetel@aicas.com>2004-05-04 19:27:11 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-05-04 19:27:11 +0000
commit27c2c3ec4ac46015d9a616c2aafe30fd1b5582ab (patch)
tree4945426aed8ab42ddbdcb6975ef386280d1ec7a5 /libjava/java/awt/image
parentfae4c98f1b61242c3e20ba4580a991b94080423a (diff)
downloadgcc-27c2c3ec4ac46015d9a616c2aafe30fd1b5582ab.zip
gcc-27c2c3ec4ac46015d9a616c2aafe30fd1b5582ab.tar.gz
gcc-27c2c3ec4ac46015d9a616c2aafe30fd1b5582ab.tar.bz2
ColorModel.java (getRGBdefault): Default ColorModel has 32 bit pixels not 8 bit pixels.
2004-05-04 Ingo Proetel <proetel@aicas.com> * java/awt/image/ColorModel.java (getRGBdefault): Default ColorModel has 32 bit pixels not 8 bit pixels. (isCompatibleRaster): Added javadoc comment. 2004-05-04 Ingo Proetel <proetel@aicas.com> * java/awt/image/ComponentSampleModel.java (setDataSamples):Do not reset scanline stride. 2004-05-04 Ingo Proetel <proetel@aicas.com> * java/awt/ColorPaintContext.java (<init>): Added ColorModel to signature. (getColorModel): Return the actual color model. (getRaster): Implemented. (ColorRaster): New inner class. * java/awt/SystemColor.java (createContext): Use ColorModel when creating a PaintContext. * java/awt/Color.java (<init>): Make exception more verbose. (createContext): Use ColorModel when creating a PaintContext. From-SVN: r81486
Diffstat (limited to 'libjava/java/awt/image')
-rw-r--r--libjava/java/awt/image/ColorModel.java8
-rw-r--r--libjava/java/awt/image/ComponentSampleModel.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/libjava/java/awt/image/ColorModel.java b/libjava/java/awt/image/ColorModel.java
index 767b83f..c73f4fd 100644
--- a/libjava/java/awt/image/ColorModel.java
+++ b/libjava/java/awt/image/ColorModel.java
@@ -166,7 +166,7 @@ public abstract class ColorModel implements Transparency
*/
public static ColorModel getRGBdefault()
{
- return new DirectColorModel(8, 0xff0000, 0xff00, 0xff, 0xff000000);
+ return new DirectColorModel(32, 0xff0000, 0xff00, 0xff, 0xff000000);
}
public final boolean hasAlpha()
@@ -597,7 +597,11 @@ public abstract class ColorModel implements Transparency
return null;
}
- // 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.
+ */
public boolean isCompatibleRaster(Raster raster)
{
SampleModel sampleModel = raster.getSampleModel();
diff --git a/libjava/java/awt/image/ComponentSampleModel.java b/libjava/java/awt/image/ComponentSampleModel.java
index 0a40161..c7b08b9 100644
--- a/libjava/java/awt/image/ComponentSampleModel.java
+++ b/libjava/java/awt/image/ComponentSampleModel.java
@@ -349,7 +349,7 @@ public class ComponentSampleModel extends SampleModel
if (scanlineStride == rowSize)
{
// Collapse scan lines:
- scanlineStride = rowSize *= h;
+ rowSize *= h;
h = 1;
}