org.icepdf.core.pobjects.graphics
Class PColorSpace

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.graphics.PColorSpace
Direct Known Subclasses:
CalRGB, DeviceCMYK, DeviceGray, DeviceN, DeviceRGB, ICCBased, Indexed, Lab, PatternColor, Separation

public abstract class PColorSpace
extends Dictionary

put your documentation comment here


Field Summary
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY
 
Method Summary
abstract  java.awt.Color getColor(float[] f)
           
static PColorSpace getColorSpace(Library library, float n)
          Gets the color space for the given n value.
static PColorSpace getColorSpace(Library library, java.lang.Object o)
           
 java.lang.String getDescription()
           
abstract  int getNumComponents()
           
 void normaliseComponentsToFloats(int[] in, float[] out, float maxval)
           
static float[] reverse(float[] f)
           
static void reverseInPlace(float[] f)
           
static void reverseInPlace(int[] f)
           
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, 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
 

Method Detail

getNumComponents

public abstract int getNumComponents()
Returns:

getDescription

public java.lang.String getDescription()

getColorSpace

public static PColorSpace getColorSpace(Library library,
                                        java.lang.Object o)
Parameters:
library -
o -
Returns:

getColorSpace

public static PColorSpace getColorSpace(Library library,
                                        float n)
Gets the color space for the given n value. If n == 3 then the new color space with be RGB, if n == 4 then CMYK and finally if n == 1 then Gray.

Parameters:
library - hash of all library objects
n - number of colours in colour space
Returns:
a new PColorSpace given the value of n

getColor

public abstract java.awt.Color getColor(float[] f)
Parameters:
f -
Returns:

normaliseComponentsToFloats

public void normaliseComponentsToFloats(int[] in,
                                        float[] out,
                                        float maxval)

reverse

public static float[] reverse(float[] f)
Parameters:
f -
Returns:

reverseInPlace

public static void reverseInPlace(float[] f)

reverseInPlace

public static void reverseInPlace(int[] f)