SUMMARY:
java.lang.Object
org.apache.batik.svggen.SVGComposite
- All Implemented Interfaces:
- SVGConverter, SVGSyntax, CSSConstants, SVGConstants, XMLConstants
public class SVGComposite
- extends java.lang.Object
- implements SVGConverter
Utility class that converts a Composite object into
a set of SVG properties and definitions.
Here is how Composites 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.
- Custom Composite implementations are handled by the
extension mechanism.
- See Also:
SVGAlphaComposite
SVGComposite
public SVGComposite(SVGGeneratorContext generatorContext)
- Parameters:
generatorContext
- The generator context used for handling
custom and alpha composites
getDefinitionSet
public java.util.List getDefinitionSet()
- Specified by:
getDefinitionSet
in interface SVGConverter
- Returns:
- Set of filter Elements defining the composites this
Converter has processed since it was created.
getAlphaCompositeConverter
public SVGAlphaComposite getAlphaCompositeConverter()
getCustomCompositeConverter
public SVGCustomComposite getCustomCompositeConverter()
toSVG
public SVGDescriptor toSVG(GraphicContext gc)
- Converts part or all of the input GraphicContext into
a set of attribute/value pairs and related definitions
- Specified by:
toSVG
in interface SVGConverter
- 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.Composite composite)
- Parameters:
composite
- Composite to be converted to SVG
- Returns:
- an SVGCompositeDescriptor mapping the SVG composite
equivalent of the input Composite