You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2004/01/21 19:50:45 UTC
cvs commit: xml-fop/src/java/org/apache/fop/render/pdf CTMHelper.java
bckfnn 2004/01/21 10:50:45
Modified: src/java/org/apache/fop/render/pdf CTMHelper.java
Log:
Use PDFNumber.doubleOut to format the floats in a transformation matrix.
This avoids scientific notation which is not supporter by pdf.
PR: 25880
Revision Changes Path
1.2 +7 -3 xml-fop/src/java/org/apache/fop/render/pdf/CTMHelper.java
Index: CTMHelper.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/CTMHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CTMHelper.java 11 Mar 2003 13:05:13 -0000 1.1
+++ CTMHelper.java 21 Jan 2004 18:50:45 -0000 1.2
@@ -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 @@
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);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org