Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.java2d.color
Class GrayScaleColorConverter

    java.lang.Object
      org.apache.xmlgraphics.java2d.color.GrayScaleColorConverter

All Implemented Interfaces:
  ColorConverter

    public final class GrayScaleColorConverter

extends Object
implements ColorConverter

Converts to grayscale using the standard RED=30%, GREEN=59% and BLUE=11% weights (see http://en.wikipedia.org/wiki/Grayscale)

Method Summary
`Color` | `convert(Color color)` The color is converted to CMYK with just the K component.
`static GrayScaleColorConverter` | `getInstance()` Returns a singleton instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static GrayScaleColorConverter getInstance()

  Returns a singleton instance.

  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 `ColorConverter`
  Parameters:
    `color` - to convert
  Returns:
    converted color

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.