Class ShadingContext

  • Direct Known Subclasses:
    AxialShadingContext, RadialShadingContext

    public abstract class ShadingContext
    extends java.lang.Object
    A base class to handle stuff that is common to all shading types.
    Author:
    Shaola Ren, Tilman Hausherr
    • Field Detail

      • deviceBounds

        protected final java.awt.Rectangle deviceBounds
      • shadingColorSpace

        protected java.awt.color.ColorSpace shadingColorSpace
      • minBBoxX

        protected float minBBoxX
      • minBBoxY

        protected float minBBoxY
      • maxBBoxX

        protected float maxBBoxX
      • maxBBoxY

        protected float maxBBoxY
      • outputColorModel

        protected java.awt.image.ColorModel outputColorModel
      • shadingTinttransform

        protected PDFunction shadingTinttransform
    • Constructor Detail

      • ShadingContext

        public ShadingContext​(PDShadingResources shading,
                              java.awt.image.ColorModel cm,
                              java.awt.geom.AffineTransform xform,
                              Matrix ctm,
                              int pageHeight,
                              java.awt.Rectangle dBounds)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • convertToRGB

        protected int convertToRGB​(float[] values)
      • getShadingTintTransform

        public PDFunction getShadingTintTransform()
        Returns the function used for the shading tint transformation.
        Returns:
        the shading tint transformation function