CoonsPatch.java (pdfbox-2.0.23-src) | : | CoonsPatch.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
class CoonsPatch extends Patch | class CoonsPatch extends Patch | |||
{ | { | |||
/** | /** | |||
* Constructor of a patch for type 6 shading. | * Constructor of a patch for type 6 shading. | |||
* | * | |||
* @param points 12 control points | * @param points 12 control points | |||
* @param color 4 corner colors | * @param color 4 corner colors | |||
*/ | */ | |||
protected CoonsPatch(Point2D[] points, float[][] color) | protected CoonsPatch(Point2D[] points, float[][] color) | |||
{ | { | |||
super(points, color); | super(color); | |||
controlPoints = reshapeControlPoints(points); | controlPoints = reshapeControlPoints(points); | |||
level = calcLevel(); | level = calcLevel(); | |||
listOfTriangles = getTriangles(); | listOfTriangles = getTriangles(); | |||
} | } | |||
// adjust the 12 control points to 4 groups, each group defines one edge of a patch | // adjust the 12 control points to 4 groups, each group defines one edge of a patch | |||
private Point2D[][] reshapeControlPoints(Point2D[] points) | private Point2D[][] reshapeControlPoints(Point2D[] points) | |||
{ | { | |||
Point2D[][] fourRows = new Point2D[4][4]; | Point2D[][] fourRows = new Point2D[4][4]; | |||
fourRows[2] = new Point2D[] | fourRows[2] = new Point2D[] | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |