org.icepdf.core.pobjects.graphics
Class DeviceCMYK

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.DeviceCMYK

public class DeviceCMYK
extends PColorSpace

Device CMYK colour space definitions. The primary purpose of this colour space is to convert cymk colours to rgb. No ICC profile is used in this process and the generated rgb colour is just and approximation.


Field Summary
static Name CMYK_KEY
           
static Name DEVICECMYK_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
DeviceCMYK(Library l, java.util.HashMap h)
           
 
Method Summary
 java.awt.Color getColor(float[] f, boolean fillAndStroke)
          Converts a 4 component cmyk colour to rgb.
 int getNumComponents()
           
 
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, init, 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

DEVICECMYK_KEY

public static final Name DEVICECMYK_KEY

CMYK_KEY

public static final Name CMYK_KEY
Constructor Detail

DeviceCMYK

public DeviceCMYK(Library l,
                  java.util.HashMap h)
Method Detail

getNumComponents

public int getNumComponents()
Specified by:
getNumComponents in class PColorSpace
Returns:

getColor

public java.awt.Color getColor(float[] f,
                               boolean fillAndStroke)
Converts a 4 component cmyk colour to rgb. With out a valid ICC colour profile this is just an approximation.

Specified by:
getColor in class PColorSpace
Parameters:
f - 4 component values of the cmyk, assumes compoents between 0.0 and 1.0
Returns:
valid rgb colour object.