From 5db8b6764b30432c1a7affb638e2a0a93b811c85 Mon Sep 17 00:00:00 2001 From: Luis Bernardo Date: Fri, 12 Jul 2013 21:58:17 +0000 Subject: [PATCH] FOP-2273: Stroke miter limit is not clamped when writing PDFs; patch submitted by Max Gilead 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index 25885a5ed..526420d9c 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -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"); } } -- 2.39.5