public class PDSeparation extends PDSpecialColorSpace
array| Constructor and Description |
|---|
PDSeparation()
Creates a new Separation color space.
|
PDSeparation(COSArray separation)
Creates a new Separation color space from a PDF color space array.
|
| Modifier and Type | Method and Description |
|---|---|
PDColorSpace |
getAlternateColorSpace()
Returns the colorant name.
|
String |
getColorantName()
Returns the colorant name.
|
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
|
void |
setAlternateColorSpace(PDColorSpace colorSpace)
Sets the alternate color space.
|
void |
setColorantName(String name)
Sets the colorant name.
|
void |
setTintTransform(PDFunction tint)
Sets the tint transform function.
|
protected void |
tintTransform(float[] samples,
int[] alt) |
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 PDSeparation()
public PDSeparation(COSArray separation) throws IOException
separation - an array containing all separation information.IOException - if the color space or the function could not be created.public String getName()
PDColorSpacegetName in class PDColorSpacepublic 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 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 toRGBImage(WritableRaster raster) throws IOException
PDColorSpacetoRGBImage in class PDColorSpaceraster - the source rasterIOException - if the color conversion failsprotected void tintTransform(float[] samples,
int[] alt)
throws IOException
IOExceptionpublic BufferedImage toRawImage(WritableRaster raster)
PDColorSpacePDColorSpace.toRGBImage(WritableRaster) if this returns null.toRawImage in class PDColorSpaceraster - the source rasterpublic PDColorSpace getAlternateColorSpace()
public String getColorantName()
public void setColorantName(String name)
name - the name of the colorantpublic void setAlternateColorSpace(PDColorSpace colorSpace)
colorSpace - The alternate color space.public void setTintTransform(PDFunction tint)
tint - the tint transform functionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.