Author: tilman
Date: Mon Sep 19 16:19:44 2016
New Revision: 1761476

URL: http://svn.apache.org/viewvc?rev=1761476&view=rev
Log:
PDFBOX-3482: log path

Modified:
    
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1761476&r1=1761475&r2=1761476&view=diff
==============================================================================
--- 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
 (original)
+++ 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
 Mon Sep 19 16:19:44 2016
@@ -623,7 +623,16 @@ public class PageDrawer extends PDFGraph
         }
         else
         {
+            if (LOG.isDebugEnabled())
+            {
+               // PDFBOX-3482, delete after solving
+               logPath(linePath);
+            }
             graphics.fill(linePath);
+            if (LOG.isDebugEnabled())
+            {
+                LOG.debug("fill done");
+            }
         }
         
         linePath.reset();
@@ -636,6 +645,35 @@ public class PageDrawer extends PDFGraph
         }
     }
 
+    void logPath(GeneralPath path)
+    {
+        PathIterator iter = path.getPathIterator(null);
+        while (!iter.isDone())
+        {
+            float[] coords = new float[6];
+            switch (iter.currentSegment(coords))
+            {
+                case PathIterator.SEG_MOVETO:
+                    LOG.debug(String.format("moveto  %f %f", coords[0], 
coords[1]));
+                    break;
+                case PathIterator.SEG_LINETO:
+                    LOG.debug(String.format("lineto  %f %f", coords[0], 
coords[1]));
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    LOG.debug(String.format("cubicto %f %f  %f %f", coords[0], 
coords[1], coords[2], coords[3]));
+                    break;
+                case PathIterator.SEG_QUADTO:
+                    LOG.debug(String.format("quadto  %f %f  %f %f  %f %f", 
coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]));
+                    break;
+                case PathIterator.SEG_CLOSE:
+                    LOG.debug("close");
+                    break;
+            }
+            iter.next();
+        }
+        LOG.debug("");
+    }
+
     /**
      * Returns true if the given path is rectangular.
      */


Reply via email to