"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/ShadedTriangle.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

ShadedTriangle.java  (pdfbox-2.0.23-src):ShadedTriangle.java  (pdfbox-2.0.24-src)
skipping to change at line 55 skipping to change at line 55
private final Line line; private final Line line;
// corner's edge (the opposite edge of a corner) equation value // corner's edge (the opposite edge of a corner) equation value
private final double v0; private final double v0;
private final double v1; private final double v1;
private final double v2; private final double v2;
/** /**
* Constructor. * Constructor.
* *
* @param p an array of the 3 vertices of a triangle * @param p an array of the 3 vertices of a triangle; the Point2D objects sh
ould not be modified
* by the caller.
* @param c an array of color corresponding the vertex array p * @param c an array of color corresponding the vertex array p
*/ */
ShadedTriangle(Point2D[] p, float[][] c) ShadedTriangle(Point2D[] p, float[][] c)
{ {
corner = p.clone(); corner = p.clone(); // yes this is a shallow clone
color = c.clone(); color = c.clone();
area = getArea(p[0], p[1], p[2]); area = getArea(p[0], p[1], p[2]);
degree = calcDeg(p); degree = calcDeg(p);
if (degree == 2) if (degree == 2)
{ {
if (overlaps(corner[1], corner[2]) && !overlaps(corner[0], corner[2] )) if (overlaps(corner[1], corner[2]) && !overlaps(corner[0], corner[2] ))
{ {
Point p0 = new Point((int) Math.round(corner[0].getX()), Point p0 = new Point((int) Math.round(corner[0].getX()),
(int) Math.round(corner[0].getY())); (int) Math.round(corner[0].getY()));
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)