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:
parent
fae4c98f1b
commit
27c2c3ec4a
6 changed files with 144 additions and 21 deletions
|
@ -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();
|
||||
|
|
|
@ -349,7 +349,7 @@ public class ComponentSampleModel extends SampleModel
|
|||
if (scanlineStride == rowSize)
|
||||
{
|
||||
// Collapse scan lines:
|
||||
scanlineStride = rowSize *= h;
|
||||
rowSize *= h;
|
||||
h = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue