Class GrayScaleColorConverter

  • All Implemented Interfaces:
    org.apache.xmlgraphics.java2d.color.ColorConverter

    final class GrayScaleColorConverter
    extends java.lang.Object
    implements org.apache.xmlgraphics.java2d.color.ColorConverter
    Converts to grayscale using the standard RED=30%, GREEN=59% and BLUE=11% weights (see http://en.wikipedia.org/wiki/Grayscale)
    • Constructor Detail

      • GrayScaleColorConverter

        private GrayScaleColorConverter()
    • Method Detail

      • getInstance

        public static GrayScaleColorConverter getInstance()
        static factory
        Returns:
        singleton instance of GrayScaleColorConverter
      • convert

        public java.awt.Color convert​(java.awt.Color color)
        The color is converted to CMYK with just the K component
        Specified by:
        convert in interface org.apache.xmlgraphics.java2d.color.ColorConverter