Class GrayScaleColorConverter

java.lang.Object
org.apache.fop.afp.GrayScaleColorConverter
All Implemented Interfaces:
org.apache.xmlgraphics.java2d.color.ColorConverter

final class GrayScaleColorConverter extends 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)
  • Field Details

  • Constructor Details

    • GrayScaleColorConverter

      private GrayScaleColorConverter()
  • Method Details

    • getInstance

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

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