org.icepdf.core.pobjects.graphics
Class PColorSpace
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.graphics.PColorSpace
- Direct Known Subclasses:
- CalGray, CalRGB, DeviceCMYK, DeviceGray, DeviceN, DeviceRGB, ICCBased, Indexed, Lab, PatternColor, Separation
public abstract class PColorSpace
- extends Dictionary
put your documentation comment here
| 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 |
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 objectsn - number of colours in colour space
- Returns:
- a new PColorSpace given the value of n
getColor
public java.awt.Color getColor(float[] components)
- Gets the colour in RGB represented by the array of colour components
- Parameters:
components - array of component colour data
- Returns:
- new RGB colour composed from the components array.
getColor
public abstract java.awt.Color getColor(float[] components,
boolean fillAndStroke)
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)