You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2006/05/31 15:41:50 UTC

svn commit: r410523 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java

Author: jeremias
Date: Wed May 31 06:41:50 2006
New Revision: 410523

URL: http://svn.apache.org/viewvc?rev=410523&view=rev
Log:
Don't do rounding here. The caller might now want that.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java?rev=410523&r1=410522&r2=410523&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/UnitConv.java Wed May 31 06:41:50 2006
@@ -101,8 +101,8 @@
      * @param resolution the resolution in dpi (dots per inch)
      * @return the value in pixels
      */
-    public static int mm2px(double mm, int resolution) {
-        return (int)Math.round(mm2in(mm) * resolution);
+    public static double mm2px(double mm, int resolution) {
+        return mm2in(mm) * resolution;
     }
 
     /**
@@ -111,8 +111,8 @@
      * @param resolution the resolution in dpi (dots per inch)
      * @return the value in pixels
      */
-    public static int mpt2px(double mpt, int resolution) {
-        return (int)Math.round(mpt2in(mpt) * resolution);
+    public static double mpt2px(double mpt, int resolution) {
+        return mpt2in(mpt) * resolution;
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org