]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #47031:
authorJeremias Maerki <jeremias@apache.org>
Mon, 20 Apr 2009 07:00:34 +0000 (07:00 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 20 Apr 2009 07:00:34 +0000 (07:00 +0000)
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

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

index ede368f58d7732b37ffcda8e6620caf897fad8af..c5da8af6f4363d14ab92e0c4f3153d1627bd12cd 100644 (file)
@@ -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");
index fb6fc05caa76f5911c7650e5927d54a90d0da8cf..7d73899bda78c0e58f9ac9dcace4c931d7fb9f95 100644 (file)
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
-      <action context="Renderers" dev="JM" type="add">
+      <action context="Renderers" dev="JM" type="update" fixes-bug="47031" due-to="Francois Fernandes">
+        PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path
+        is empty. 
+      </action>
+      <action context="Renderers" dev="JM" type="add" fixes-bug="47000">
         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. 
       </action>