public class RadialShading extends ShadingPattern
PDF radial shadings are defined by two circles and a function. The circles need not be centered at the same location. The shading works by interpolating the centers and radii of the two circles. The distance along the line defined by the two centers or radii is then mapped into the domain of the function, which returns the final color values. TODO: currently ignores transform and background color
ArbitraryColorSpaceShading, DeviceGrayShading, DeviceRGBShading| Constructor and Description |
|---|
RadialShading(java.util.Map patternDict,
java.util.Map shadingDict,
PDFFile srcFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
doShading(int[] samples,
int x,
int y,
int w,
int h)
Subclasses should implement this method to draw the shading.
|
void |
doShadingWithTransform(int[] samples,
int x,
int y,
int w,
int h) |
void |
initializeShadingParameters(java.util.Map shadingDict,
PDFFile srcFile)
Read the shading parameters
|
void |
setDeviceTransform(java.awt.geom.AffineTransform x,
java.awt.Rectangle devRect)
Sets the transform from user space to device space
|
createContext, dispose, getBounds, getColorModel, getInstance, getPaint, getRaster, getRGBAPixel, getTransform, getTransparency, setColorSpacegetGState, getInstancepublic RadialShading(java.util.Map patternDict,
java.util.Map shadingDict,
PDFFile srcFile)
public void initializeShadingParameters(java.util.Map shadingDict,
PDFFile srcFile)
initializeShadingParameters in class ShadingPatternpublic void setDeviceTransform(java.awt.geom.AffineTransform x,
java.awt.Rectangle devRect)
setDeviceTransform in class ShadingPatternpublic void doShading(int[] samples,
int x,
int y,
int w,
int h)
ShadingPatterndoShading in class ShadingPatternpublic void doShadingWithTransform(int[] samples,
int x,
int y,
int w,
int h)