public abstract class GouraudShadingContext
extends java.lang.Object
implements java.awt.PaintContext
Modifier and Type | Field and Description |
---|---|
protected float[] |
background
background values.
|
protected int |
bitsPerColorComponent
bits per color component.
|
protected int |
bitsPerCoordinate
bits per coordinate.
|
protected int |
numberOfColorComponents
number of color components.
|
protected java.util.ArrayList<GouraudTriangle> |
triangleList
triangle list.
|
Modifier | Constructor and Description |
---|---|
protected |
GouraudShadingContext(PDShadingResources shadingType,
java.awt.image.ColorModel colorModelValue,
java.awt.geom.AffineTransform xform,
Matrix ctm,
int pageHeight)
Constructor creates an instance to be used for fill operations.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
java.awt.image.ColorModel |
getColorModel() |
java.awt.image.Raster |
getRaster(int x,
int y,
int w,
int h) |
protected org.apache.pdfbox.pdmodel.graphics.shading.Vertex |
readVertex(javax.imageio.stream.ImageInputStream input,
byte flag,
long maxSrcCoord,
long maxSrcColor,
PDRange rangeX,
PDRange rangeY,
PDRange[] colRangeTab)
Read a vertex from the bit input stream and do the interpolations
described in the PDF specification.
|
protected void |
transformVertices(java.util.ArrayList<org.apache.pdfbox.pdmodel.graphics.shading.Vertex> vertexList,
Matrix ctm,
java.awt.geom.AffineTransform xform,
int pageHeight)
transform a list of vertices from shading to user space (if applicable)
and from user to device space.
|
protected int numberOfColorComponents
protected java.util.ArrayList<GouraudTriangle> triangleList
protected int bitsPerCoordinate
protected int bitsPerColorComponent
protected float[] background
protected GouraudShadingContext(PDShadingResources shadingType, java.awt.image.ColorModel colorModelValue, java.awt.geom.AffineTransform xform, Matrix ctm, int pageHeight) throws java.io.IOException
shadingType
- the shading type to be usedcolorModelValue
- the color model to be usedxform
- transformation for user to device spacectm
- current transformation matrixpageHeight
- height of the current pagejava.io.IOException
- if something went wrongprotected org.apache.pdfbox.pdmodel.graphics.shading.Vertex readVertex(javax.imageio.stream.ImageInputStream input, byte flag, long maxSrcCoord, long maxSrcColor, PDRange rangeX, PDRange rangeY, PDRange[] colRangeTab) throws java.io.IOException
input
- bit input streamflag
- the flag or any value if not relevantmaxSrcCoord
- max value for source coordinate (2^bits-1)maxSrcColor
- max value for source color (2^bits-1)rangeX
- dest range for XrangeY
- dest range for YcolRangeTab
- dest range array for colorsjava.io.IOException
- if something went wrongprotected void transformVertices(java.util.ArrayList<org.apache.pdfbox.pdmodel.graphics.shading.Vertex> vertexList, Matrix ctm, java.awt.geom.AffineTransform xform, int pageHeight)
vertexList
- list of verticesxform
- transformation for user to device spacectm
- current transformation matrixpageHeight
- height of the current pagepublic void dispose()
dispose
in interface java.awt.PaintContext
public final java.awt.image.ColorModel getColorModel()
getColorModel
in interface java.awt.PaintContext
public final java.awt.image.Raster getRaster(int x, int y, int w, int h)
getRaster
in interface java.awt.PaintContext