]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2273: Stroke miter limit is not clamped when writing PDFs; patch submitted by...
authorLuis Bernardo <lbernardo@apache.org>
Fri, 12 Jul 2013 21:58:17 +0000 (21:58 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Fri, 12 Jul 2013 21:58:17 +0000 (21:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1502705 13f79535-47bb-0310-9956-ffa450edef68

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

index 25885a5ed465e68313b1a615126489f8873b8a86..526420d9c22f715ecc019e77cd70b6424747a671 100644 (file)
@@ -1237,7 +1237,7 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand
             float lw = bs.getLineWidth();
             currentStream.write(PDFNumber.doubleOut(lw) + " w\n");
 
-            float ml = bs.getMiterLimit();
+            float ml = Math.max(1.0f, bs.getMiterLimit());
             currentStream.write(PDFNumber.doubleOut(ml) + " M\n");
         }
     }