From: Keiron Liddle Date: Sun, 11 Feb 2001 22:52:57 +0000 (+0000) Subject: fixed placement bug, now puts the image at the correct offset X-Git-Tag: fop-0_18_1~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=37d7477ddb2f84d01b8b725395bff943aaa439d6;p=xmlgraphics-fop.git 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 --- 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