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

public Class PDShadingType4

extends PDTriangleBasedShadingType
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType
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.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.common.PDRange, org.apache.pdfbox.util.Matrix

Resources for a shading type 4 (Free-Form Gouraud-Shaded Triangle Mesh).

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

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

Constructor using the given shading dictionary.

Method Summary

Modifier and TypeMethod and Description
pack-priv List<ShadedTriangle>
public int

Returns:

The number of bits per flag.
getBitsPerFlag
()

The bits per flag of this shading.

public int
getShadingType()

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

This will return the shading type.

public void
setBitsPerFlag(int
the number of bits per flag
bitsPerFlag
)

Set the number of bits per flag.

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

Field Detail

LOGback to summary
private static final Log LOG

Hides org.apache.pdfbox.pdmodel.graphics.shading.PDTriangleBasedShadingType.LOG.

Constructor Detail

PDShadingType4back to summary
public PDShadingType4(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
getBitsPerFlagback to summary
public int getBitsPerFlag()

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

Returns:int

The number of bits per flag.

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
setBitsPerFlagback to summary
public void setBitsPerFlag(int bitsPerFlag)

Set the number of bits per flag.

Parameters
bitsPerFlag:int

the number of bits per flag

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