Package com.sun.pdfview.colorspace
Class AlternateColorSpace
- java.lang.Object
-
- com.sun.pdfview.colorspace.PDFColorSpace
-
- 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 Modifier and Type Field Description private PDFColorSpacealternateThe alternate color spaceprivate PDFFunctionfunctionThe function-
Fields inherited from class com.sun.pdfview.colorspace.PDFColorSpace
COLORSPACE_CMYK, COLORSPACE_GRAY, COLORSPACE_PATTERN, COLORSPACE_RGB, cs
-
-
Constructor Summary
Constructors Constructor Description AlternateColorSpace(PDFColorSpace alternate, PDFFunction function)Creates a new instance of AlternateColorSpace
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.color.ColorSpacegetColorSpace()get the original Java ColorSpace.intgetNumComponents()get the number of components expected in the getPaint commandPDFPaintgetPaint(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
-
-
-
-
Field Detail
-
alternate
private PDFColorSpace alternate
The alternate color space
-
function
private PDFFunction function
The function
-
-
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:
getNumComponentsin classPDFColorSpace
-
getPaint
public PDFPaint getPaint(float[] components)
get the PDFPaint representing the color described by the given color components- Overrides:
getPaintin classPDFColorSpace- 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:
getColorSpacein classPDFColorSpace
-
-