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) |
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() |
getCOSObject
create, create, create, toRGBImageAWT
public 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()
PDColorSpace
getName
in class PDColorSpace
public int getNumberOfComponents()
PDColorSpace
getNumberOfComponents
in class PDColorSpace
public float[] getDefaultDecode(int bitsPerComponent)
PDColorSpace
getDefaultDecode
in class PDColorSpace
bitsPerComponent
- the number of bits per component.public PDColor getInitialColor()
PDColorSpace
getInitialColor
in class PDColorSpace
public float[] toRGB(float[] value) throws IOException
PDColorSpace
toRGB
in class PDColorSpace
value
- a color value with component values between 0 and 1IOException
- if the color conversion failspublic BufferedImage toRGBImage(WritableRaster raster) throws IOException
PDColorSpace
toRGBImage
in class PDColorSpace
raster
- the source rasterIOException
- if the color conversion failsprotected void tintTransform(float[] samples, int[] alt) throws IOException
IOException
public 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–2016 The Apache Software Foundation. All rights reserved.