org.apache.batik.svggen

Class SVGRenderingHints

public class SVGRenderingHints extends AbstractSVGConverter

Utility class that converts a RenderingHints object into a set of SVG properties. Here is how individual hints are converted. + RENDERING -> sets all other hints to initial value. + FRACTIONAL_METRICS -> sets initial values for text-rendering and shape-rendering. + ALPHA_INTERPOLATION -> Not mapped + ANTIALIASING -> shape-rendering and text-rendering + COLOR_RENDERING -> color-rendering + DITHERING -> not mapped + INTERPOLATION -> image-rendering + TEXT_ANTIALIASING -> text-rendering
Constructor Summary
SVGRenderingHints(SVGGeneratorContext generatorContext)
Method Summary
SVGDescriptortoSVG(GraphicContext gc)
Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions
static SVGHintsDescriptortoSVG(RenderingHints hints)

Constructor Detail

SVGRenderingHints

public SVGRenderingHints(SVGGeneratorContext generatorContext)

Parameters: generatorContext used by converter to handle precision or to create elements.

Method Detail

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 static SVGHintsDescriptor toSVG(RenderingHints hints)

Parameters: hints RenderingHints object which should be converted to a set of SVG attributes.

Returns: map Map of attribute values that describe the hints

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