org.apache.pdfbox.pdmodel.graphics.shading
Class AxialShadingContext

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
      extended by org.apache.pdfbox.pdmodel.graphics.shading.AxialShadingContext
All Implemented Interfaces:
PaintContext

public class AxialShadingContext
extends ShadingContext
implements PaintContext

AWT PaintContext for axial shading. Performance improvement done as part of GSoC2014, Tilman Hausherr is the mentor.

Author:
Andreas Lehmkühler, Shaola Ren

Field Summary
 
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
bboxRect, colorSpace, deviceBounds, maxBBoxX, maxBBoxY, minBBoxX, minBBoxY, outputColorModel, shading, shadingColorSpace, shadingTinttransform
 
Constructor Summary
AxialShadingContext(PDShadingType2 shading, ColorModel colorModel, AffineTransform xform, Matrix ctm, int pageHeight, Rectangle dBounds)
          Constructor creates an instance to be used for fill operations.
 
Method Summary
 void dispose()
          
 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.
 Raster getRaster(int x, int y, int w, int h)
          
 
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
convertToRGB, getShadingTintTransform
 
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,
                           ColorModel colorModel,
                           AffineTransform xform,
                           Matrix ctm,
                           int pageHeight,
                           Rectangle dBounds)
                    throws 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
ctm - the transformation matrix
pageHeight - height of the current page
dBounds - device bounds
Throws:
IOException
Method Detail

dispose

public void dispose()

Specified by:
dispose in interface PaintContext

getColorModel

public ColorModel getColorModel()

Specified by:
getColorModel in interface PaintContext

getRaster

public Raster getRaster(int x,
                        int y,
                        int w,
                        int h)

Specified by:
getRaster in interface PaintContext

getCoords

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

Returns:
the coords values as array

getDomain

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

Returns:
the domain values as array

getExtend

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

Returns:
the extend values as array

getFunction

public PDFunction getFunction()
                       throws IOException
Returns the function.

Returns:
the function
Throws:
IOException - if something goes wrong


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.