Author: jahewson Date: Thu Nov 5 19:51:46 2015 New Revision: 1712857 URL: http://svn.apache.org/viewvc?rev=1712857&view=rev Log: PDFBOX-3081: simplify code
Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java?rev=1712857&r1=1712856&r2=1712857&view=diff ============================================================================== --- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java (original) +++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java Thu Nov 5 19:51:46 2015 @@ -160,8 +160,7 @@ public class DrawPrintTextLocations exte // advance width, bbox height (glyph space) float xadvance = font.getWidth(text.getCharacterCodes()[0]); // todo: should iterate all chars - rect = new Rectangle2D.Float(0, bbox.getLowerLeftY(), xadvance, - bbox.getUpperRightY() - bbox.getLowerLeftY()); + rect = new Rectangle2D.Float(0, bbox.getLowerLeftY(), xadvance, bbox.getHeight()); // glyph space -> user space // note: text.getTextMatrix() is *not* the Text Matrix, it's the Text Rendering Matrix