pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1858377 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java
Date Mon, 29 Apr 2019 13:55:10 GMT
Author: tilman
Date: Mon Apr 29 13:55:09 2019
New Revision: 1858377

URL: http://svn.apache.org/viewvc?rev=1858377&view=rev
Log:
PDFBOX-4519: use optimized point type

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java?rev=1858377&r1=1858376&r2=1858377&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/TriangleBasedShadingContext.java
Mon Apr 29 13:55:09 2019
@@ -125,11 +125,11 @@ abstract class TriangleBasedShadingConte
 
                 // "fatten" triangle by drawing the borders with Bresenham's line algorithm
                 // Inspiration: Raph Levien in http://bugs.ghostscript.com/show_bug.cgi?id=219588
-                Point p0 = new Point((int) Math.round(tri.corner[0].getX()),
+                Point p0 = new IntPoint((int) Math.round(tri.corner[0].getX()),
                                      (int) Math.round(tri.corner[0].getY()));
-                Point p1 = new Point((int) Math.round(tri.corner[1].getX()),
+                Point p1 = new IntPoint((int) Math.round(tri.corner[1].getX()),
                                      (int) Math.round(tri.corner[1].getY()));
-                Point p2 = new Point((int) Math.round(tri.corner[2].getX()),
+                Point p2 = new IntPoint((int) Math.round(tri.corner[2].getX()),
                                      (int) Math.round(tri.corner[2].getY()));
                 Line l1 = new Line(p0, p1, tri.color[0], tri.color[1]);
                 Line l2 = new Line(p1, p2, tri.color[1], tri.color[2]);



Mime
View raw message