Class PDFPatternSpace

  • All Implemented Interfaces:
    java.io.Serializable

    public class PDFPatternSpace
    extends java.awt.color.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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Map patternDict  
      java.awt.color.ColorSpace tileSpace  
      • Fields inherited from class java.awt.color.ColorSpace

        CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float[] fromCIEXYZ​(float[] clrval)  
      float[] fromRGB​(float[] rgbvalue)  
      float[] toCIEXYZ​(float[] clrvalue)  
      float[] toRGB​(float[] colorvalue)  
      • Methods inherited from class java.awt.color.ColorSpace

        getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • patternDict

        public java.util.Map patternDict
      • tileSpace

        public java.awt.color.ColorSpace tileSpace
    • Constructor Detail

      • PDFPatternSpace

        public PDFPatternSpace()
      • PDFPatternSpace

        public PDFPatternSpace​(java.awt.color.ColorSpace tspace)
    • Method Detail

      • toRGB

        public float[] toRGB​(float[] colorvalue)
        Specified by:
        toRGB in class java.awt.color.ColorSpace
      • fromRGB

        public float[] fromRGB​(float[] rgbvalue)
        Specified by:
        fromRGB in class java.awt.color.ColorSpace
      • toCIEXYZ

        public float[] toCIEXYZ​(float[] clrvalue)
        Specified by:
        toCIEXYZ in class java.awt.color.ColorSpace
      • fromCIEXYZ

        public float[] fromCIEXYZ​(float[] clrval)
        Specified by:
        fromCIEXYZ in class java.awt.color.ColorSpace