Author: tilman
Date: Fri Feb 23 18:09:31 2018
New Revision: 1825151

URL: http://svn.apache.org/viewvc?rev=1825151&view=rev
Log:
PDFBOX-4071: remove duplicate code, remove useless parameter

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=1825151&r1=1825150&r2=1825151&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
 Fri Feb 23 18:09:31 2018
@@ -1038,10 +1038,10 @@ public class PageDrawer extends PDFGraph
     {
         
graphics.setComposite(getGraphicsState().getNonStrokingJavaComposite());
         setClip();
+        AffineTransform imageTransform = new AffineTransform(at);
         PDSoftMask softMask = getGraphicsState().getSoftMask();
         if( softMask != null )
         {
-            AffineTransform imageTransform = new AffineTransform(at);
             imageTransform.scale(1, -1);
             imageTransform.translate(0, -1);
             Paint awtPaint = new TexturePaint(image,
@@ -1060,9 +1060,8 @@ public class PageDrawer extends PDFGraph
                 image = applyTransferFunction(image, transfer);
             }
 
-            int width = image.getWidth(null);
-            int height = image.getHeight(null);
-            AffineTransform imageTransform = new AffineTransform(at);
+            int width = image.getWidth();
+            int height = image.getHeight();
             imageTransform.scale(1.0 / width, -1.0 / height);
             imageTransform.translate(0, -height);
             graphics.drawImage(image, imageTransform, null);


Reply via email to