Class AxialShadingContext
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
org.apache.pdfbox.pdmodel.graphics.shading.AxialShadingContext
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionAxialShadingContext
(PDShadingType2 shading, ColorModel colorModel, AffineTransform xform, Matrix ctm, int pageHeight, Rectangle dBounds) Constructor creates an instance to be used for fill operations. -
Method Summary
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
convertToRGB, getShadingTintTransform
-
Constructor Details
-
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 usedcolorModel
- the color model to be usedxform
- transformation for user to device spacectm
- the transformation matrixpageHeight
- height of the current pagedBounds
- device bounds- Throws:
IOException
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfacePaintContext
-
getColorModel
- Specified by:
getColorModel
in interfacePaintContext
-
getRaster
- Specified by:
getRaster
in interfacePaintContext
-
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
Returns the function.- Returns:
- the function
- Throws:
IOException
- if something goes wrong
-