diff options
author | Luis Bernardo <lbernardo@apache.org> | 2013-02-21 01:10:36 +0000 |
---|---|---|
committer | Luis Bernardo <lbernardo@apache.org> | 2013-02-21 01:10:36 +0000 |
commit | 9dadbc4897447e7f41d8dea17fc579f293b675b1 (patch) | |
tree | a5b7c282ef51f0276b08a4fb71a5191fb9e49d9f /src | |
parent | d0d7e25d98cd1509e8433782af336e93bb02f1b8 (diff) | |
download | xmlgraphics-fop-9dadbc4897447e7f41d8dea17fc579f293b675b1.tar.gz xmlgraphics-fop-9dadbc4897447e7f41d8dea17fc579f293b675b1.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java | 4 |
1 files changed, 2 insertions, 2 deletions
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; |