Class PDTristimulus

java.lang.Object
org.apache.pdfbox.pdmodel.graphics.color.PDTristimulus
All Implemented Interfaces:
COSObjectable

public class PDTristimulus extends 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
    Constructor.
    PDTristimulus(float[] array)
    Constructor from COS object.
    Constructor from COS object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Convert this standard java object to a COS object.
    float
    This will get the x value of the tristimulus.
    float
    This will get the y value of the tristimulus.
    float
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

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