pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1736396 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java
Date Thu, 24 Mar 2016 06:53:14 GMT
Author: tilman
Date: Thu Mar 24 06:53:14 2016
New Revision: 1736396

URL: http://svn.apache.org/viewvc?rev=1736396&view=rev
Log:
PDFBOX-3289: rename constant as suggested by Dmitry Zvorygin

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java?rev=1736396&r1=1736395&r2=1736396&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java Thu
Mar 24 06:53:14 2016
@@ -34,8 +34,11 @@ import org.apache.pdfbox.util.Matrix;
  */
 public class PDRectangle implements COSObjectable
 {
+    /** user space units per inch */
     private static final float POINTS_PER_INCH = 72;
-    private static final float MM_PER_INCH = 1 / (10 * 2.54f) * POINTS_PER_INCH;
+    
+    /** user space units per millimeter */
+    private static final float POINTS_PER_MM = 1 / (10 * 2.54f) * POINTS_PER_INCH;
 
     /** A rectangle the size of U.S. Letter, 8.5" x 11". */
     public static final PDRectangle LETTER = new PDRectangle(8.5f * POINTS_PER_INCH,
@@ -44,25 +47,25 @@ public class PDRectangle implements COSO
     public static final PDRectangle LEGAL = new PDRectangle(8.5f * POINTS_PER_INCH,
                                                             14f * POINTS_PER_INCH);
     /**  A rectangle the size of A0 Paper. */
-    public static final PDRectangle A0 = new PDRectangle(841 * MM_PER_INCH, 1189 * MM_PER_INCH);
+    public static final PDRectangle A0 = new PDRectangle(841 * POINTS_PER_MM, 1189 * POINTS_PER_MM);
 
     /** A rectangle the size of A1 Paper. */
-    public static final PDRectangle A1 = new PDRectangle(594 * MM_PER_INCH, 841 * MM_PER_INCH);
+    public static final PDRectangle A1 = new PDRectangle(594 * POINTS_PER_MM, 841 * POINTS_PER_MM);
 
     /**  A rectangle the size of A2 Paper. */
-    public static final PDRectangle A2 = new PDRectangle(420 * MM_PER_INCH, 594 * MM_PER_INCH);
+    public static final PDRectangle A2 = new PDRectangle(420 * POINTS_PER_MM, 594 * POINTS_PER_MM);
 
     /** A rectangle the size of A3 Paper.  */
-    public static final PDRectangle A3 = new PDRectangle(297 * MM_PER_INCH, 420 * MM_PER_INCH);
+    public static final PDRectangle A3 = new PDRectangle(297 * POINTS_PER_MM, 420 * POINTS_PER_MM);
 
     /**  A rectangle the size of A4 Paper. */
-    public static final PDRectangle A4 = new PDRectangle(210 * MM_PER_INCH, 297 * MM_PER_INCH);
+    public static final PDRectangle A4 = new PDRectangle(210 * POINTS_PER_MM, 297 * POINTS_PER_MM);
 
     /** A rectangle the size of A5 Paper. */
-    public static final PDRectangle A5 = new PDRectangle(148 * MM_PER_INCH, 210 * MM_PER_INCH);
+    public static final PDRectangle A5 = new PDRectangle(148 * POINTS_PER_MM, 210 * POINTS_PER_MM);
 
     /**  A rectangle the size of A6 Paper. */
-    public static final PDRectangle A6 = new PDRectangle(105 * MM_PER_INCH, 148 * MM_PER_INCH);
+    public static final PDRectangle A6 = new PDRectangle(105 * POINTS_PER_MM, 148 * POINTS_PER_MM);
 
     private final COSArray rectArray;
 



Mime
View raw message