Class ClipRable8Bit

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

public class ClipRable8Bit extends AbstractRable implements ClipRable
ClipRable implementation
Version:
$Id: ClipRable8Bit.java 1804130 2017-08-04 14:41:11Z ssteiner $
  • Field Details

    • useAA

      protected boolean useAA
    • clipPath

      protected Shape clipPath
      The node who's outline specifies our mask.
  • Constructor Details

    • ClipRable8Bit

      public ClipRable8Bit(Filter src, Shape clipPath)
    • ClipRable8Bit

      public ClipRable8Bit(Filter src, Shape clipPath, boolean useAA)
  • Method Details

    • 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
      Returns:
      The image to mask
    • setUseAntialiasedClip

      public void setUseAntialiasedClip(boolean useAA)
      Set the default behaviour of anti-aliased clipping. for this clip object.
      Specified by:
      setUseAntialiasedClip in interface ClipRable
    • getUseAntialiasedClip

      public boolean getUseAntialiasedClip()
      Resturns true if the default behaviour should be to use anti-aliased clipping.
      Specified by:
      getUseAntialiasedClip in interface ClipRable
    • setClipPath

      public void setClipPath(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 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 Rectangle2D getBounds2D()
      Pass-through: returns the source's bounds
      Specified by:
      getBounds2D in interface Filter
      Overrides:
      getBounds2D in class AbstractRable
    • createRendering

      public RenderedImage createRendering(RenderContext rc)
      Specified by:
      createRendering in interface RenderableImage