org.apache.batik.ext.awt.image.renderable
Class ClipRable8Bit

java.lang.Object
  |
  +--org.apache.batik.ext.awt.image.renderable.AbstractRable
        |
        +--org.apache.batik.ext.awt.image.renderable.ClipRable8Bit
All Implemented Interfaces:
ClipRable, Filter, java.awt.image.renderable.RenderableImage

public class ClipRable8Bit
extends AbstractRable
implements ClipRable

ClipRable implementation


Field Summary
protected  java.awt.Shape clipPath
          The node who's outline specifies our mask.
 
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stamp
 
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
 
Constructor Summary
ClipRable8Bit(Filter src, java.awt.Shape clipPath)
           
 
Method Summary
 java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
           
 java.awt.geom.Rectangle2D getBounds2D()
          Pass-through: returns the source's bounds
 java.awt.Shape getClipPath()
          Returns the Shape that the cliprable will use to define the clip path.
 Filter getSource()
          This returns the current image being masked by the mask node.
 void setClipPath(java.awt.Shape clipPath)
          Set the clip path to use.
 void setSource(Filter src)
          The source to be masked by the mask node.
 
Methods inherited from class org.apache.batik.ext.awt.image.renderable.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 org.apache.batik.ext.awt.image.renderable.Filter
getDependencyRegion, getDirtyRegion, getTimeStamp
 
Methods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
 

Field Detail

clipPath

protected java.awt.Shape clipPath
The node who's outline specifies our mask.
Constructor Detail

ClipRable8Bit

public ClipRable8Bit(Filter src,
                     java.awt.Shape clipPath)
Method Detail

setSource

public void setSource(Filter src)
The source to be masked by the mask node.
Specified by:
setSource in interface ClipRable
Parameters:
src - The Image to be masked.

getSource

public Filter getSource()
This returns the current image being masked by the mask node.
Specified by:
getSource in interface ClipRable

setClipPath

public void setClipPath(java.awt.Shape clipPath)
Set the clip path to use. The path will be filled with opaque white.
Specified by:
setClipPath in interface ClipRable
Parameters:
clipPath - The clip path to use

getClipPath

public java.awt.Shape getClipPath()
Returns the Shape that the cliprable will use to define the clip path.
Specified by:
getClipPath in interface ClipRable
Returns:
The shape that defines the clip path.

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Pass-through: returns the source'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 rc)
Specified by:
createRendering in interface java.awt.image.renderable.RenderableImage


Copyright © 2002 Apache Software Foundation. All Rights Reserved.