pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1787815 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Mon, 20 Mar 2017 17:20:05 GMT
Author: tilman
Date: Mon Mar 20 17:20:05 2017
New Revision: 1787815

URL: http://svn.apache.org/viewvc?rev=1787815&view=rev
Log:
PDFBOX-3724: avoid 0 in dash array

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1787815&r1=1787814&r2=1787815&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Mon
Mar 20 17:20:05 2017
@@ -654,11 +654,9 @@ public class PageDrawer extends PDFGraph
             for (int i = 0; i < dashArray.length; ++i)
             {
                 // minimum line dash width avoids JVM crash, see PDFBOX-2373, PDFBOX-2929,
PDFBOX-3204
+                // also avoid 0 in array like "[ 0 1000 ] 0 d", see PDFBOX-3724
                 float w = transformWidth(dashArray[i]);
-                if (w != 0)
-                {
-                    dashArray[i] = Math.max(w, 0.035f);
-                }
+                dashArray[i] = Math.max(w, 0.035f);
             }
             phaseStart = (int)transformWidth(phaseStart);
 



Mime
View raw message