org.icepdf.core.pobjects.graphics
Class ICCBased

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.graphics.PColorSpace
          extended by org.icepdf.core.pobjects.graphics.ICCBased

public class ICCBased
extends PColorSpace

put your documentation comment here


Field Summary
static Name ICCBASED_KEY
           
static Name N_KEY
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
ICCBased(Library l, Stream h)
           
 
Method Summary
 PColorSpace getAlternate()
          Get the alternative colour specified by the N dictionary entry.
 java.awt.Color getColor(float[] f, boolean fillAndStroke)
           
 java.awt.color.ColorSpace getColorSpace()
           
 int getNumComponents()
          Gets the number of components specified by the N entry.
 void init()
          Initiate the Dictionary.
 
Methods inherited from class org.icepdf.core.pobjects.graphics.PColorSpace
getColor, getColorSpace, getColorSpace, getDescription, normaliseComponentsToFloats, reverse, reverseInPlace, reverseInPlace
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICCBASED_KEY

public static final Name ICCBASED_KEY

N_KEY

public static final Name N_KEY
Constructor Detail

ICCBased

public ICCBased(Library l,
                Stream h)
Method Detail

init

public void init()
Description copied from class: Dictionary
Initiate the Dictionary. Retrieve any needed attributes.

Overrides:
init in class Dictionary

getAlternate

public PColorSpace getAlternate()
Get the alternative colour specified by the N dictionary entry. DeviceGray, DeviceRGB, or DeviceCMYK, depending on whether the value of N is 1, 3 or 4, respectively.

Returns:
PDF colour space represented by the N (number of components)key.

getColor

public java.awt.Color getColor(float[] f,
                               boolean fillAndStroke)
Specified by:
getColor in class PColorSpace

getColorSpace

public java.awt.color.ColorSpace getColorSpace()

getNumComponents

public int getNumComponents()
Gets the number of components specified by the N entry.

Specified by:
getNumComponents in class PColorSpace
Returns:
number of colour components in color space