Class PDTristimulus
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.color.PDTristimulus
-
- All 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
Constructors Constructor Description PDTristimulus()
Constructor.PDTristimulus(float[] array)
Constructor from COS object.PDTristimulus(COSArray array)
Constructor from COS object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 Detail
-
PDTristimulus
public PDTristimulus()
Constructor. Defaults all values to 0, 0, 0.
-
PDTristimulus
public PDTristimulus(COSArray array)
Constructor from COS object.- Parameters:
array
- The array containing the XYZ values.
-
PDTristimulus
public PDTristimulus(float[] array)
Constructor from COS object.- Parameters:
array
- The array containing the XYZ values.
-
-
Method Detail
-
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- 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.
-
setX
public void setX(float x)
This will set the x value of the tristimulus.- Parameters:
x
- The x value for the tristimulus.
-
getY
public float getY()
This will get the y value of the tristimulus.- Returns:
- The Y value.
-
setY
public void setY(float y)
This will set the y value of the tristimulus.- Parameters:
y
- The y value for the tristimulus.
-
getZ
public float getZ()
This will get the z value of the tristimulus.- Returns:
- The Z value.
-
setZ
public void setZ(float z)
This will set the z value of the tristimulus.- Parameters:
z
- The z value for the tristimulus.
-
-