]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: scaling factor was calculated using an integer division, not a double division.
authorJeremias Maerki <jeremias@apache.org>
Wed, 27 Jul 2005 13:58:03 +0000 (13:58 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 27 Jul 2005 13:58:03 +0000 (13:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225509 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java

index 2be4ea14fbded34888d7df33447c4171413db39f..cc5dd8ca7a17a0cc0cee7f37f912040ed1119215 100644 (file)
@@ -126,8 +126,8 @@ public class ExternalGraphicLayoutManager extends LeafNodeLayoutManager {
                     / fobj.getIntrinsicWidth());
             } else {
                 // adjust the larger
-                double rat1 = cwidth / fobj.getIntrinsicWidth();
-                double rat2 = cheight / fobj.getIntrinsicHeight();
+                double rat1 = (double)cwidth / fobj.getIntrinsicWidth();
+                double rat2 = (double)cheight / fobj.getIntrinsicHeight();
                 if (rat1 < rat2) {
                     // reduce cheight
                     cheight = (int)(rat1 * fobj.getIntrinsicHeight());