PDFColorSpacepublic class PDFDeviceColorSpace extends java.lang.Object implements PDFColorSpace
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
currentColorSpace |
Current color space value.
|
static int |
DEVICE_CMYK |
CMYK colorspace
|
static int |
DEVICE_GRAY |
Gray colorspace
|
static int |
DEVICE_RGB |
RGB colorspace
|
static int |
DEVICE_UNKNOWN |
Unknown colorspace
|
| Constructor | Description |
|---|---|
PDFDeviceColorSpace(int theColorSpace) |
Create a PDF colorspace object.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getColorSpace() |
Get the colorspace value
|
java.lang.String |
getName() |
|
int |
getNumComponents() |
Get the number of color components for this colorspace
|
boolean |
isCMYKColorSpace() |
|
boolean |
isDeviceColorSpace() |
|
boolean |
isGrayColorSpace() |
|
boolean |
isRGBColorSpace() |
|
void |
setColorSpace(int theColorSpace) |
Set the current colorspace.
|
static PDFDeviceColorSpace |
toPDFColorSpace(java.awt.color.ColorSpace cs) |
Returns a suitable
PDFDeviceColorSpace object given a ColorSpace object. |
public static final int DEVICE_UNKNOWN
public static final int DEVICE_GRAY
public static final int DEVICE_RGB
public static final int DEVICE_CMYK
protected int currentColorSpace
public PDFDeviceColorSpace(int theColorSpace)
theColorSpace - the current colorspacepublic void setColorSpace(int theColorSpace)
theColorSpace - the new color space valuepublic int getColorSpace()
public int getNumComponents()
getNumComponents in interface PDFColorSpacepublic java.lang.String getName()
getName in interface PDFColorSpacepublic boolean isDeviceColorSpace()
isDeviceColorSpace in interface PDFColorSpacepublic boolean isRGBColorSpace()
isRGBColorSpace in interface PDFColorSpacepublic boolean isCMYKColorSpace()
isCMYKColorSpace in interface PDFColorSpacepublic boolean isGrayColorSpace()
isGrayColorSpace in interface PDFColorSpacepublic static PDFDeviceColorSpace toPDFColorSpace(java.awt.color.ColorSpace cs)
PDFDeviceColorSpace object given a ColorSpace object.cs - ColorSpace instanceCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.