Class MaskRable8Bit

All Implemented Interfaces:
RenderableImage, Filter, Mask

public class MaskRable8Bit extends AbstractRable implements Mask
MaskRable implementation
  • Field Details

    • mask

      protected GraphicsNode mask
      The node who's outline specifies our mask.
    • filterRegion

      protected Rectangle2D filterRegion
      Region to which the mask applies
  • Constructor Details

  • Method Details

    • setSource

      public void setSource(Filter src)
      The source to be masked by the mask node.
      Specified by:
      setSource in interface Mask
      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 Mask
      Returns:
      The image to mask
    • getFilterRegion

      public Rectangle2D getFilterRegion()
      The region to which this mask applies
      Specified by:
      getFilterRegion in interface Mask
    • setFilterRegion

      public void setFilterRegion(Rectangle2D filterRegion)
      Returns the filter region to which this mask applies
      Specified by:
      setFilterRegion in interface Mask
    • setMaskNode

      public void setMaskNode(GraphicsNode mask)
      Set the masking image to that described by gn. If gn is an rgba image then the alpha is premultiplied and then the rgb is converted to alpha via the standard feColorMatrix rgb to luminance conversion. In the case of an rgb only image, just the rgb to luminance conversion is performed.
      Specified by:
      setMaskNode in interface Mask
      Parameters:
      mask - The graphics node that defines the mask image.
    • getMaskNode

      public GraphicsNode getMaskNode()
      Returns the Graphics node that the mask operation will use to define the masking image.
      Specified by:
      getMaskNode in interface Mask
      Returns:
      The graphics node that defines the mask image.
    • 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