From abad44d3f1c52a92739a05fd347707d71fe9c1eb Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 14 Nov 2005 16:02:05 +0000 Subject: [PATCH] Bugzilla #37330: 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index 398e36f39..81795984b 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -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(); -- 2.39.5