org.pdfbox.pdmodel.graphics.color

Class PDTristimulus

Implemented Interfaces:
COSObjectable

public class PDTristimulus
extends java.lang.Object
implements COSObjectable

A tristimulus, or collection of three floating point parameters used for color operations.
Version:
$Revision: 1.2 $
Author:
Ben Litchfield

Constructor Summary

PDTristimulus()
Constructor.
PDTristimulus(float[] array)
Constructor from COS object.
PDTristimulus(COSArray array)
Constructor from COS object.

Method Summary

COSBase
getCOSObject()
Convert this standard java object to a COS object.
float
getX()
This will get the x value of the tristimulus.
float
getY()
This will get the y value of the tristimulus.
float
getZ()
This will get the z value of the tristimulus.
void
setX(float x)
This will set the x value of the tristimulus.
void
setY(float y)
This will set the y value of the tristimulus.
void
setZ(float z)
This will set the z value of the tristimulus.

Constructor Details

PDTristimulus

public PDTristimulus()
Constructor. Defaults all values to 0, 0, 0.

PDTristimulus

public PDTristimulus(float[] array)
Constructor from COS object.
Parameters:
array - The array containing the XYZ values.

PDTristimulus

public PDTristimulus(COSArray array)
Constructor from COS object.
Parameters:
array - The array containing the XYZ values.

Method Details

getCOSObject

public COSBase getCOSObject()
Convert this standard java object to a COS object.
Specified by:
getCOSObject in interface COSObjectable
Returns:
The cos object that matches this Java object.

getX

public float getX()
This will get the x value of the tristimulus.
Returns:
The X value.

getY

public float getY()
This will get the y value of the tristimulus.
Returns:
The Y value.

getZ

public float getZ()
This will get the z value of the tristimulus.
Returns:
The Z value.

setX

public void setX(float x)
This will set the x value of the tristimulus.
Parameters:
x - The x value for the tristimulus.

setY

public void setY(float y)
This will set the y value of the tristimulus.
Parameters:
y - The y value for the tristimulus.

setZ

public void setZ(float z)
This will set the z value of the tristimulus.
Parameters:
z - The z value for the tristimulus.