public class RadialShadingContext extends ShadingContext implements java.awt.PaintContext
Modifier and Type | Field and Description |
---|---|
private int[] |
colorTable |
private float[] |
coords |
private float |
d1d0 |
private double |
denom |
private float[] |
domain |
private boolean[] |
extend |
private int |
factor |
private static org.apache.commons.logging.Log |
LOG |
private double |
r0pow2 |
private double |
r1r0 |
private PDShadingType3 |
radialShadingType |
private java.awt.geom.AffineTransform |
rat |
private double |
x1x0 |
private double |
y1y0 |
Constructor and Description |
---|
RadialShadingContext(PDShadingType3 shading,
java.awt.image.ColorModel colorModel,
java.awt.geom.AffineTransform xform,
Matrix matrix,
java.awt.Rectangle deviceBounds)
Constructor creates an instance to be used for fill operations.
|
Modifier and Type | Method and Description |
---|---|
private int[] |
calcColorTable()
Calculate the color on the line that connects two circles' centers and store the result in an
array.
|
private float[] |
calculateInputValues(double x,
double y) |
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) |
convertToRGB, getBackground, getRgbBackground, getShading, getShadingColorSpace
private static final org.apache.commons.logging.Log LOG
private PDShadingType3 radialShadingType
private final float[] coords
private final float[] domain
private final boolean[] extend
private final double x1x0
private final double y1y0
private final double r1r0
private final double r0pow2
private final float d1d0
private final double denom
private final int factor
private final int[] colorTable
private java.awt.geom.AffineTransform rat
public RadialShadingContext(PDShadingType3 shading, java.awt.image.ColorModel colorModel, java.awt.geom.AffineTransform xform, Matrix matrix, java.awt.Rectangle deviceBounds) throws java.io.IOException
shading
- the shading type to be usedcolorModel
- the color model to be usedxform
- transformation for user to device spacematrix
- the pattern matrix concatenated with that of the parent content streamdeviceBounds
- the bounds of the area to paint, in device unitsjava.io.IOException
- if there is an error getting the color space or doing color conversion.private int[] calcColorTable() throws java.io.IOException
java.io.IOException
public void dispose()
dispose
in interface java.awt.PaintContext
dispose
in class ShadingContext
public java.awt.image.ColorModel getColorModel()
getColorModel
in interface java.awt.PaintContext
getColorModel
in class ShadingContext
public java.awt.image.Raster getRaster(int x, int y, int w, int h)
getRaster
in interface java.awt.PaintContext
private float[] calculateInputValues(double x, double y)
public float[] getCoords()
public float[] getDomain()
public boolean[] getExtend()
public PDFunction getFunction() throws java.io.IOException
java.io.IOException
- if we were not able to create the function.