aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/flow/ExternalGraphic.java
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-09-12 09:19:34 +0000
committerKeiron Liddle <keiron@apache.org>2001-09-12 09:19:34 +0000
commit94497c3885d349ca35cf4756f0732f88a26d956f (patch)
treeabeb396f6e2e19498d3f85c543f624d4048c553f /src/org/apache/fop/fo/flow/ExternalGraphic.java
parent8bb6c2d578d4a4ba27cc2deae5631818bd5de5bb (diff)
downloadxmlgraphics-fop-94497c3885d349ca35cf4756f0732f88a26d956f.tar.gz
xmlgraphics-fop-94497c3885d349ca35cf4756f0732f88a26d956f.zip
gets the available space better, should prevent some infinite loops
until the layout is done properly PR: bug id 3475 Submitted by: Paul Austin <p_d_austin@yahoo.com> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194460 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/flow/ExternalGraphic.java')
-rw-r--r--src/org/apache/fop/fo/flow/ExternalGraphic.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/ExternalGraphic.java b/src/org/apache/fop/fo/flow/ExternalGraphic.java
index ff175c124..e5ce14930 100644
--- a/src/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -143,7 +143,8 @@ public class ExternalGraphic extends FObj {
double ratio = ((double)width) / ((double)height);
int areaWidth = area.getAllocationWidth() - startIndent
- endIndent;
- int pageHeight = area.getPage().getHeight();
+ int pageHeight = area.getPage().getBody().getMaxHeight()
+ - spaceBefore;
if (height > pageHeight) {
height = pageHeight;
width = (int)(ratio * ((double)height));