diff options
author | Finn Bock <bckfnn@apache.org> | 2004-01-21 18:50:45 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2004-01-21 18:50:45 +0000 |
commit | ea5870e1ceaecd87fa9ba9699cb18562194bef4b (patch) | |
tree | 4e80c3aebb55bcfa9d1e6778a7f418ddd2e59ab8 | |
parent | 59989e5fbecdfad6c7b0389ce9d19321406fe1a4 (diff) | |
download | xmlgraphics-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
-rw-r--r-- | src/java/org/apache/fop/render/pdf/CTMHelper.java | 10 |
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); } /** |