org.apache.batik.svggen

Class SVGTransform

public class SVGTransform extends AbstractSVGConverter

Utility class that converts a GraphicContext transform stack into an SVG transform attribute.
Constructor Summary
SVGTransform(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
StringtoSVGTransform(GraphicContext gc)
StringtoSVGTransform(TransformStackElement[] transformStack)
This method tries to collapse the transform stack into an SVG string as compact as possible while still conveying the semantic of the stack.

Constructor Detail

SVGTransform

public SVGTransform(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

toSVGTransform

public final String toSVGTransform(GraphicContext gc)

Parameters: gc GraphicContext whose transform stack should be converted to SVG.

Returns: the value of an SVG attribute equivalent to the input GraphicContext's transform stack.

toSVGTransform

public final String toSVGTransform(TransformStackElement[] transformStack)
This method tries to collapse the transform stack into an SVG string as compact as possible while still conveying the semantic of the stack. Successive stack elements of the same kind (e.g., two successive transforms or scales) are collapsed into a single element.

Parameters: transformStack sequence of transform that should be converted to an SVG transform attribute equivalent

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