diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-30 19:27:58 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-30 19:27:58 +0000 |
commit | cfd4ebea2d5dd2190667bd7851ac77e7e1c86358 (patch) | |
tree | aed2f40e10302988afeafdef7f098727ef1fd245 /src/java/org | |
parent | 73746f66b8090d5959aa2b35734cd2828d1cc4fd (diff) | |
download | xmlgraphics-fop-cfd4ebea2d5dd2190667bd7851ac77e7e1c86358.tar.gz xmlgraphics-fop-cfd4ebea2d5dd2190667bd7851ac77e7e1c86358.zip |
Some clean-up.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@264833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFSVGHandler.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java b/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java index 545562981..16f9067e6 100644 --- a/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java @@ -264,7 +264,6 @@ public class PDFSVGHandler implements XMLHandler { */ PDFRenderer renderer = (PDFRenderer)context.getRenderer(); renderer.saveGraphicsState(); - //pdfInfo.currentStream.add("q\n"); renderer.setColor(Color.black, false, null); renderer.setColor(Color.black, true, null); // transform so that the coordinates (0,0) is from the top left @@ -274,16 +273,13 @@ public class PDFSVGHandler implements XMLHandler { + yOffset / 1000f + " cm\n"); SVGSVGElement svg = ((SVGDocument)doc).getRootElement(); - AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg, w / 1000f, h / 1000f); + //AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg, w / 1000f, h / 1000f); + AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg, + pdfInfo.width / 1000f, pdfInfo.height / 1000f); if (false && !at.isIdentity()) { double[] vals = new double[6]; at.getMatrix(vals); - pdfInfo.currentStream.add(PDFNumber.doubleOut(vals[0], 5) + " " - + PDFNumber.doubleOut(vals[1], 5) + " " - + PDFNumber.doubleOut(vals[2], 5) + " " - + PDFNumber.doubleOut(vals[3], 5) + " " - + PDFNumber.doubleOut(vals[4]) + " " - + PDFNumber.doubleOut(vals[5]) + " cm\n"); + pdfInfo.currentStream.add(CTMHelper.toPDFString(at, false) + " cm\n"); } if (pdfInfo.pdfContext == null) { @@ -309,7 +305,6 @@ public class PDFSVGHandler implements XMLHandler { + e.getMessage(), e); } - //pdfInfo.currentStream.add("Q\n"); renderer.restoreGraphicsState(); pdfInfo.pdfState.pop(); } |