org.apache.fop.pdf

## Class PDFSeparationColorSpace

- java.lang.Object
- - org.apache.fop.pdf.PDFObject
  - - org.apache.fop.pdf.PDFArray
    - - org.apache.fop.pdf.PDFSeparationColorSpace

- All Implemented Interfaces:
    PDFColorSpace, PDFWritable

      public class PDFSeparationColorSpace
      extends PDFArray
      implements PDFColorSpace

  This class represents a "Separation" color space. It is used in FOP to map named colors.

- - ### Field Summary

    - ### Fields inherited from class org.apache.fop.pdf.PDFArray

      `values`

    - ### Fields inherited from class org.apache.fop.pdf.PDFObject

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFSeparationColorSpace(String colorName, PDFFunction tintFunction)` Creates a new "Separation" color space.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PDFName` | `getColorName()` Returns the name of the colorant.
    `String` | `getName()`
    `int` | `getNumComponents()` Get the number of color components for this colorspace
    `PDFReference` | `getTintFunction()` Returns a reference to the tint function that is used as a fallback if the colorant is not available.
    `boolean` | `isCMYKColorSpace()`
    `boolean` | `isDeviceColorSpace()`
    `boolean` | `isGrayColorSpace()`
    `boolean` | `isRGBColorSpace()`

    - ### Methods inherited from class org.apache.fop.pdf.PDFArray

      `add, add, clear, contains, get, getChildren, length, output, set, set`

    - ### Methods inherited from class org.apache.fop.pdf.PDFObject

      `contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PDFSeparationColorSpace

          public PDFSeparationColorSpace(String colorName,
                                         PDFFunction tintFunction)

      Creates a new "Separation" color space.
      Parameters:
        `colorName` - the name of the colorant
        `tintFunction` - the tint function used as fallback

  - ### Method Detail

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `PDFColorSpace`
      Returns:
        the name of the color space

    - #### getColorName

          public PDFName getColorName()

      Returns the name of the colorant.
      Returns:
        the name of the colorant

    - #### getTintFunction

          public PDFReference getTintFunction()

      Returns a reference to the tint function that is used as a fallback if the colorant is not available.
      Returns:
        a reference to the tint function

    - #### getNumComponents

          public int getNumComponents()

      Get the number of color components for this colorspace
      Specified by:
        `getNumComponents` in interface `PDFColorSpace`
      Returns:
        the number of components

    - #### isCMYKColorSpace

          public boolean isCMYKColorSpace()

      Specified by:
        `isCMYKColorSpace` in interface `PDFColorSpace`
      Returns:
        true if the color space is an CMYK color space

    - #### isDeviceColorSpace

          public boolean isDeviceColorSpace()

      Specified by:
        `isDeviceColorSpace` in interface `PDFColorSpace`
      Returns:
        true if the color space is a device-dependent color space (like DeviceRGB, DeviceCMYK and DeviceGray)

    - #### isGrayColorSpace

          public boolean isGrayColorSpace()

      Specified by:
        `isGrayColorSpace` in interface `PDFColorSpace`
      Returns:
        true if the color space is an Gray color space

    - #### isRGBColorSpace

          public boolean isRGBColorSpace()

      Specified by:
        `isRGBColorSpace` in interface `PDFColorSpace`
      Returns:
        true if the color space is an RGB color space

Copyright © 2023 Apache Software Foundation. All rights reserved.