org.icepdf.core.pobjects.graphics
Class CalRGB

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

public class CalRGB
extends PColorSpace

A CalRGB colour space is a CIE-based ABC colour space with only one transformation stage instead of two. In this type of space, A, B, and C represent calibrated red, green, and blue colour values. These three colour components shall be in the range 0.0 to 1.0; component values falling outside that range shall be adjusted to the nearest valid value without error indication. The decoding functions (denoted by “Decode ABC� in Figure 22) are gamma functions whose coefficients shall be specified by the Gamma entry in the colour space dictionary (see Table 64). The transformation matrix denoted by “Matrix ABC� in Figure 22 shall be defined by the dictionary’s Matrix entry. Since there is no second transformation stage, “Decode LMN� and “Matrix LMN� shall be implicitly taken to be identity transformations.

Since:
1.0

Field Summary
static Name CALRGB_KEY
           
protected  float[] gamma
           
static Name GAMMA_KEY
           
protected  float[] matrix
           
static Name MATRIX_KEY
           
static Name WHITE_POINT_KEY
           
protected  float[] whitepoint
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Method Summary
 java.awt.Color getColor(float[] f, boolean fillAndStroke)
           
 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

WHITE_POINT_KEY

public static final Name WHITE_POINT_KEY

GAMMA_KEY

public static final Name GAMMA_KEY

MATRIX_KEY

public static final Name MATRIX_KEY

CALRGB_KEY

public static final Name CALRGB_KEY

whitepoint

protected float[] whitepoint

gamma

protected float[] gamma

matrix

protected float[] matrix
Method Detail

getNumComponents

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

getColor

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