Class CoonsPatch
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.shading.Patch
org.apache.pdfbox.pdmodel.graphics.shading.CoonsPatch
This class is used to describe a patch for type 6 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
CoonsPatch
(Point2D[] points, float[][] color) Constructor of a patch for type 6 shading. -
Method Summary
Modifier and TypeMethodDescriptionprivate int[]
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[][]
getPatchCoordinatesColor
(CubicBezierCurve c1, CubicBezierCurve c2, CubicBezierCurve d1, CubicBezierCurve d2) private List<ShadedTriangle>
private Point2D[][]
reshapeControlPoints
(Point2D[] points) Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.Patch
edgeEquationValue, getFlag1Color, getFlag2Color, getFlag3Color, getLen, getShadedTriangles, isEdgeALine
-
Constructor Details
-
CoonsPatch
Constructor of a patch for type 6 shading.- Parameters:
points
- 12 control pointscolor
- 4 corner colors
-
-
Method Details
-
reshapeControlPoints
-
calcLevel
private int[] calcLevel() -
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
private CoordinateColorPair[][] getPatchCoordinatesColor(CubicBezierCurve c1, CubicBezierCurve c2, CubicBezierCurve d1, CubicBezierCurve d2)
-