Method from org.apache.pdfbox.pdmodel.graphics.color.PDDeviceN Detail: |
public ColorModel createColorModel(int bpc) throws IOException {
throw new IOException( "Not implemented" );
}
Create a Java color model for this colorspace. |
protected ColorSpace createColorSpace() throws IOException {
throw new IOException( "Not implemented" );
}
Create a Java colorspace for this colorspace. |
public PDColorSpace getAlternateColorSpace() throws IOException {
COSBase alternate = array.getObject( 2 );
return PDColorSpaceFactory.createColorSpace( alternate );
}
This will get the alternate color space for this separation. |
public PDDeviceNAttributes getAttributes() {
PDDeviceNAttributes retval = null;
if( array.size() < 5)
{
retval = new PDDeviceNAttributes();
setAttributes( retval );
}
return retval;
}
This will get the attributes that are associated with the deviceN
color space. |
public List getColorantNames() {
COSArray names = (COSArray)array.getObject( 1 );
return COSArrayList.convertCOSNameCOSArrayToList( names );
}
This will get the colorant names. A list of string objects. |
public String getName() {
return NAME;
}
This will return the name of the color space. For a PDSeparation object
this will always return "Separation" |
public int getNumberOfComponents() throws IOException {
return getColorantNames().size();
}
This will get the number of components that this color space is made up of. |
public PDFunction getTintTransform() throws IOException {
return PDFunction.create( array.getObject( 3 ) );
}
This will get the tint transform function. |
public void setAlternateColorSpace(PDColorSpace cs) {
COSBase space = null;
if( cs != null )
{
space = cs.getCOSObject();
}
array.set( 2, space );
}
This will set the alternate color space. |
public void setAttributes(PDDeviceNAttributes attributes) {
if( attributes == null )
{
array.remove( 4 );
}
else
{
//make sure array is large enough
while( array.size() < 5 )
{
array.add( COSNull.NULL );
}
array.set( 4, attributes.getCOSDictionary() );
}
}
This will set the color space attributes. If null is passed in then
all attribute will be removed. |
public void setColorantNames(List names) {
COSArray namesArray = COSArrayList.convertStringListToCOSNameCOSArray( names );
array.set( 1, namesArray );
}
This will set the list of colorants. |
public void setTintTransform(PDFunction tint) {
array.set( 3, tint );
}
This will set the tint transform function. |