From 37d7477ddb2f84d01b8b725395bff943aaa439d6 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Sun, 11 Feb 2001 22:52:57 +0000 Subject: [PATCH] fixed placement bug, now puts the image at the correct offset removed debug messages git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194062 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/render/pdf/PDFRenderer.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index cad27e8f3..0954856d5 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -582,10 +582,8 @@ public class PDFRenderer implements Renderer { * @param area the SVG area to render */ public void renderSVGArea(SVGArea area) { - // Buggy: Will align to the beginning of the last text - //int x = this.currentXPosition; - // Buggy: Will always left align - int x = this.currentAreaContainerXPosition; + // place at the current instream offset + int x = this.currentXPosition; // Buggy: Method getXOffset() not found in class org.apache.fop.dom.svg.SVGArea //int x = this.currentAreaContainerXPosition + area.getXOffset(); int y = this.currentYPosition; @@ -598,13 +596,6 @@ public class PDFRenderer implements Renderer { // translate and scale according to viewbox. if (svg.getViewBox () != null) { SVGRect view = svg.getViewBox().getBaseVal(); - /* - System.out.println ("viewbox=\""+ - view.getX()+" "+ - view.getY()+" "+ - view.getWidth()+" "+ - view.getHeight()+"\""); - */ // TODO take aspect constraints (attribute preserveAspectRatio) // into account. @@ -620,13 +611,6 @@ public class PDFRenderer implements Renderer { sy = -sy; } - System.out.println ("viewBox: offsets="+ - xOffset+" (x="+x+") "+ - yOffset+" (y="+y+") scale="+ - sx+" "+ - sy+" w="+w+" h="+h - ); - /* * Clip to the svg area. * Note: To have the svg overlay (under) a text area then use -- 2.39.5