From 9dadbc4897447e7f41d8dea17fc579f293b675b1 Mon Sep 17 00:00:00 2001 From: Luis Bernardo Date: Thu, 21 Feb 2013 01:10:36 +0000 Subject: FOP-2181: Add a test case for the recent fix made in FOP-2174 and XGC-76 regarding source resolution scaling with SVG and images; patch submitted by Robert Meyer git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1448484 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java b/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java index 530ad024c..627fd29df 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java +++ b/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java @@ -160,8 +160,8 @@ public class ImageLayout implements Constants { } boolean foundNonAuto = (lenWidth.getEnum() != EN_AUTO || lenHeight.getEnum() != EN_AUTO); if (!foundNonAuto) { - cwidth = intrinsicSize.width / (sourceResolution / UnitConv.IN2PT); - cheight = intrinsicSize.height / (sourceResolution / UnitConv.IN2PT); + cwidth = (int)(intrinsicSize.width / ((float)sourceResolution / (float)UnitConv.IN2PT)); + cheight = (int)(intrinsicSize.height / ((float)sourceResolution / (float)UnitConv.IN2PT)); } Dimension constrainedIntrinsicSize; -- cgit v1.2.3