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, setColorSpace
getGState, getInstance
public RadialShading(java.util.Map patternDict, java.util.Map shadingDict, PDFFile srcFile)
public void initializeShadingParameters(java.util.Map shadingDict, PDFFile srcFile)
initializeShadingParameters
in class ShadingPattern
public void setDeviceTransform(java.awt.geom.AffineTransform x, java.awt.Rectangle devRect)
setDeviceTransform
in class ShadingPattern
public void doShading(int[] samples, int x, int y, int w, int h)
ShadingPattern
doShading
in class ShadingPattern
public void doShadingWithTransform(int[] samples, int x, int y, int w, int h)