public abstract class GouraudShadingContext extends Object implements 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 ArrayList<GouraudTriangle> |
triangleList
triangle list.
|
Modifier | Constructor and Description |
---|---|
protected |
GouraudShadingContext(PDShadingResources shadingType,
ColorModel colorModelValue,
AffineTransform xform,
Matrix ctm,
int pageHeight)
Constructor creates an instance to be used for fill operations.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
ColorModel |
getColorModel() |
Raster |
getRaster(int x,
int y,
int w,
int h) |
protected org.apache.pdfbox.pdmodel.graphics.shading.Vertex |
readVertex(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(ArrayList<org.apache.pdfbox.pdmodel.graphics.shading.Vertex> vertexList,
Matrix ctm,
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 ArrayList<GouraudTriangle> triangleList
protected int bitsPerCoordinate
protected int bitsPerColorComponent
protected float[] background
protected GouraudShadingContext(PDShadingResources shadingType, ColorModel colorModelValue, AffineTransform xform, Matrix ctm, int pageHeight) throws 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 pageIOException
- if something went wrongprotected org.apache.pdfbox.pdmodel.graphics.shading.Vertex readVertex(ImageInputStream input, byte flag, long maxSrcCoord, long maxSrcColor, PDRange rangeX, PDRange rangeY, PDRange[] colRangeTab) throws 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 colorsIOException
- if something went wrongprotected void transformVertices(ArrayList<org.apache.pdfbox.pdmodel.graphics.shading.Vertex> vertexList, Matrix ctm, 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 PaintContext
public final ColorModel getColorModel()
getColorModel
in interface PaintContext
public final Raster getRaster(int x, int y, int w, int h)
getRaster
in interface PaintContext
Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.