Class SVGColor

    • Field Detail

      • aqua

        public static final java.awt.Color aqua
        Predefined CSS colors
      • black

        public static final java.awt.Color black
      • blue

        public static final java.awt.Color blue
      • fuchsia

        public static final java.awt.Color fuchsia
      • gray

        public static final java.awt.Color gray
      • green

        public static final java.awt.Color green
      • lime

        public static final java.awt.Color lime
      • maroon

        public static final java.awt.Color maroon
      • navy

        public static final java.awt.Color navy
      • olive

        public static final java.awt.Color olive
      • purple

        public static final java.awt.Color purple
      • red

        public static final java.awt.Color red
      • silver

        public static final java.awt.Color silver
      • teal

        public static final java.awt.Color teal
      • white

        public static final java.awt.Color white
      • yellow

        public static final java.awt.Color yellow
      • colorMap

        private static java.util.Map colorMap
        Color map maps Color values to HTML 4.0 color names
    • Constructor Detail

      • SVGColor

        public SVGColor​(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 SVGPaintDescriptor toSVG​(java.awt.Color color,
                                               SVGGeneratorContext gc)
        Converts a Color object to a set of two corresponding values: a CSS color string and an opacity value.