Class TensorPatch
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.shading.Patch
org.apache.pdfbox.pdmodel.graphics.shading.TensorPatch
This class is used to describe a patch for type 7 shading. This was done as
part of GSoC2014, Tilman Hausherr is the mentor.
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.shading.Patch
controlPoints, cornerColor, level, listOfTriangles
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TensorPatch
(Point2D[] tcp, float[][] color) Constructor of a patch for type 7 shading. -
Method Summary
Modifier and TypeMethodDescriptionprivate int[]
private double[][]
getBernsteinPolynomials
(int lvl) protected Point2D[]
Get the implicit edge for flag = 1.protected Point2D[]
Get the implicit edge for flag = 2.protected Point2D[]
Get the implicit edge for flag = 3.private CoordinateColorPair[][]
private List<ShadedTriangle>
private boolean
private boolean
private Point2D[][]
reshapeControlPoints
(Point2D[] tcp) Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.Patch
edgeEquationValue, getFlag1Color, getFlag2Color, getFlag3Color, getLen, getShadedTriangles, isEdgeALine
-
Constructor Details
-
TensorPatch
Constructor of a patch for type 7 shading.- Parameters:
tcp
- 16 control pointscolor
- 4 corner colors
-
-
Method Details
-
reshapeControlPoints
-
calcLevel
private int[] calcLevel() -
isOnSameSideCC
-
isOnSameSideDD
-
getTriangles
-
getFlag1Edge
Description copied from class:Patch
Get the implicit edge for flag = 1.- Specified by:
getFlag1Edge
in classPatch
- Returns:
- implicit control points
-
getFlag2Edge
Description copied from class:Patch
Get the implicit edge for flag = 2.- Specified by:
getFlag2Edge
in classPatch
- Returns:
- implicit control points
-
getFlag3Edge
Description copied from class:Patch
Get the implicit edge for flag = 3.- Specified by:
getFlag3Edge
in classPatch
- Returns:
- implicit control points
-
getPatchCoordinatesColor
-
getBernsteinPolynomials
private double[][] getBernsteinPolynomials(int lvl)
-