Class ShadingContext
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
-
- Direct Known Subclasses:
AxialShadingContext,RadialShadingContext
public abstract class ShadingContext extends java.lang.ObjectA base class to handle stuff that is common to all shading types.- Author:
- Shaola Ren, Tilman Hausherr
-
-
Field Summary
Fields Modifier and Type Field Description protected PDRectanglebboxRectprotected PDColorSpacecolorSpaceprotected java.awt.RectangledeviceBoundsprotected floatmaxBBoxXprotected floatmaxBBoxYprotected floatminBBoxXprotected floatminBBoxYprotected java.awt.image.ColorModeloutputColorModelprotected PDShadingResourcesshadingprotected java.awt.color.ColorSpaceshadingColorSpaceprotected PDFunctionshadingTinttransform
-
Constructor Summary
Constructors Constructor Description ShadingContext(PDShadingResources shading, java.awt.image.ColorModel cm, java.awt.geom.AffineTransform xform, Matrix ctm, int pageHeight, java.awt.Rectangle dBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intconvertToRGB(float[] values)PDFunctiongetShadingTintTransform()Returns the function used for the shading tint transformation.
-
-
-
Field Detail
-
shading
protected final PDShadingResources shading
-
deviceBounds
protected final java.awt.Rectangle deviceBounds
-
shadingColorSpace
protected java.awt.color.ColorSpace shadingColorSpace
-
colorSpace
protected PDColorSpace colorSpace
-
bboxRect
protected PDRectangle bboxRect
-
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
-
-