Class PDLab

    • Field Detail

      • NAME

        public static final java.lang.String NAME
        The name of this color space.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDLab

        public PDLab()
        Constructor.
      • PDLab

        public PDLab​(COSArray lab)
        Constructor with array.
        Parameters:
        lab - The underlying color space.
    • Method Detail

      • getName

        public java.lang.String getName()
        This will return the name of the color space.
        Specified by:
        getName in class PDColorSpace
        Returns:
        The name of the color space.
      • createColorSpace

        protected java.awt.color.ColorSpace createColorSpace()
                                                      throws java.io.IOException
        Create a Java colorspace for this colorspace.
        Specified by:
        createColorSpace in class PDColorSpace
        Returns:
        A color space that can be used for Java AWT operations.
        Throws:
        java.io.IOException - If there is an error creating the color space.
      • createColorModel

        public java.awt.image.ColorModel createColorModel​(int bpc)
                                                   throws java.io.IOException
        Create a Java color model for this colorspace.
        Specified by:
        createColorModel in class PDColorSpace
        Parameters:
        bpc - The number of bits per component.
        Returns:
        A color model that can be used for Java AWT operations.
        Throws:
        java.io.IOException - If there is an error creating the color model.
      • getNumberOfComponents

        public int getNumberOfComponents()
                                  throws java.io.IOException
        This will get the number of components that this color space is made up of.
        Specified by:
        getNumberOfComponents in class PDColorSpace
        Returns:
        The number of components in this color space.
        Throws:
        java.io.IOException - If there is an error getting the number of color components.
      • getWhitePoint

        public PDTristimulus getWhitePoint()
        This will return the whitepoint tristimulus. As this is a required field this will never return null. A default of 1,1,1 will be returned if the pdf does not have any values yet.
        Returns:
        the whitepoint tristimulus
      • setWhitePoint

        public void setWhitePoint​(PDTristimulus wp)
        This will set the whitepoint tristimulus. As this is a required field this null should not be passed into this function.
        Parameters:
        wp - The whitepoint tristimulus.
      • getBlackPoint

        public PDTristimulus getBlackPoint()
        This will return the BlackPoint tristimulus. This is an optional field but has defaults so this will never return null. A default of 0,0,0 will be returned if the pdf does not have any values yet.
        Returns:
        the blackpoint tristimulus
      • setBlackPoint

        public void setBlackPoint​(PDTristimulus bp)
        This will set the BlackPoint tristimulus. As this is a required field this null should not be passed into this function.
        Parameters:
        bp - The BlackPoint tristimulus.
      • getARange

        public PDRange getARange()
        This will get the valid range for the "a" component. If none is found then the default will be returned, which is -100..100.
        Returns:
        the "a" range.
      • setARange

        public void setARange​(PDRange range)
        This will set the a range for the "a" component.
        Parameters:
        range - the new range for the "a" component, or null if defaults (-100..100) are to be set.
      • getBRange

        public PDRange getBRange()
        This will get the valid range for the "b" component. If none is found then the default will be returned, which is -100..100.
        Returns:
        the "b" range.
      • setBRange

        public void setBRange​(PDRange range)
        This will set the "b" range for this color space.
        Parameters:
        range - the new range for the "b" component, or null if defaults (-100..100) are to be set.