Class FloodRable8Bit

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

public class FloodRable8Bit extends AbstractRable implements FloodRable
Concrete implementation of the FloodRable interface. This fills the input image with a given flood paint
  • Constructor Details

    • FloodRable8Bit

      public FloodRable8Bit(Rectangle2D floodRegion, Paint floodPaint)
      Parameters:
      floodRegion - region to be filled with floodPaint
      floodPaint - paint to use to flood the floodRegion
  • Method Details

    • setFloodPaint

      public void setFloodPaint(Paint paint)
      Set the flood fill paint
      Specified by:
      setFloodPaint in interface FloodRable
      Parameters:
      paint - The paint to use when flood filling the input image
    • getFloodPaint

      public Paint getFloodPaint()
      Get the flood fill paint.
      Specified by:
      getFloodPaint in interface FloodRable
      Returns:
      the paint used to flood fill the input image
    • getBounds2D

      public Rectangle2D getBounds2D()
      Description copied from interface: Filter
      Returns the bounds of the current image. This should be 'in sync' with getMinX, getMinY, getWidth, getHeight
      Specified by:
      getBounds2D in interface Filter
      Overrides:
      getBounds2D in class AbstractRable
    • getFloodRegion

      public Rectangle2D getFloodRegion()
      Returns the flood region
      Specified by:
      getFloodRegion in interface FloodRable
    • setFloodRegion

      public void setFloodRegion(Rectangle2D floodRegion)
      Sets the flood region
      Specified by:
      setFloodRegion in interface FloodRable
      Parameters:
      floodRegion - region to flood with floodPaint
    • createRendering

      public RenderedImage createRendering(RenderContext rc)
      Create a RenderedImage that is filled with the current flood fill paint
      Specified by:
      createRendering in interface RenderableImage
      Parameters:
      rc - The current render context
      Returns:
      A RenderedImage with the flood fill