Class AxialShadingContext

  • All Implemented Interfaces:
    java.awt.PaintContext

    public class AxialShadingContext
    extends ShadingContext
    implements java.awt.PaintContext
    AWT PaintContext for axial shading. Performance improvement done as part of GSoC2014, Tilman Hausherr is the mentor.
    Author:
    Shaola Ren
    • Constructor Summary

      Constructors 
      Constructor Description
      AxialShadingContext​(PDShadingType2 shading, java.awt.image.ColorModel colorModel, java.awt.geom.AffineTransform xform, Matrix matrix, java.awt.Rectangle deviceBounds)
      Constructor creates an instance to be used for fill operations.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      java.awt.image.ColorModel getColorModel()  
      float[] getCoords()
      Returns the coords values.
      float[] getDomain()
      Returns the domain values.
      boolean[] getExtend()
      Returns the extend values.
      PDFunction getFunction()
      Returns the function.
      java.awt.image.Raster getRaster​(int x, int y, int w, int h)  
      • Methods inherited from class java.lang.Object

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

      • AxialShadingContext

        public AxialShadingContext​(PDShadingType2 shading,
                                   java.awt.image.ColorModel colorModel,
                                   java.awt.geom.AffineTransform xform,
                                   Matrix matrix,
                                   java.awt.Rectangle deviceBounds)
                            throws java.io.IOException
        Constructor creates an instance to be used for fill operations.
        Parameters:
        shading - the shading type to be used
        colorModel - 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
        deviceBounds - the bounds of the area to paint, in device units
        Throws:
        java.io.IOException - if there is an error getting the color space or doing color conversion.
    • Method Detail

      • dispose

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

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

        public java.awt.image.Raster getRaster​(int x,
                                               int y,
                                               int w,
                                               int h)
        Specified by:
        getRaster in interface java.awt.PaintContext
      • getCoords

        public float[] getCoords()
        Returns the coords values.
      • getDomain

        public float[] getDomain()
        Returns the domain values.
      • getExtend

        public boolean[] getExtend()
        Returns the extend values.
      • getFunction

        public PDFunction getFunction()
                               throws java.io.IOException
        Returns the function.
        Throws:
        java.io.IOException - if we were not able to create the function.