public class AxialShading extends ShadingPattern
The shading takes a pixel in the area to be to filled and drops a perpendicular to the axis defined by coords[]. It then calculates the parametric point t of the intersection, with t running from domain[0] to domain[1] along the axis. t is then turned into a color value using the supplied pdf function. TODO: currently ignores transform
ArbitraryColorSpaceShading, DeviceGrayShading, DeviceRGBShading
Constructor and Description |
---|
AxialShading(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 |
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 AxialShading(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 doShading(int[] samples, int x, int y, int w, int h)
ShadingPattern
doShading
in class ShadingPattern
public void setDeviceTransform(java.awt.geom.AffineTransform x, java.awt.Rectangle devRect)
setDeviceTransform
in class ShadingPattern