pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1634949 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: contentstream/PDFStreamEngine.java rendering/PageDrawer.java
Date Tue, 28 Oct 2014 19:02:36 GMT
Author: jahewson
Date: Tue Oct 28 19:02:36 2014
New Revision: 1634949

URL: http://svn.apache.org/r1634949
Log:
PDFBOX-2423: Fix text clipping

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1634949&r1=1634948&r2=1634949&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Tue Oct 28 19:02:36 2014
@@ -309,7 +309,7 @@ public class PDFStreamEngine
         {
             Area clip = new Area(new GeneralPath(bbox.toRectangle2D()));
             clip.transform(getGraphicsState().getCurrentTransformationMatrix().createAffineTransform());
-            //getGraphicsState().intersectClippingPath(clip);
+            getGraphicsState().intersectClippingPath(clip);
         }
 
         // fixme: stream matrix

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1634949&r1=1634948&r2=1634949&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Tue Oct
28 19:02:36 2014
@@ -290,6 +290,7 @@ public class PageDrawer extends PDFGraph
             {
                 graphics.setComposite(state.getNonStrokingJavaComposite());
                 graphics.setPaint(getNonStrokingPaint());
+                setClip();
                 graphics.fill(glyph);
             }
 
@@ -298,6 +299,7 @@ public class PageDrawer extends PDFGraph
                 graphics.setComposite(state.getStrokingJavaComposite());
                 graphics.setPaint(getStrokingPaint());
                 graphics.setStroke(getStroke());
+                setClip();
                 graphics.draw(glyph);
             }
 
@@ -323,6 +325,7 @@ public class PageDrawer extends PDFGraph
         {
             lastClip = null;
             processChildStream(charProc);
+            lastClip = null;
         }
         else
         {



Mime
View raw message