com.sun.pdfview.colorspace
public class PDFColorSpace extends Object
Field Summary | |
---|---|
static int | COLORSPACE_CMYK the name of the device-dependent CMYK color space |
static int | COLORSPACE_GRAY the name of the device-dependent gray color space |
static int | COLORSPACE_PATTERN the name of the pattern color space |
static int | COLORSPACE_RGB the name of the device-dependent RGB color space |
Constructor Summary | |
---|---|
protected | PDFColorSpace(ColorSpace cs)
create a PDFColorSpace based on a Java ColorSpace |
Method Summary | |
---|---|
static PDFColorSpace | getColorSpace(int name)
Get a color space by name
|
static PDFColorSpace | getColorSpace(PDFObject csobj, Map resources)
Get a color space specified in a PDFObject
|
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 |
Parameters: cs the Java ColorSpace
Parameters: name the name of one of the device-dependent color spaces
Parameters: csobj the PDFObject with the colorspace information
Parameters: components the color components corresponding to the given colorspace
Returns: a PDFPaint object representing the closest Color to the given components.