diff options
author | David Gilbert <david.gilbert@object-refinery.com> | 2006-07-18 09:08:51 +0000 |
---|---|---|
committer | David Gilbert <david.gilbert@object-refinery.com> | 2006-07-18 09:08:51 +0000 |
commit | 2adcd44e3754a208201959ff4e01bde1b287884f (patch) | |
tree | 38d172aaca41a080af14fbb94e9be21f6d2a42ce | |
parent | dc60e8cb3ffaa8c4c9f5d96b19eac44f7038ead8 (diff) | |
download | classpath-2adcd44e3754a208201959ff4e01bde1b287884f.tar.gz |
2006-07-18 David Gilbert <david.gilbert@object-refinery.com>
* java/awt/image/BufferedImageOp.java: API docs added,
* java/awt/image/RasterOp.java: Likewise.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/awt/image/BufferedImageOp.java | 58 | ||||
-rw-r--r-- | java/awt/image/RasterOp.java | 50 |
3 files changed, 109 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2006-07-18 David Gilbert <david.gilbert@object-refinery.com> + * java/awt/image/BufferedImageOp.java: API docs added, + * java/awt/image/RasterOp.java: Likewise. + +2006-07-18 David Gilbert <david.gilbert@object-refinery.com> + * java/awt/Graphics2D.java: API docs updated. 2006-07-18 David Gilbert <david.gilbert@object-refinery.com> diff --git a/java/awt/image/BufferedImageOp.java b/java/awt/image/BufferedImageOp.java index 2ecbec056..f6a24c976 100644 --- a/java/awt/image/BufferedImageOp.java +++ b/java/awt/image/BufferedImageOp.java @@ -1,5 +1,5 @@ /* BufferedImageOp.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -43,13 +43,65 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; /** - * NEEDS DOCUMENTATION + * An operation that is performed on one <code>BufferedImage</code> (the + * source) producing a new <code>BufferedImage</code> (the destination). */ public interface BufferedImageOp { + /** + * Performs an operation on the source image, returning the result in a + * <code>BufferedImage</code>. If <code>dest</code> is <code>null</code>, a + * new <code>BufferedImage</code> will be created by calling the + * {@link #createCompatibleDestImage} method. If <code>dest</code> + * is not <code>null</code>, the result is written to <code>dest</code> then + * returned (this avoids creating a new <code>BufferedImage</code> each + * time this method is called). + * + * @param src the source image. + * @param dst the destination image (<code>null</code> permitted). + * + * @return The filterd image. + */ BufferedImage filter(BufferedImage src, BufferedImage dst); + + /** + * Returns the bounds of the destination image on the basis of this + * <code>BufferedImageOp</code> being applied to the specified source image. + * + * @param src the source image. + * + * @return The destination bounds. + */ Rectangle2D getBounds2D(BufferedImage src); + + /** + * Returns a new <code>BufferedImage</code> that can be used by this + * <code>BufferedImageOp</code> as the destination image when filtering + * the specified source image. + * + * @param src the source image. + * @param dstCM the color model for the destination image. + * + * @return A new image that can be used as the destination image. + */ BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM); + + /** + * Returns the point on the destination image that corresponds to the given + * point on the source image. + * + * @param src the source point. + * @param dst the destination point (<code>null</code> permitted). + * + * @return The destination point. + */ Point2D getPoint2D(Point2D src, Point2D dst); + + /** + * Returns the rendering hints for this operation. + * + * @return The rendering hints. + */ RenderingHints getRenderingHints(); -} // interface BufferedImageOp + +} diff --git a/java/awt/image/RasterOp.java b/java/awt/image/RasterOp.java index e081ca3d2..656370e8b 100644 --- a/java/awt/image/RasterOp.java +++ b/java/awt/image/RasterOp.java @@ -1,5 +1,5 @@ /* RasterOp.java -- - Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation + Copyright (C) 2000, 2002, 2004, 2005, 2006, Free Software Foundation This file is part of GNU Classpath. @@ -42,16 +42,64 @@ import java.awt.RenderingHints; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; +/** + * An operation that is performed on one raster (the source) producing a new + * raster (the destination). + */ public interface RasterOp { + /** + * Performs an operation on the source raster, returning the result in a + * writable raster. If <code>dest</code> is <code>null</code>, a new + * <code>WritableRaster</code> will be created by calling the + * {@link #createCompatibleDestRaster(Raster)} method. If <code>dest</code> + * is not <code>null</code>, the result is written to <code>dest</code> then + * returned (this avoids creating a new <code>WritableRaster</code> each + * time this method is called). + * + * @param src the source raster. + * @param dest the destination raster (<code>null</code> permitted). + * + * @return The filtered raster. + */ WritableRaster filter(Raster src, WritableRaster dest); + /** + * Returns the bounds of the destination raster on the basis of this + * <code>RasterOp</code> being applied to the specified source raster. + * + * @param src the source raster. + * + * @return The destination bounds. + */ Rectangle2D getBounds2D(Raster src); + /** + * Returns a raster that can be used by this <code>RasterOp</code> as the + * destination raster when operating on the specified source raster. + * + * @param src the source raster. + * + * @return A new writable raster that can be used as the destination raster. + */ WritableRaster createCompatibleDestRaster(Raster src); + /** + * Returns the point on the destination raster that corresponds to the given + * point on the source raster. + * + * @param srcPoint the source point. + * @param destPoint the destination point (<code>null</code> permitted). + * + * @return The destination point. + */ Point2D getPoint2D(Point2D srcPoint, Point2D destPoint); + /** + * Returns the rendering hints for this operation. + * + * @return The rendering hints. + */ RenderingHints getRenderingHints(); } |