Class PDTristimulus

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

public final class PDTristimulus extends Object implements COSObjectable
A tristimulus, or collection of three floating point parameters used for color operations.
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
    Returns the x value of the tristimulus.
    float
    Returns the y value of the tristimulus.
    float
    Returns the z value of the tristimulus.
    void
    setX(float x)
    Sets the x value of the tristimulus.
    void
    setY(float y)
    Sets the y value of the tristimulus.
    void
    setZ(float z)
    Sets 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()
      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