java.lang.Object
org.sejda.sambox.pdmodel.graphics.color.PDTristimulus
- All Implemented Interfaces:
COSObjectable
A tristimulus, or collection of three floating point parameters used for color operations.
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.PDTristimulus(float[] array) Constructor from COS object.PDTristimulus(COSArray array) Constructor from COS object. -
Method Summary
Modifier and TypeMethodDescriptionfloatgetX()Returns the x value of the tristimulus.floatgetY()Returns the y value of the tristimulus.floatgetZ()Returns the z value of the tristimulus.voidsetX(float x) Sets the x value of the tristimulus.voidsetY(float y) Sets the y value of the tristimulus.voidsetZ(float z) Sets the z value of the tristimulus.
-
Constructor Details
-
PDTristimulus
public PDTristimulus()Constructor. Defaults all values to 0, 0, 0. -
PDTristimulus
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 Details
-
getCOSObject
- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The
COSBasethat matches this Java object.
-
getX
public float getX()Returns the x value of the tristimulus.- Returns:
- the X value
-
setX
public void setX(float x) Sets the x value of the tristimulus.- Parameters:
x- the x value for the tristimulus
-
getY
public float getY()Returns the y value of the tristimulus.- Returns:
- the Y value
-
setY
public void setY(float y) Sets the y value of the tristimulus.- Parameters:
y- the y value for the tristimulus
-
getZ
public float getZ()Returns the z value of the tristimulus.- Returns:
- the Z value
-
setZ
public void setZ(float z) Sets the z value of the tristimulus.- Parameters:
z- the z value for the tristimulus
-