Top Description Constructors Methods
org.apache.pdfbox.pdmodel.graphics.shading

public Class PDShadingType5

extends PDTriangleBasedShadingType
Class Inheritance
Imports
java.awt.Paint, java.awt.geom.AffineTransform, .Point2D, java.io.EOFException, .IOException, .InputStream, java.util.ArrayList, .Collections, .List, javax.imageio.stream.ImageInputStream, .MemoryCacheImageInputStream, org.apache.pdfbox.cos.COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.common.PDRange, org.apache.pdfbox.util.Matrix

Resources for a shading type 5 (Lattice-Form Gouraud-Shade Triangle Mesh).

Constructor Summary

AccessConstructor and Description
public
PDShadingType5(COSDictionary
the dictionary for this shading
shadingDictionary
)

Constructor using the given shading dictionary.

Method Summary

Modifier and TypeMethod and Description
pack-priv List<ShadedTriangle>
private List<ShadedTriangle>
createShadedTriangleList(int rowNum, int numPerRow, Vertex[][] latticeArray)

public int
getShadingType()

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDShading.getShadingType.

This will return the shading type.

public int

Returns:

the number of vertices per row
getVerticesPerRow
()

The vertices per row of this shading.

public void
setVerticesPerRow(int
the number of vertices per row
verticesPerRow
)

Set the number of vertices per row.

public Paint
toPaint(Matrix
the pattern matrix concatenated with that of the parent content stream, this matrix which maps the pattern's internal coordinate system to user space
matrix
)

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDShading.toPaint.

Returns an AWT paint which corresponds to this shading

Inherited from org.apache.pdfbox.pdmodel.graphics.shading.PDTriangleBasedShadingType:
getBitsPerComponentgetBitsPerCoordinategetBoundsgetDecodeForParametergetNumberOfColorComponentsinterpolatereadVertexsetBitsPerComponentsetBitsPerCoordinatesetDecodeValues

Constructor Detail

PDShadingType5back to summary
public PDShadingType5(COSDictionary shadingDictionary)

Constructor using the given shading dictionary.

Parameters
shadingDictionary:COSDictionary

the dictionary for this shading

Method Detail

collectTrianglesback to summary
pack-priv List<ShadedTriangle> collectTriangles(AffineTransform xform, Matrix matrix) throws IOException

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDTriangleBasedShadingType.collectTriangles.

Annotations
@SuppressWarnings:squid:S1166
@Override
createShadedTriangleListback to summary
private List<ShadedTriangle> createShadedTriangleList(int rowNum, int numPerRow, Vertex[][] latticeArray)
getShadingTypeback to summary
public int getShadingType()

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDShading.getShadingType.

Doc from org.apache.pdfbox.pdmodel.graphics.shading.PDShading.getShadingType.

This will return the shading type.

Returns:int

the shading typ

Annotations
@Override
getVerticesPerRowback to summary
public int getVerticesPerRow()

The vertices per row of this shading. This will return -1 if one has not been set.

Returns:int

the number of vertices per row

setVerticesPerRowback to summary
public void setVerticesPerRow(int verticesPerRow)

Set the number of vertices per row.

Parameters
verticesPerRow:int

the number of vertices per row

toPaintback to summary
public Paint toPaint(Matrix matrix)

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDShading.toPaint.

Doc from org.apache.pdfbox.pdmodel.graphics.shading.PDShading.toPaint.

Returns an AWT paint which corresponds to this shading

Parameters
matrix:Matrix

the pattern matrix concatenated with that of the parent content stream, this matrix which maps the pattern's internal coordinate system to user space

Returns:Paint

an AWT Paint instance

Annotations
@Override