aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/pdf/CTMHelper.java
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-01-21 18:50:45 +0000
committerFinn Bock <bckfnn@apache.org>2004-01-21 18:50:45 +0000
commitea5870e1ceaecd87fa9ba9699cb18562194bef4b (patch)
tree4e80c3aebb55bcfa9d1e6778a7f418ddd2e59ab8 /src/java/org/apache/fop/render/pdf/CTMHelper.java
parent59989e5fbecdfad6c7b0389ce9d19321406fe1a4 (diff)
downloadxmlgraphics-fop-ea5870e1ceaecd87fa9ba9699cb18562194bef4b.tar.gz
xmlgraphics-fop-ea5870e1ceaecd87fa9ba9699cb18562194bef4b.zip
Use PDFNumber.doubleOut to format the floats in a transformation matrix.
This avoids scientific notation which is not supporter by pdf. PR: 25880 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197238 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/CTMHelper.java')
-rw-r--r--src/java/org/apache/fop/render/pdf/CTMHelper.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/pdf/CTMHelper.java b/src/java/org/apache/fop/render/pdf/CTMHelper.java
index 4a3103a01..ff09cdde6 100644
--- a/src/java/org/apache/fop/render/pdf/CTMHelper.java
+++ b/src/java/org/apache/fop/render/pdf/CTMHelper.java
@@ -51,6 +51,7 @@
package org.apache.fop.render.pdf;
import org.apache.fop.area.CTM;
+import org.apache.fop.pdf.PDFNumber;
/**
* CTMHelper converts FOP transformation matrixis to those
@@ -84,9 +85,12 @@ public final class CTMHelper {
final double matrix[] = toPDFArray(sourceMatrix);
- return matrix[0] + " " + matrix[1] + " "
- + matrix[2] + " " + matrix[3] + " "
- + matrix[4] + " " + matrix[5];
+ return PDFNumber.doubleOut(matrix[0], 8) + " " +
+ PDFNumber.doubleOut(matrix[1], 8) + " " +
+ PDFNumber.doubleOut(matrix[2], 8) + " " +
+ PDFNumber.doubleOut(matrix[3], 8) + " " +
+ PDFNumber.doubleOut(matrix[4], 8) + " " +
+ PDFNumber.doubleOut(matrix[5], 8);
}
/**