Class RadialShadingContext
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
-
- org.apache.pdfbox.pdmodel.graphics.shading.RadialShadingContext
-
- All Implemented Interfaces:
java.awt.PaintContext
public class RadialShadingContext extends ShadingContext implements java.awt.PaintContext
AWT PaintContext for radial 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
Constructors Constructor Description RadialShadingContext(PDShadingType3 shading, java.awt.image.ColorModel colorModel, java.awt.geom.AffineTransform xform, Matrix ctm, int pageHeight, java.awt.Rectangle dBounds)
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 org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
convertToRGB, getShadingTintTransform
-
-
-
-
Constructor Detail
-
RadialShadingContext
public RadialShadingContext(PDShadingType3 shading, java.awt.image.ColorModel colorModel, java.awt.geom.AffineTransform xform, Matrix ctm, int pageHeight, java.awt.Rectangle dBounds) throws java.io.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 matrixdBounds
- device boundspageHeight
- height of the current page- Throws:
java.io.IOException
-
-
Method Detail
-
dispose
public void dispose()
- Specified by:
dispose
in interfacejava.awt.PaintContext
-
getColorModel
public java.awt.image.ColorModel getColorModel()
- Specified by:
getColorModel
in interfacejava.awt.PaintContext
-
getRaster
public java.awt.image.Raster getRaster(int x, int y, int w, int h)
- Specified by:
getRaster
in interfacejava.awt.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 java.io.IOException
Returns the function.- Returns:
- the function
- Throws:
java.io.IOException
- if something goes wrong
-
-