Interface ColorConverter

All Known Implementing Classes:
CmykToRgbColorConverter, RgbToCmykColorConverter

public interface ColorConverter
The interface for converting a single color according to another one or to another representation of the same one.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    convertColor(double[] original)
    Converts provided color.
    com.itextpdf.kernel.pdf.PdfName
    Returns original color space of the color.
    int
    Return number of components representing the original color space.
    com.itextpdf.kernel.pdf.PdfName
    Returns target color space of the color.
    int
    Return number of components representing the target color space.
  • Method Details

    • convertColor

      double[] convertColor (double[] original)
      Converts provided color.
      Parameters:
      original - is an array representing color components
      Returns:
      a new array representation of the color
    • getSourceColorspace

      com.itextpdf.kernel.pdf.PdfName getSourceColorspace()
      Returns original color space of the color.
      Returns:
      original color space
    • getSourceNumberOfComponents

      int getSourceNumberOfComponents()
      Return number of components representing the original color space.
      Returns:
      number of components of the original color space
    • getTargetColorspace

      com.itextpdf.kernel.pdf.PdfName getTargetColorspace()
      Returns target color space of the color.
      Returns:
      target color space
    • getTargetNumberOfComponents

      int getTargetNumberOfComponents()
      Return number of components representing the target color space.
      Returns:
      number of components of the target color space