Class ShadingPattern
java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFPattern
com.inductiveautomation.rm.pdf.reader.fps.ShadingPattern
- All Implemented Interfaces:
- Paint,- PaintContext,- Transparency
- Direct Known Subclasses:
- AxialShading,- FunctionShading,- RadialShading
PDFShadingPattern.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from interface java.awt.TransparencyBITMASK, OPAQUE, TRANSLUCENT
- 
Constructor SummaryConstructorsConstructorDescriptionShadingPattern(Map patternDict, Map shadingDict, PDFFile srcFile) Constructor - patternDict may be null if this object was created from the shading operator (sh).
- 
Method SummaryModifier and TypeMethodDescriptioncreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Paint & PaintContext interfacesvoiddispose()abstract voiddoShading(int[] samples, int x, int y, int w, int h) Subclasses should implement this method to draw the shading.static ShadingPatterngetInstance(Map dict, PDFFile srcFile) Create an instance from a shading dictionary or a pattern dictionary.getPaint()Returns the awt Paint object which will render the patterngetRaster(int x, int y, int w, int h) intgetRGBAPixel(float[] sampleValues) This routine will get called for every pixel in the inner loop of the shading.Returns the pattern space transformintAlpha & color definitionsvoidinitializeShadingParameters(Map shadingDict, PDFFile srcFile) Read the shading parametersvoidvoidsetDeviceTransform(AffineTransform x, Rectangle devRect) Sets the transform from user space to device spaceMethods inherited from class com.inductiveautomation.rm.pdf.reader.PDFPatterngetGState, getInstance
- 
Field Details- 
DeviceRGBShadingpublic static final int DeviceRGBShading- See Also:
 
- 
DeviceGrayShadingpublic static final int DeviceGrayShading- See Also:
 
- 
ArbitraryColorSpaceShadingpublic static final int ArbitraryColorSpaceShading- See Also:
 
 
- 
- 
Constructor Details- 
ShadingPatternConstructor - patternDict may be null if this object was created from the shading operator (sh).
 
- 
- 
Method Details- 
getInstanceCreate an instance from a shading dictionary or a pattern dictionary.
- 
initializeShadingParametersRead the shading parameters
- 
setDeviceTransformSets the transform from user space to device space
- 
getTransformReturns the pattern space transform- Specified by:
- getTransformin class- PDFPattern
 
- 
getBounds
- 
setColorSpace
- 
getRGBAPixelpublic int getRGBAPixel(float[] sampleValues) This routine will get called for every pixel in the inner loop of the shading. If that gets too slow, you could always try to inline it. sampleValues are assumed to to have the right number of elements in the right range for the colorspace.
- 
getPaintDescription copied from class:PDFPatternReturns the awt Paint object which will render the pattern- Specified by:
- getPaintin class- PDFPattern
 
- 
createContextpublic PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Paint & PaintContext interfaces- Specified by:
- createContextin interface- Paint
 
- 
disposepublic void dispose()- Specified by:
- disposein interface- PaintContext
 
- 
getRaster- Specified by:
- getRasterin interface- PaintContext
 
- 
getTransparencypublic int getTransparency()Alpha & color definitions- Specified by:
- getTransparencyin interface- Transparency
 
- 
getColorModel- Specified by:
- getColorModelin interface- PaintContext
 
- 
doShadingpublic abstract void doShading(int[] samples, int x, int y, int w, int h) Subclasses 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.
 
-