Class ShadingContext

  • All Implemented Interfaces:
    java.awt.PaintContext
    Direct Known Subclasses:
    AxialShadingContext, RadialShadingContext

    public abstract class ShadingContext
    extends java.lang.Object
    implements java.awt.PaintContext
    A base class to handle what is common to all shading types.
    Author:
    Shaola Ren, Tilman Hausherr
    • Constructor Summary

      Constructors 
      Constructor Description
      ShadingContext​(PDShading shading, java.awt.image.ColorModel cm, java.awt.geom.AffineTransform xform, Matrix matrix)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      java.awt.image.ColorModel getColorModel()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.awt.PaintContext

        getRaster
    • Constructor Detail

      • ShadingContext

        public ShadingContext​(PDShading shading,
                              java.awt.image.ColorModel cm,
                              java.awt.geom.AffineTransform xform,
                              Matrix matrix)
                       throws java.io.IOException
        Constructor.
        Parameters:
        shading - the shading type to be used
        cm - the color model to be used
        xform - transformation for user to device space
        matrix - the pattern matrix concatenated with that of the parent content stream
        Throws:
        java.io.IOException - if there is an error getting the color space or doing background color conversion.
    • Method Detail

      • getColorModel

        public java.awt.image.ColorModel getColorModel()
        Specified by:
        getColorModel in interface java.awt.PaintContext
      • dispose

        public void dispose()
        Specified by:
        dispose in interface java.awt.PaintContext