Package org.apache.batik.gvt.filter
Class MaskRable8Bit
java.lang.Object
org.apache.batik.ext.awt.image.renderable.AbstractRable
org.apache.batik.gvt.filter.MaskRable8Bit
- All Implemented Interfaces:
RenderableImage
,Filter
,Mask
MaskRable implementation
- Version:
- $Id: MaskRable8Bit.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rectangle2D
Region to which the mask appliesprotected GraphicsNode
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPass-through: returns the source's boundsThe region to which this mask appliesReturns the Graphics node that the mask operation will use to define the masking image.This returns the current image being masked by the mask node.void
setFilterRegion
(Rectangle2D filterRegion) Returns the filter region to which this mask appliesvoid
setMaskNode
(GraphicsNode mask) Set the masking image to that described by gn.void
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 Details
-
mask
The node who's outline specifies our mask. -
filterRegion
Region to which the mask applies
-
-
Constructor Details
-
MaskRable8Bit
-
-
Method Details
-
setSource
The source to be masked by the mask node. -
getSource
This returns the current image being masked by the mask node. -
getFilterRegion
The region to which this mask applies- Specified by:
getFilterRegion
in interfaceMask
-
setFilterRegion
Returns the filter region to which this mask applies- Specified by:
setFilterRegion
in interfaceMask
-
setMaskNode
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 interfaceMask
- Parameters:
mask
- The graphics node that defines the mask image.
-
getMaskNode
Returns the Graphics node that the mask operation will use to define the masking image.- Specified by:
getMaskNode
in interfaceMask
- Returns:
- The graphics node that defines the mask image.
-
getBounds2D
Pass-through: returns the source's bounds- Specified by:
getBounds2D
in interfaceFilter
- Overrides:
getBounds2D
in classAbstractRable
-
createRendering
- Specified by:
createRendering
in interfaceRenderableImage
-