Class SVGTransform

    • Field Detail

      • radiansToDegrees

        private static double radiansToDegrees
        Ratio used to convert radians to degrees
    • 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 java.lang.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 java.lang.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
      • convertTransform

        final java.lang.String convertTransform​(TransformStackElement transformElement)
        Converts an AffineTransform to an SVG transform string