org.apache.batik.gvt.filter

Class MaskRable8Bit

public class MaskRable8Bit extends AbstractRable implements Mask

MaskRable implementation
Field Summary
protected Rectangle2DfilterRegion
Region to which the mask applies
protected GraphicsNodemask
The node who's outline specifies our mask.
Constructor Summary
MaskRable8Bit(Filter src, GraphicsNode mask, Rectangle2D filterRegion)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
Rectangle2DgetBounds2D()
Pass-through: returns the source's bounds
Rectangle2DgetFilterRegion()
The region to which this mask applies
GraphicsNodegetMaskNode()
Returns the Graphics node that the mask operation will use to define the masking image.
FiltergetSource()
This returns the current image being masked by the mask node.
voidsetFilterRegion(Rectangle2D filterRegion)
Returns the filter region to which this mask applies
voidsetMaskNode(GraphicsNode mask)
Set the masking image to that described by gn.
voidsetSource(Filter src)
The source to be masked by the mask node.

Field Detail

filterRegion

protected Rectangle2D filterRegion
Region to which the mask applies

mask

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

Constructor Detail

MaskRable8Bit

public MaskRable8Bit(Filter src, GraphicsNode mask, Rectangle2D filterRegion)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

getBounds2D

public Rectangle2D getBounds2D()
Pass-through: returns the source's bounds

getFilterRegion

public Rectangle2D getFilterRegion()
The region to which this mask applies

getMaskNode

public GraphicsNode getMaskNode()
Returns the Graphics node that the mask operation will use to define the masking image.

Returns: The graphics node that defines the mask image.

getSource

public Filter getSource()
This returns the current image being masked by the mask node.

Returns: The image to mask

setFilterRegion

public void setFilterRegion(Rectangle2D filterRegion)
Returns the filter region to which this mask applies

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.

Parameters: mask The graphics node that defines the mask image.

setSource

public void setSource(Filter src)
The source to be masked by the mask node.

Parameters: src The Image to be masked.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.