From 4f78b6a919a39cdfa5635d38dc23355b99818e02 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sun, 11 May 2008 18:05:51 +0000 Subject: The spec requires rounding, not truncating git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@655349 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/properties/NumberProperty.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/java/org/apache/fop/fo/properties') diff --git a/src/java/org/apache/fop/fo/properties/NumberProperty.java b/src/java/org/apache/fop/fo/properties/NumberProperty.java index 0ba5300ae..aa4791889 100644 --- a/src/java/org/apache/fop/fo/properties/NumberProperty.java +++ b/src/java/org/apache/fop/fo/properties/NumberProperty.java @@ -91,7 +91,7 @@ public final class NumberProperty extends Property implements Numeric { } Number val = p.getNumber(); if (val != null) { - int i = val.intValue(); + int i = Math.round(val.floatValue()); if (i <= 0) { i = 1; } -- cgit v1.2.3