It seems that the PaintContext implementations are expected to produce rasters that start at (0,0) and not at (x,y). I fixed this in ColorPaintContext. The GradientPaintContext already works like that (in fact, David told me that this GradientPaintContext was tested to work on Sun, and so I could easily conclude that the ColorPaintContext must be wrong.)
2006-05-10 Roman Kennke <[EMAIL PROTECTED]>
* java/awt/ColorPaintContext.java
(getRaster): Create Raster with (0,0) as source location.
/Roman
--
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: java/awt/ColorPaintContext.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/ColorPaintContext.java,v
retrieving revision 1.7
diff -u -1 -0 -r1.7 ColorPaintContext.java
--- java/awt/ColorPaintContext.java 7 May 2006 01:04:32 -0000 1.7
+++ java/awt/ColorPaintContext.java 10 May 2006 09:35:31 -0000
@@ -110,21 +110,21 @@
* @return a raster for the given area and color
*/
public Raster getRaster(int x, int y, int width, int height)
{
if( cachedRaster == null
|| cachedRaster.getWidth() < width
|| cachedRaster.getHeight() < height)
{
cachedRaster = new ColorRaster(colorModel, 0, 0, width, height, color);
}
- return cachedRaster.createChild(0 ,0 ,width ,height ,x ,y , null);
+ return cachedRaster.createChild(0 ,0 ,width ,height ,0 ,0 , null);
}
/**
* A ColorRaster is a raster that is completely filled with one color. The
* data layout is taken from the color model given to the constructor.
*/
private class ColorRaster extends Raster
{
/**
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
