diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-04-20 07:00:34 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-04-20 07:00:34 +0000 |
commit | eea5b25ec81856d7e47f18d54f146f881eb8c72c (patch) | |
tree | ee6eca929bf48df35dfd8c8781154fba2b588136 /src | |
parent | e471816c05743e7e1517710cedb5cc256901d3e6 (diff) | |
download | xmlgraphics-fop-eea5b25ec81856d7e47f18d54f146f881eb8c72c.tar.gz xmlgraphics-fop-eea5b25ec81856d7e47f18d54f146f881eb8c72c.zip |
Bugzilla #47031:
PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path is empty.
Submitted by: Francois Fernandes <f.fernandes.at.web.de>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@766596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/svg/PDFGraphics2D.java | 7 |
1 files changed, 6 insertions, 1 deletions
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"); |