SUMMARY:
java.lang.Object
org.apache.batik.svggen.AbstractSVGConverter
org.apache.batik.svggen.SVGAlphaComposite
- All Implemented Interfaces:
- ErrorConstants, SVGConverter, SVGSyntax, CSSConstants, SVGConstants, XMLConstants
public class SVGAlphaComposite
- extends AbstractSVGConverter
Utility class that converts an AlphaComposite object into
a set of SVG properties and definitions. Here is
how AlphaComposites are mapped to SVG:
+ AlphaComposite.SRC_OVER with extra alpha is mapped
to the opacity attribute
+ AlphaComposite's other rules are translated into
predefined filter effects.
One of the big differences between AlphaComposite and
the SVG feComposite filter is that feComposite does not
have the notion of extra alpha applied to the source.
The extra alpha equivalent is obtained by setting the
opacity property on the nodes to be composited.
- See Also:
SVGAlphaComposite
SVGAlphaComposite
public SVGAlphaComposite(SVGGeneratorContext generatorContext)
- Parameters:
generatorContext
- for use by SVGAlphaComposite to build Elements
getAlphaCompositeFilterSet
public java.util.List getAlphaCompositeFilterSet()
- Returns:
- set of all AlphaComposite filter definitions
requiresBackgroundAccess
public boolean requiresBackgroundAccess()
- Returns:
- true if background access is required for any
of the converted AlphaComposite rules
toSVG
public SVGDescriptor toSVG(GraphicContext gc)
- Converts part or all of the input GraphicContext into
a set of attribute/value pairs and related definitions
- Parameters:
gc
- GraphicContext to be converted
- Returns:
- descriptor of the attributes required to represent
some or all of the GraphicContext state, along
with the related definitions
- See Also:
SVGDescriptor
toSVG
public SVGCompositeDescriptor toSVG(java.awt.AlphaComposite composite)
- Parameters:
composite
- the AlphaComposite object to convert to SVG
- Returns:
- an SVGCompositeDescriptor that defines how to map the
input composite in SVG