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
ConstructorsModifierConstructorDescriptionprotectedTensorPatch(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 booleanprivate booleanprivate 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:PatchGet the implicit edge for flag = 1.- Specified by:
getFlag1Edgein classPatch- Returns:
- implicit control points
-
getFlag2Edge
Description copied from class:PatchGet the implicit edge for flag = 2.- Specified by:
getFlag2Edgein classPatch- Returns:
- implicit control points
-
getFlag3Edge
Description copied from class:PatchGet the implicit edge for flag = 3.- Specified by:
getFlag3Edgein classPatch- Returns:
- implicit control points
-
getPatchCoordinatesColor
-
getBernsteinPolynomials
private double[][] getBernsteinPolynomials(int lvl)
-