pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1580326 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: rendering/PageDrawer.java util/operator/pagedrawer/BeginInlineImage.java
Date Sat, 22 Mar 2014 21:12:18 GMT
Author: jahewson
Date: Sat Mar 22 21:12:17 2014
New Revision: 1580326

URL: http://svn.apache.org/r1580326
Log:
PDFBOX-1958: pass page height when drawing inline image stencils

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/pagedrawer/BeginInlineImage.java

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=1580326&r1=1580325&r2=1580326&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 Sat Mar
22 21:12:17 2014
@@ -126,6 +126,15 @@ public class PageDrawer extends PDFStrea
     }
 
     /**
+     * Returns the page height.
+     * @return the page height
+     */
+    public int getPageHeight()
+    {
+        return pageHeight;
+    }
+
+    /**
      * This will draw the page to the requested context.
      * 
      * @param g The graphics context to draw onto.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/pagedrawer/BeginInlineImage.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/pagedrawer/BeginInlineImage.java?rev=1580326&r1=1580325&r2=1580326&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/pagedrawer/BeginInlineImage.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/pagedrawer/BeginInlineImage.java
Sat Mar 22 21:12:17 2014
@@ -50,7 +50,7 @@ public final class BeginInlineImage exte
         {
             PDColorSpace colorSpace = drawer.getGraphicsState().getNonStrokingColorSpace();
             PDColor color = drawer.getGraphicsState().getNonStrokingColor();
-            awtImage = image.getStencilImage(colorSpace.toPaint(drawer.getRenderer(), color));
// <--- TODO: pass page height?
+            awtImage = image.getStencilImage(colorSpace.toPaint(drawer.getRenderer(), color,
drawer.getPageHeight()));
         }
         else
         {



Mime
View raw message