Class PDFPatternSpace

java.lang.Object
java.awt.color.ColorSpace
com.inductiveautomation.rm.pdf.reader.PDFPatternSpace
All Implemented Interfaces:
Serializable

public class PDFPatternSpace extends ColorSpace
The Pattern colorspace is a special colorspace where shadings and tiling patterns can be declared. PDF treats this like other colorspaces, but it is not a full colorspace as far as awt is concerned. Awt colorspaces are expected to be able to convert colors between each other, but this doesn't make sense for patterns or shadings. The conversion methods just generate errors, so if the colorspace is ever used in a strange place (like an image) it will generate an exception, and we don't need to always be checking to see if a particular colorspace is appropriate for the given operation.

To draw in a pattern colorspace, you can ask the colorspace for a Paint object. Classes which implement the java.awt.Paint interface can be created for all the different shading types, as well as for tiling patterns.

See Also:
  • Field Details

    • patternDict

      public Map patternDict
    • tileSpace

      public ColorSpace tileSpace
  • Constructor Details

    • PDFPatternSpace

      public PDFPatternSpace()
    • PDFPatternSpace

      public PDFPatternSpace(ColorSpace tspace)
  • Method Details

    • toRGB

      public float[] toRGB(float[] colorvalue)
      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      Specified by:
      fromRGB in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] clrvalue)
      Specified by:
      toCIEXYZ in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] clrval)
      Specified by:
      fromCIEXYZ in class ColorSpace