pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1605137 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Tue, 24 Jun 2014 17:03:11 GMT
Author: tilman
Date: Tue Jun 24 17:03:11 2014
New Revision: 1605137

URL: http://svn.apache.org/r1605137
Log:
PDFBOX-2141: use shape transform rather than graphics2d transform, as suggested by Petr Slaby

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.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=1605137&r1=1605136&r2=1605137&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 Jun
24 17:03:11 2014
@@ -362,27 +362,7 @@ public class PageDrawer extends PDFStrea
             GeneralPath path = glyph2D.getPathForCharacterCode(codePoints[i]);
             if (path != null)
             {
-                AffineTransform atInverse = null;
-                if (!at.isIdentity())
-                {
-                    try
-                    {
-                        atInverse = at.createInverse();
-                    }
-                    catch (NoninvertibleTransformException exception)
-                    {
-                        LOG.error("Can't invert the given affine transformation", exception);
-                    }
-                }
-                if (atInverse != null)
-                {
-                    graphics.transform(at);
-                }
-                graphics.fill(path);
-                if (atInverse != null)
-                {
-                    graphics.transform(atInverse);
-                }
+                graphics.fill(at.createTransformedShape(path));                
             }
         }
     }



Mime
View raw message