com.sun.pdfview.colorspace
Class AlternateColorSpace

java.lang.Object
  extended by com.sun.pdfview.colorspace.PDFColorSpace
      extended by com.sun.pdfview.colorspace.AlternateColorSpace

public class AlternateColorSpace
extends PDFColorSpace

A color space that uses another color space to return values, and a function to map between values in the input and input values to the alternate color space


Field Summary
 
Fields inherited from class com.sun.pdfview.colorspace.PDFColorSpace
COLORSPACE_CMYK, COLORSPACE_GRAY, COLORSPACE_PATTERN, COLORSPACE_RGB
 
Constructor Summary
AlternateColorSpace(PDFColorSpace alternate, PDFFunction function)
          Creates a new instance of AlternateColorSpace
 
Method Summary
 java.awt.color.ColorSpace getColorSpace()
          get the original Java ColorSpace.
 int getNumComponents()
          get the number of components expected in the getPaint command
 PDFPaint getPaint(float[] components)
          get the PDFPaint representing the color described by the given color components
 
Methods inherited from class com.sun.pdfview.colorspace.PDFColorSpace
getColorSpace, getColorSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlternateColorSpace

public AlternateColorSpace(PDFColorSpace alternate,
                           PDFFunction function)
Creates a new instance of AlternateColorSpace

Method Detail

getNumComponents

public int getNumComponents()
get the number of components expected in the getPaint command

Overrides:
getNumComponents in class PDFColorSpace

getPaint

public PDFPaint getPaint(float[] components)
get the PDFPaint representing the color described by the given color components

Overrides:
getPaint in class PDFColorSpace
Parameters:
components - the color components corresponding to the given colorspace
Returns:
a PDFPaint object representing the closest Color to the given components.

getColorSpace

public java.awt.color.ColorSpace getColorSpace()
get the original Java ColorSpace.

Overrides:
getColorSpace in class PDFColorSpace