Package org.apache.batik.gvt.filter
Interface Mask
- All Superinterfaces:
Filter
,RenderableImage
- All Known Implementing Classes:
MaskRable8Bit
Implements a masking operation. This masks the source by the result
of converting the GraphicsNode to a mask image.
- Version:
- $Id: Mask.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
-
Method Summary
Modifier and TypeMethodDescriptionThe 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
Set the masking image to that described by gn.void
The source to be masked by the mask node.Methods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getBounds2D, getDependencyRegion, getDirtyRegion, getTimeStamp
Methods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Method Details
-
getFilterRegion
Rectangle2D getFilterRegion()The region to which this mask applies -
setFilterRegion
Returns the filter region to which this mask applies -
setSource
The source to be masked by the mask node.- Parameters:
src
- The Image to be masked.
-
getSource
Filter getSource()This returns the current image being masked by the mask node.- Returns:
- The image to mask
-
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.- Parameters:
gn
- The graphics node that defines the mask image.
-
getMaskNode
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.
-