]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixed dasharray units for small values that round to 0
authorKeiron Liddle <keiron@apache.org>
Thu, 30 Aug 2001 08:50:00 +0000 (08:50 +0000)
committerKeiron Liddle <keiron@apache.org>
Thu, 30 Aug 2001 08:50:00 +0000 (08:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194445 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/svg/PDFGraphics2D.java

index f38575d229ddb63ce8f9a0df53004793c085042e..e8b3c4a0eba1ac3f39da79f5c27e64aaeba3d49d 100644 (file)
@@ -659,7 +659,13 @@ public class PDFGraphics2D extends AbstractGraphics2D {
             if (da != null) {
                 currentStream.write("[");
                 for (int count = 0; count < da.length; count++) {
-                    currentStream.write("" + ((int)da[count]));
+                    if(((int)da[count]) == 0) {
+                        // the dasharray units in pdf are (whole) numbers
+                        // in user space units, cannot be 0
+                        currentStream.write("1");
+                    } else {
+                        currentStream.write("" + ((int)da[count]));
+                    }
                     if (count < da.length - 1) {
                         currentStream.write(" ");
                     }