[multiple changes]
2003-09-16 Graydon Hoare <graydon@redhat.com> * java/awt/BufferedImage.java (setData): Support non-component sample models. (getData): Same. 2003-09-10 Graydon Hoare <graydon@redhat.com> * java/awt/geom/AffineTransform.java(transform): Fix airthmetic bugs. * java/awt/geom/Arc2D.java: Approximate arc segments with cubics. From-SVN: r71472
This commit is contained in:
committed by
Graydon Hoare
parent
eb26c76c64
commit
3b2d7c47c4
@@ -267,9 +267,16 @@ public class BufferedImage extends Image
|
||||
raster.createWritableChild(x, y, w, h, x, y,
|
||||
null // same bands
|
||||
);
|
||||
|
||||
// Refer to ComponentDataBlitOp for optimized data blitting:
|
||||
ComponentDataBlitOp.INSTANCE.filter(src, dest);
|
||||
if (src.getSampleModel () instanceof ComponentSampleModel
|
||||
&& dest.getSampleModel () instanceof ComponentSampleModel)
|
||||
// Refer to ComponentDataBlitOp for optimized data blitting:
|
||||
ComponentDataBlitOp.INSTANCE.filter(src, dest);
|
||||
else
|
||||
{
|
||||
// slower path
|
||||
int samples[] = src.getPixels (x, y, w, h, (int [])null);
|
||||
dest.setPixels (x, y, w, h, samples);
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
@@ -540,9 +547,18 @@ public class BufferedImage extends Image
|
||||
raster.createWritableChild(x, y, w, h, x, y,
|
||||
null // same bands
|
||||
);
|
||||
|
||||
// Refer to ComponentDataBlitOp for optimized data blitting:
|
||||
ComponentDataBlitOp.INSTANCE.filter(src, dest);
|
||||
|
||||
if (src.getSampleModel () instanceof ComponentSampleModel
|
||||
&& dest.getSampleModel () instanceof ComponentSampleModel)
|
||||
|
||||
// Refer to ComponentDataBlitOp for optimized data blitting:
|
||||
ComponentDataBlitOp.INSTANCE.filter(src, dest);
|
||||
else
|
||||
{
|
||||
// slower path
|
||||
int samples[] = src.getPixels (x, y, w, h, (int [])null);
|
||||
dest.setPixels (x, y, w, h, samples);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRGB(int x, int y, int argb)
|
||||
|
||||
Reference in New Issue
Block a user