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
This commit is contained in:
Ingo Proetel 2004-05-04 19:27:11 +00:00 committed by Michael Koch
parent fae4c98f1b
commit 27c2c3ec4a
6 changed files with 144 additions and 21 deletions

View file

@ -427,7 +427,7 @@ public final class SystemColor extends Color implements Serializable
* as the system color is solid, the context does not need any of the
* passed parameters to do its job.
*
* @param cm the requested color model, ignored
* @param cm the requested color model
* @param deviceBounds the bounding box in device coordinates, ignored
* @param userBounds the bounding box in user coordinates, ignored
* @param xform the bounds transformation, ignored
@ -441,8 +441,8 @@ public final class SystemColor extends Color implements Serializable
{
Toolkit.getDefaultToolkit().loadSystemColors(colors);
int color = colors[value] | ALPHA_MASK;
if (context == null || color != context.color)
context = new ColorPaintContext(color);
if (context == null || color != context.color || !context.getColorModel().equals(cm))
context = new ColorPaintContext(cm,color);
return context;
}