]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #37330:
authorJeremias Maerki <jeremias@apache.org>
Mon, 14 Nov 2005 16:02:05 +0000 (16:02 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 14 Nov 2005 16:02:05 +0000 (16:02 +0000)
Fix for clipped text when painted through the PDF text bridge. The translation was in the wrong place and therefore had an effect on the clipping region.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@344148 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/svg/PDFGraphics2D.java

index 398e36f39b86477ebc66f94ea428d8b0dc38ba13..81795984b5ff8690f2372d3d7d1bf33ccc00f776 100644 (file)
@@ -1457,16 +1457,20 @@ public class PDFGraphics2D extends AbstractGraphics2D {
         String endText = useMultiByte ? "> " : ") ";
 
         AffineTransform trans = getTransform();
-        trans.translate(x, y);
+        //trans.translate(x, y);
         double[] vals = new double[6];
         trans.getMatrix(vals);
 
         concatMatrix(vals);
         Shape imclip = getClip();
         writeClip(imclip);
+
         currentStream.write("BT\n");
 
-        currentStream.write("1 0 0 -1 0 0 Tm [" + startText);
+        //currentStream.write("1 0 0 -1 0 0 Tm [" + startText);
+        currentStream.write("1 0 0 -1 " 
+                + PDFNumber.doubleOut(x) + " " + PDFNumber.doubleOut(y) 
+                + " Tm [" + startText);
 
         int l = s.length();