public class PDDeviceN extends PDSpecialColorSpace
array| Constructor and Description |
|---|
PDDeviceN()
Creates a new DeviceN color space.
|
PDDeviceN(COSArray deviceN)
Creates a new DeviceN color space from the given COS array.
|
| Modifier and Type | Method and Description |
|---|---|
PDColorSpace |
getAlternateColorSpace()
This will get the alternate color space for this separation.
|
PDDeviceNAttributes |
getAttributes()
Returns the attributes associated with the DeviceN color space.
|
List<String> |
getColorantNames()
Returns the list of colorants.
|
float[] |
getDefaultDecode(int bitsPerComponent)
Returns the default decode array for this color space.
|
PDColor |
getInitialColor()
Returns the initial color value for this color space.
|
String |
getName()
Returns the name of the color space.
|
int |
getNumberOfComponents()
Returns the number of components in this color space
|
PDFunction |
getTintTransform()
This will get the tint transform function.
|
boolean |
isNChannel()
Returns true if this color space has the NChannel subtype.
|
void |
setAlternateColorSpace(PDColorSpace cs)
This will set the alternate color space.
|
void |
setAttributes(PDDeviceNAttributes attributes)
Sets the color space attributes.
|
void |
setColorantNames(List<String> names)
Sets the list of colorants
|
void |
setTintTransform(PDFunction tint)
This will set the tint transform function.
|
BufferedImage |
toRawImage(WritableRaster raster)
Returns the image in this colorspace or null.
|
float[] |
toRGB(float[] value)
Returns the RGB equivalent of the given color value.
|
BufferedImage |
toRGBImage(WritableRaster raster)
Returns the (A)RGB equivalent of the given raster.
|
String |
toString() |
create, create, create, getCOSObject, toRawImage, toRGBImageAWTpublic PDDeviceN()
public PDDeviceN(COSArray deviceN) throws IOException
deviceN - an array containing the color space informationIOException - if the colorspace could not be createdpublic BufferedImage toRGBImage(WritableRaster raster) throws IOException
PDColorSpacetoRGBImage in class PDColorSpaceraster - the source rasterIOException - if the color conversion failspublic float[] toRGB(float[] value)
throws IOException
PDColorSpacetoRGB in class PDColorSpacevalue - a color value with component values between 0 and 1IOException - if the color conversion failspublic BufferedImage toRawImage(WritableRaster raster)
PDColorSpacePDColorSpace.toRGBImage(WritableRaster) if this returns null.toRawImage in class PDColorSpaceraster - the source rasterpublic boolean isNChannel()
public String getName()
PDColorSpacegetName in class PDColorSpacepublic final int getNumberOfComponents()
PDColorSpacegetNumberOfComponents in class PDColorSpacepublic float[] getDefaultDecode(int bitsPerComponent)
PDColorSpacegetDefaultDecode in class PDColorSpacebitsPerComponent - the number of bits per component.public PDColor getInitialColor()
PDColorSpacegetInitialColor in class PDColorSpacepublic List<String> getColorantNames()
public PDDeviceNAttributes getAttributes()
public void setColorantNames(List<String> names)
names - the list of colorantspublic void setAttributes(PDDeviceNAttributes attributes)
attributes - the color space attributes, or nullpublic PDColorSpace getAlternateColorSpace() throws IOException
IOException - If there is an error getting the alternate color
space.public void setAlternateColorSpace(PDColorSpace cs)
cs - The alternate color space.public PDFunction getTintTransform() throws IOException
IOException - if there is an error creating the function.public void setTintTransform(PDFunction tint)
tint - The tint transform function.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.