Class Shading

  • Direct Known Subclasses:
    AxialShading, RadialShading

    public abstract class Shading
    extends PDFObject
    A PDF shading object (this class is abstract, subclasses implement particular shading types).
    • Field Detail

      • shadingType

        private ShadingType shadingType
        The shading type.
      • dictionary

        protected Dictionary dictionary
        The dictionary.
    • Constructor Detail

      • Shading

        protected Shading​(int number,
                          ShadingType shadingType)
        Creates a new shading instance.
        Parameters:
        number - the PDF object number.
        shadingType - the shading type (null not permitted).
    • Method Detail

      • getShadingType

        public ShadingType getShadingType()
        Returns the shading type.
        Returns:
        The shading type (never null).
      • getObjectBytes

        public byte[] getObjectBytes()
        Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.
        Specified by:
        getObjectBytes in class PDFObject
        Returns:
        A byte array.