public class PDFColorSpace
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
PDFColorSpace(java.awt.color.ColorSpace cs)
create a PDFColorSpace based on a Java ColorSpace
|
Modifier and Type | Method and Description |
---|---|
java.awt.color.ColorSpace |
getColorSpace()
get the original Java ColorSpace.
|
static PDFColorSpace |
getColorSpace(int name)
Get a color space by name
|
static PDFColorSpace |
getColorSpace(PDFObject csobj,
java.util.Map resources)
Get a color space specified in a PDFObject
|
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
|
public static final int COLORSPACE_GRAY
public static final int COLORSPACE_RGB
public static final int COLORSPACE_CMYK
public static final int COLORSPACE_PATTERN
protected PDFColorSpace(java.awt.color.ColorSpace cs)
cs
- the Java ColorSpacepublic static PDFColorSpace getColorSpace(int name)
name
- the name of one of the device-dependent color spacespublic static PDFColorSpace getColorSpace(PDFObject csobj, java.util.Map resources) throws java.io.IOException
csobj
- the PDFObject with the colorspace informationjava.io.IOException
public int getNumComponents()
public PDFPaint getPaint(float[] components)
components
- the color components corresponding to the given
colorspacepublic java.awt.color.ColorSpace getColorSpace()