org.apache.batik.refimpl.gvt.filter
Class ConcreteFilterChainRable
java.lang.Object
|
+--org.apache.batik.refimpl.gvt.filter.AbstractRable
|
+--org.apache.batik.refimpl.gvt.filter.ConcreteFilterChainRable
- All Implemented Interfaces:
- Filter, FilterChainRable, java.awt.image.renderable.RenderableImage
- public class ConcreteFilterChainRable
- extends AbstractRable
- implements FilterChainRable
Implements a filter chain. A filter chain is defined by its
filter region (i.e., the bounding box of its input/output), its
filter resolution and its source. Its source cannot be null,
but its resolution can.
The filter chain decomposes as follows:
- A pad operation that makes the input image a big as the
filter region.
- If there is a filterResolution specified along at least
one of the axis, a AffineRable
Fields inherited from interface java.awt.image.renderable.RenderableImage |
HINTS_OBSERVED |
Method Summary |
java.awt.image.RenderedImage |
createRendering(java.awt.image.renderable.RenderContext context)
|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns this filter's bounds |
java.awt.geom.Rectangle2D |
getFilterRegion()
Returns the filter output area, in user space |
int |
getFilterResolutionX()
Returns the resolution along the X axis. |
int |
getFilterResolutionY()
Returns the resolution along the Y axis. |
Filter |
getSource()
Returns the source of the chain. |
void |
setFilterRegion(java.awt.geom.Rectangle2D filterRegion)
Sets the filter output area, in user space. |
void |
setFilterResolutionX(int filterResolutionX)
Sets the resolution along the X axis, i.e., the maximum
size for intermediate images along that axis. |
void |
setFilterResolutionY(int filterResolutionY)
Sets the resolution along the Y axis, i.e., the maximum
size for intermediate images along that axis. |
void |
setSource(Filter chainSource)
Sets the source to be src. |
Methods inherited from class org.apache.batik.refimpl.gvt.filter.AbstractRable |
createDefaultRendering, createScaledRendering, getDependencyRegion, getDirtyRegion, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getTimeStamp, getWidth, init, init, init, init, isDynamic, touch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.image.renderable.RenderableImage |
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic |
ConcreteFilterChainRable
public ConcreteFilterChainRable(Filter source,
java.awt.geom.Rectangle2D filterRegion)
- Default constructor.
getFilterResolutionX
public int getFilterResolutionX()
- Returns the resolution along the X axis.
- Specified by:
getFilterResolutionX
in interface FilterChainRable
setFilterResolutionX
public void setFilterResolutionX(int filterResolutionX)
- Sets the resolution along the X axis, i.e., the maximum
size for intermediate images along that axis.
If filterResolutionX is less than zero, no filter resolution
is forced on the filter chain. If filterResolutionX is zero,
then the filter returns null. If filterResolutionX is positive,
then the filter resolution is applied.
- Specified by:
setFilterResolutionX
in interface FilterChainRable
getFilterResolutionY
public int getFilterResolutionY()
- Returns the resolution along the Y axis.
- Specified by:
getFilterResolutionY
in interface FilterChainRable
setFilterResolutionY
public void setFilterResolutionY(int filterResolutionY)
- Sets the resolution along the Y axis, i.e., the maximum
size for intermediate images along that axis.
If filterResolutionY is zero or less, the value of
filterResolutionX is used.
- Specified by:
setFilterResolutionY
in interface FilterChainRable
setFilterRegion
public void setFilterRegion(java.awt.geom.Rectangle2D filterRegion)
- Sets the filter output area, in user space.
A null value is illegal.
- Specified by:
setFilterRegion
in interface FilterChainRable
getFilterRegion
public java.awt.geom.Rectangle2D getFilterRegion()
- Returns the filter output area, in user space
- Specified by:
getFilterRegion
in interface FilterChainRable
getSource
public Filter getSource()
- Returns the source of the chain. Note that a crop and
affine operation may be inserted before the source,
depending on the filterRegion and filterResolution
parameters.
- Specified by:
getSource
in interface FilterChainRable
setSource
public void setSource(Filter chainSource)
- Sets the source to be src.
- Specified by:
setSource
in interface FilterChainRable
- Parameters:
src
- image to the chain.
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
- Returns this filter's bounds
- Specified by:
getBounds2D
in interface Filter
- Overrides:
getBounds2D
in class AbstractRable
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext context)
- Specified by:
createRendering
in interface java.awt.image.renderable.RenderableImage
Copyright © 2000 Apache Software Foundation. All Rights Reserved.