From: Jeremias Maerki Date: Mon, 20 Apr 2009 07:00:34 +0000 (+0000) Subject: Bugzilla #47031: X-Git-Tag: fop-1_0~258 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eea5b25ec81856d7e47f18d54f146f881eb8c72c;p=xmlgraphics-fop.git Bugzilla #47031: PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path is empty. Submitted by: Francois Fernandes git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@766596 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index ede368f58..c5da8af6f 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -707,8 +707,13 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand if (s == null) { return; } - preparePainting(); PathIterator iter = s.getPathIterator(IDENTITY_TRANSFORM); + if (iter.isDone()) { + // no segments available. Not worth doing anything + return; + } + preparePainting(); + processPathIterator(iter); // clip area currentStream.write("W\n"); diff --git a/status.xml b/status.xml index fb6fc05ca..7d73899bd 100644 --- a/status.xml +++ b/status.xml @@ -58,7 +58,11 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> - + + PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path + is empty. + + Added a custom text painter for rendering SVG text using text operators when rendering to PostScript or EPS. Text is no longer painted as shapes, thus creating much smaller files.