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

public Class PDShadingType7

extends PDMeshBasedShadingType
Class Inheritance
Imports
java.awt.Paint, java.awt.geom.AffineTransform, .Point2D, .Rectangle2D, java.io.IOException, org.apache.pdfbox.cos.COSDictionary, org.apache.pdfbox.util.Matrix

Resources for a shading type 7 (Tensor-Product Patch Mesh).

Constructor Summary

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

Constructor using the given shading dictionary.

Method Summary

Modifier and TypeMethod and Description
protected Patch
generatePatch(Point2D[]
12 or 16 control points
points
,
float[][]
4 corner colors
color
)

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType.generatePatch.

Create a patch using control points and 4 corner color values, in Type6ShadingContext, a CoonsPatch is returned; in Type6ShadingContext, a TensorPatch is returned.

public Rectangle2D
getBounds(AffineTransform
the affine transformation
xform
,
Matrix
the pattern matrix
matrix
)

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType.getBounds.

Calculate a bounding rectangle around the areas of this shading context.

public int
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
)

Overrides org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType4.toPaint.

Returns an AWT paint which corresponds to this shading

Inherited from org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType:
collectPatchesgetBoundsreadPatch

Constructor Detail

PDShadingType7back to summary
public PDShadingType7(COSDictionary shadingDictionary)

Constructor using the given shading dictionary.

Parameters
shadingDictionary:COSDictionary

the dictionary for this shading

Method Detail

generatePatchback to summary
protected Patch generatePatch(Point2D[] points, float[][] color)

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType.generatePatch.

Doc from org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType.generatePatch.

Create a patch using control points and 4 corner color values, in Type6ShadingContext, a CoonsPatch is returned; in Type6ShadingContext, a TensorPatch is returned.

Parameters
points:Point2D[]

12 or 16 control points

color:float[][]

4 corner colors

Returns:Patch

a patch instance

Annotations
@Override
getBoundsback to summary
public Rectangle2D getBounds(AffineTransform xform, Matrix matrix) throws IOException

Implements abstract org.apache.pdfbox.pdmodel.graphics.shading.PDMeshBasedShadingType.getBounds.

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

Calculate a bounding rectangle around the areas of this shading context.

Parameters
xform:AffineTransform

the affine transformation

matrix:Matrix

the pattern matrix

Returns:Rectangle2D

Bounding rectangle or null, if not supported by this shading type.

Annotations
@Override
Exceptions
IOException:
if the bounds could not be created
getShadingTypeback to summary
public int getShadingType()

Overrides org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType4.getShadingType.

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

This will return the shading type.

Returns:int

the shading typ

Annotations
@Override
toPaintback to summary
public Paint toPaint(Matrix matrix)

Overrides org.apache.pdfbox.pdmodel.graphics.shading.PDShadingType4.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