164 |
* @param dst destination image |
* @param dst destination image |
165 |
* @return transformed source image |
* @return transformed source image |
166 |
*/ |
*/ |
167 |
public BufferedImage filter (BufferedImage src, BufferedImage dst) |
public final BufferedImage filter (BufferedImage src, BufferedImage dst) |
168 |
{ |
{ |
169 |
|
|
170 |
if (dst == src) |
if (dst == src) |
195 |
* @param dst destination raster |
* @param dst destination raster |
196 |
* @return transformed raster |
* @return transformed raster |
197 |
*/ |
*/ |
198 |
public WritableRaster filter (Raster src, WritableRaster dst) |
public final WritableRaster filter (Raster src, WritableRaster dst) |
199 |
{ |
{ |
200 |
if (dst == src) |
if (dst == src) |
201 |
throw new IllegalArgumentException("src image cannot be the same as" |
throw new IllegalArgumentException("src image cannot be the same as" |
297 |
* @param src image to be transformed |
* @param src image to be transformed |
298 |
* @return bounds of the transformed image. |
* @return bounds of the transformed image. |
299 |
*/ |
*/ |
300 |
public Rectangle2D getBounds2D (BufferedImage src) |
public final Rectangle2D getBounds2D (BufferedImage src) |
301 |
{ |
{ |
302 |
return getBounds2D (src.getRaster()); |
return getBounds2D (src.getRaster()); |
303 |
} |
} |
308 |
* @param src raster to be transformed |
* @param src raster to be transformed |
309 |
* @return bounds of the transformed raster. |
* @return bounds of the transformed raster. |
310 |
*/ |
*/ |
311 |
public Rectangle2D getBounds2D (Raster src) |
public final Rectangle2D getBounds2D (Raster src) |
312 |
{ |
{ |
313 |
// determine new size for the transformed raster. |
// determine new size for the transformed raster. |
314 |
// Need to calculate transformed coordinates of the lower right |
// Need to calculate transformed coordinates of the lower right |
327 |
* |
* |
328 |
* @return interpolation type |
* @return interpolation type |
329 |
*/ |
*/ |
330 |
public int getInterpolationType () |
public final int getInterpolationType () |
331 |
{ |
{ |
332 |
if(hints.containsValue (RenderingHints.VALUE_INTERPOLATION_BILINEAR)) |
if(hints.containsValue (RenderingHints.VALUE_INTERPOLATION_BILINEAR)) |
333 |
return TYPE_BILINEAR; |
return TYPE_BILINEAR; |
352 |
* |
* |
353 |
* @return rendering hints |
* @return rendering hints |
354 |
*/ |
*/ |
355 |
public RenderingHints getRenderingHints () |
public final RenderingHints getRenderingHints () |
356 |
{ |
{ |
357 |
return hints; |
return hints; |
358 |
} |
} |
362 |
* |
* |
363 |
* @return transform |
* @return transform |
364 |
*/ |
*/ |
365 |
public AffineTransform getTransform () |
public final AffineTransform getTransform () |
366 |
{ |
{ |
367 |
return transform; |
return transform; |
368 |
} |
} |