Package ca.cgjennings.graphics
Class FilteredMultiResolutionImage
- java.lang.Object
-
- java.awt.Image
-
- java.awt.image.AbstractMultiResolutionImage
-
- ca.cgjennings.graphics.FilteredMultiResolutionImage
-
- All Implemented Interfaces:
java.awt.image.MultiResolutionImage
public abstract class FilteredMultiResolutionImage extends java.awt.image.AbstractMultiResolutionImage
A multi-resolution image that modifies an existing multi-resolution source image by applying effects such as image filters.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description FilteredMultiResolutionImage(java.awt.image.MultiResolutionImage source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.awt.Image
applyFilter(java.awt.Image source)
Applies this image's effect to a source image.java.awt.Image
getBaseImage()
java.awt.Image
getResolutionVariant(double destImageWidth, double destImageHeight)
java.util.List<java.awt.Image>
getResolutionVariants()
java.awt.image.MultiResolutionImage
getSourceImage()
Returns the source image from which filtered images are derived.-
Methods inherited from class java.awt.image.AbstractMultiResolutionImage
getGraphics, getHeight, getProperty, getSource, getWidth
-
-
-
-
Method Detail
-
getSourceImage
public final java.awt.image.MultiResolutionImage getSourceImage()
Returns the source image from which filtered images are derived.- Returns:
- the source image passed to the constructor
-
getBaseImage
public java.awt.Image getBaseImage()
- Specified by:
getBaseImage
in classjava.awt.image.AbstractMultiResolutionImage
-
applyFilter
public abstract java.awt.Image applyFilter(java.awt.Image source)
Applies this image's effect to a source image. Subclasses must implement the specific effect that they wish to achieve.- Parameters:
source
- the source image- Returns:
- the new image that applies the desired effects to the source
-
getResolutionVariant
public java.awt.Image getResolutionVariant(double destImageWidth, double destImageHeight)
-
getResolutionVariants
public java.util.List<java.awt.Image> getResolutionVariants()
-
-