Class AxialShading
- java.lang.Object
 - 
- com.inductiveautomation.rm.pdf.reader.PDFPattern
 - 
- com.inductiveautomation.rm.pdf.reader.fps.ShadingPattern
 - 
- com.inductiveautomation.rm.pdf.reader.fps.AxialShading
 
 
 
 
- 
- All Implemented Interfaces:
 java.awt.Paint,java.awt.PaintContext,java.awt.Transparency
public class AxialShading extends ShadingPattern
Implementation of Type 2 shadings, which vary color along a linear axis.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
 
- 
- 
Field Summary
- 
Fields inherited from class com.inductiveautomation.rm.pdf.reader.fps.ShadingPattern
ArbitraryColorSpaceShading, DeviceGrayShading, DeviceRGBShading 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AxialShading(java.util.Map patternDict, java.util.Map shadingDict, PDFFile srcFile) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoShading(int[] samples, int x, int y, int w, int h)Subclasses should implement this method to draw the shading.voidinitializeShadingParameters(java.util.Map shadingDict, PDFFile srcFile)Read the shading parametersvoidsetDeviceTransform(java.awt.geom.AffineTransform x, java.awt.Rectangle devRect)Sets the transform from user space to device space- 
Methods inherited from class com.inductiveautomation.rm.pdf.reader.fps.ShadingPattern
createContext, dispose, getBounds, getColorModel, getInstance, getPaint, getRaster, getRGBAPixel, getTransform, getTransparency, setColorSpace 
- 
Methods inherited from class com.inductiveautomation.rm.pdf.reader.PDFPattern
getGState, getInstance 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AxialShading
public AxialShading(java.util.Map patternDict, java.util.Map shadingDict, PDFFile srcFile) 
 - 
 
- 
Method Detail
- 
initializeShadingParameters
public void initializeShadingParameters(java.util.Map shadingDict, PDFFile srcFile)Read the shading parameters- Overrides:
 initializeShadingParametersin classShadingPattern
 
- 
doShading
public void doShading(int[] samples, int x, int y, int w, int h)Description copied from class:ShadingPatternSubclasses should implement this method to draw the shading. Samples is defined to be an array of 8 bit persample/4 samples per pixel ARGB pixels. There is no padding, so all scanlines are w integers wide.- Specified by:
 doShadingin classShadingPattern
 
- 
setDeviceTransform
public void setDeviceTransform(java.awt.geom.AffineTransform x, java.awt.Rectangle devRect)Sets the transform from user space to device space- Overrides:
 setDeviceTransformin classShadingPattern
 
 - 
 
 -