org.apache.pdfbox.pdmodel.graphics.color

## Class PDCIEDictionaryBasedColorSpace

- java.lang.Object
- - org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
  - - org.apache.pdfbox.pdmodel.graphics.color.PDCIEBasedColorSpace
    - - org.apache.pdfbox.pdmodel.graphics.color.PDCIEDictionaryBasedColorSpace

All Implemented Interfaces:
  COSObjectable

Direct Known Subclasses:
  PDCalGray, PDCalRGB, PDLab

    public abstract class PDCIEDictionaryBasedColorSpace
    extends PDCIEBasedColorSpace

CIE-based colour spaces that use a dictionary.

Author:
  Ben Litchfield, John Hewson

### Field Summary

Fields
`protected COSDictionary` `dictionary`
`protected float` `wpX`
`protected float` `wpY`
`protected float` `wpZ`

### Fields inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace

`array`

### Constructor Summary

Constructors
`protected` `PDCIEDictionaryBasedColorSpace(COSArray rgb)` Creates a new CalRGB color space using the given COS array.
`protected` `PDCIEDictionaryBasedColorSpace(COSName cosName)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected float[]` `convXYZtoRGB(float x, float y, float z)`
`PDTristimulus` `getBlackPoint()` This will return the BlackPoint tristimulus.
`PDTristimulus` `getWhitepoint()` This will return the whitepoint tristimulus.
`void` `setBlackPoint(PDTristimulus blackpoint)` This will set the BlackPoint tristimulus.
`void` `setWhitePoint(PDTristimulus whitepoint)` This will set the whitepoint tristimulus.

### Methods inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDCIEBasedColorSpace

`toRawImage, toRGBImage, toString`

### Methods inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace

`create, create, create, getCOSObject, getDefaultDecode, getInitialColor, getName, getNumberOfComponents, toRawImage, toRGB, toRGBImageAWT`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### dictionary

    protected COSDictionary dictionary

#### wpX

    protected float wpX

#### wpY

    protected float wpY

#### wpZ

    protected float wpZ

### Constructor Detail

#### PDCIEDictionaryBasedColorSpace

    protected PDCIEDictionaryBasedColorSpace(COSName cosName)

#### PDCIEDictionaryBasedColorSpace

    protected PDCIEDictionaryBasedColorSpace(COSArray rgb)

Creates a new CalRGB color space using the given COS array.

Parameters:
  `rgb` - the cos array which represents this color space

### Method Detail

#### convXYZtoRGB

    protected float[] convXYZtoRGB(float x,
                                   float y,
                                   float z)

#### getWhitepoint

    public final PDTristimulus getWhitepoint()

This will return the whitepoint tristimulus. As this is a required field this will never return null. A default of 1,1,1 will be returned if the pdf does not have any values yet.

Returns:
  the whitepoint tristimulus

#### getBlackPoint

    public final PDTristimulus getBlackPoint()

This will return the BlackPoint tristimulus. This is an optional field but has defaults so this will never return null. A default of 0,0,0 will be returned if the pdf does not have any values yet.

Returns:
  the blackpoint tristimulus

#### setWhitePoint

    public void setWhitePoint(PDTristimulus whitepoint)

This will set the whitepoint tristimulus. As this is a required field, null should not be passed into this function.

Parameters:
  `whitepoint` - the whitepoint tristimulus.
Throws:
  `IllegalArgumentException` - if null is passed as argument.

#### setBlackPoint

    public void setBlackPoint(PDTristimulus blackpoint)

This will set the BlackPoint tristimulus.

Parameters:
  `blackpoint` - the BlackPoint tristimulus