Class ShadingContext
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.shading.ShadingContext
-
- Direct Known Subclasses:
AxialShadingContext
,RadialShadingContext
public abstract class ShadingContext extends java.lang.Object
A 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 PDRectangle
bboxRect
protected PDColorSpace
colorSpace
protected java.awt.Rectangle
deviceBounds
protected float
maxBBoxX
protected float
maxBBoxY
protected float
minBBoxX
protected float
minBBoxY
protected java.awt.image.ColorModel
outputColorModel
protected PDShadingResources
shading
protected java.awt.color.ColorSpace
shadingColorSpace
protected PDFunction
shadingTinttransform
-
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 int
convertToRGB(float[] values)
PDFunction
getShadingTintTransform()
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
-
-