vmote 2003/08/18 23:54:31 Modified: src/java/org/apache/fop/extensions Bookmarks.java src/java/org/apache/fop/fo FOInputHandler.java FOTreeControl.java FOTreeHandler.java src/java/org/apache/fop/fo/flow Leader.java PageNumber.java PageNumberCitation.java src/java/org/apache/fop/render AbstractRenderer.java PrintRenderer.java Renderer.java src/java/org/apache/fop/render/awt AWTRenderer.java src/java/org/apache/fop/render/pdf FontSetup.java PDFRenderer.java src/java/org/apache/fop/render/ps PSRenderer.java src/java/org/apache/fop/render/svg SVGRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Log: more FO Tree isolation work Revision Changes Path 1.8 +4 -1 xml-fop/src/java/org/apache/fop/extensions/Bookmarks.java Index: Bookmarks.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/extensions/Bookmarks.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Bookmarks.java 19 Aug 2003 00:53:52 -0000 1.7 +++ Bookmarks.java 19 Aug 2003 06:54:31 -0000 1.8 @@ -54,6 +54,7 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.area.AreaTree; +import org.apache.fop.control.Document; import java.util.ArrayList; @@ -110,7 +111,9 @@ } // add data to area tree for resolving and handling if (foInputHandler instanceof FOTreeHandler) { - AreaTree at = ((FOTreeHandler)foInputHandler).doc.getDriver().getAreaTree(); + FOTreeHandler foth = (FOTreeHandler)foInputHandler; + Document doc = (Document)foth.foTreeControl; + AreaTree at = doc.getDriver().getAreaTree(); at.addTreeExtension(data); data.setAreaTree(at); } 1.6 +6 -6 xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java Index: FOInputHandler.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- FOInputHandler.java 15 Aug 2003 15:52:10 -0000 1.5 +++ FOInputHandler.java 19 Aug 2003 06:54:31 -0000 1.6 @@ -72,7 +72,7 @@ import org.apache.fop.fo.flow.TableRow; import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.PageSequence; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.xml.sax.SAXException; @@ -96,13 +96,13 @@ // public Driver driver = null; - public Document doc = null; + public FOTreeControl foTreeControl = null; /** * Main constructor */ - public FOInputHandler(Document document) { - this.doc = document; + public FOInputHandler(FOTreeControl foTreeControl) { + this.foTreeControl = foTreeControl; } /** @@ -117,7 +117,7 @@ * Returns the FontInfo object associated with this FOInputHandler. * @return the FontInof object */ - public Document getFontInfo() { + public FOTreeControl getFontInfo() { return null; } 1.2 +9 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java Index: FOTreeControl.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FOTreeControl.java 19 Aug 2003 05:19:21 -0000 1.1 +++ FOTreeControl.java 19 Aug 2003 06:54:31 -0000 1.2 @@ -51,6 +51,10 @@ package org.apache.fop.fo; +// Java +import java.util.Map; + +// FOP import org.apache.fop.fonts.FontMetrics; /** @@ -68,5 +72,9 @@ int weight); public FontMetrics getMetricsFor(String fontName); + + public boolean isSetupValid(); + + public Map getFonts(); } 1.6 +10 -13 xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java Index: FOTreeHandler.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- FOTreeHandler.java 15 Aug 2003 15:52:10 -0000 1.5 +++ FOTreeHandler.java 19 Aug 2003 06:54:31 -0000 1.6 @@ -53,7 +53,6 @@ // Java import java.io.IOException; import java.io.OutputStream; -import java.util.List; import java.util.HashSet; import java.util.Iterator; @@ -61,10 +60,7 @@ import org.xml.sax.SAXException; // FOP -import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; -import org.apache.fop.area.StorePagesModel; -import org.apache.fop.area.TreeExt; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.InstreamForeignObject; @@ -77,7 +73,6 @@ import org.apache.fop.fo.flow.TableRow; import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.PageSequence; -import org.apache.fop.control.Document; import org.apache.fop.render.Renderer; /** @@ -135,14 +130,16 @@ /** * Main constructor + * @param foTreeControl the FOTreeControl implementation that governs this + * FO Tree * @param outputStream the stream that the result is rendered to * @param renderer the renderer to call * @param store if true then use the store pages model and keep the * area tree in memory */ - public FOTreeHandler(Document document, OutputStream outputStream, Renderer renderer, - boolean store) { - super(document); + public FOTreeHandler(FOTreeControl foTreeControl, OutputStream outputStream, + Renderer renderer, boolean store) { + super(foTreeControl); if (collectStatistics) { runtime = Runtime.getRuntime(); } @@ -169,9 +166,9 @@ startTime = System.currentTimeMillis(); } try { - renderer.setupFontInfo(doc); + renderer.setupFontInfo(foTreeControl); // check that the "any,normal,400" font exists - if (!doc.isSetupValid()) { + if (!foTreeControl.isSetupValid()) { throw new SAXException(new FOPException( "No default font defined by OutputConverter")); } @@ -472,8 +469,8 @@ * * @return the font information */ - public Document getFontInfo() { - return this.doc; + public FOTreeControl getFontInfo() { + return foTreeControl; } /** 1.9 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/Leader.java Index: Leader.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Leader.java 19 Aug 2003 00:53:53 -0000 1.8 +++ Leader.java 19 Aug 2003 06:54:31 -0000 1.9 @@ -71,7 +71,7 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; @@ -95,7 +95,7 @@ private int leaderPattern; private int patternWidth; /** FontInfo for this object */ - protected Document fontInfo = null; + protected FOTreeControl fontInfo = null; /** FontState for this object */ protected Font fontState; public InlineArea leaderArea = null; 1.10 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PageNumber.java 19 Aug 2003 00:53:53 -0000 1.9 +++ PageNumber.java 19 Aug 2003 06:54:31 -0000 1.10 @@ -59,7 +59,7 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; @@ -83,7 +83,7 @@ */ public class PageNumber extends FObj { /** FontInfo for this object */ - protected Document fontInfo = null; + protected FOTreeControl fontInfo = null; /** FontState for this object */ protected Font fontState; 1.10 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Index: PageNumberCitation.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PageNumberCitation.java 19 Aug 2003 00:53:53 -0000 1.9 +++ PageNumberCitation.java 19 Aug 2003 06:54:31 -0000 1.10 @@ -69,7 +69,7 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; @@ -90,7 +90,7 @@ */ public class PageNumberCitation extends FObj { /** FontInfo for this object **/ - protected Document fontInfo = null; + protected FOTreeControl fontInfo = null; /** Fontstate for this object **/ protected Font fontState; 1.6 +2 -2 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AbstractRenderer.java 14 Aug 2003 07:42:58 -0000 1.5 +++ AbstractRenderer.java 19 Aug 2003 06:54:31 -0000 1.6 @@ -88,7 +88,7 @@ import org.apache.fop.area.inline.Word; import org.apache.fop.area.inline.Character; import org.apache.fop.fo.FOUserAgent; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; // Avalon import org.apache.avalon.framework.logger.AbstractLogEnabled; @@ -168,7 +168,7 @@ } /** @see org.apache.fop.render.Renderer */ - public abstract void setupFontInfo(Document fontInfo); + public abstract void setupFontInfo(FOTreeControl foTreeControl); /** @see org.apache.fop.render.Renderer */ public void setUserAgent(FOUserAgent agent) { 1.4 +15 -14 xml-fop/src/java/org/apache/fop/render/PrintRenderer.java Index: PrintRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/PrintRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PrintRenderer.java 14 Aug 2003 07:42:58 -0000 1.3 +++ PrintRenderer.java 19 Aug 2003 06:54:31 -0000 1.4 @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * [EMAIL PROTECTED] - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,17 +42,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber <[EMAIL PROTECTED]>. For more information on the Apache * Software Foundation, please see <http://www.apache.org/>. - */ + */ package org.apache.fop.render; // FOP import org.apache.fop.render.pdf.FontSetup; import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; // Java import java.util.List; @@ -61,7 +62,7 @@ public abstract class PrintRenderer extends AbstractRenderer { /** Font configuration */ - protected Document fontInfo; + protected FOTreeControl fontInfo; /** list of fonts */ protected List fontList = null; @@ -71,9 +72,9 @@ * * @param fontInfo font info to set up */ - public void setupFontInfo(Document fontInfo) { - this.fontInfo = fontInfo; - FontSetup.setup(fontInfo, fontList); + public void setupFontInfo(FOTreeControl foTreeControl) { + this.fontInfo = foTreeControl; + FontSetup.setup((Document)fontInfo, fontList); } } 1.3 +12 -12 xml-fop/src/java/org/apache/fop/render/Renderer.java Index: Renderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/Renderer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Renderer.java 14 Aug 2003 07:42:58 -0000 1.2 +++ Renderer.java 19 Aug 2003 06:54:31 -0000 1.3 @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * [EMAIL PROTECTED] - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber <[EMAIL PROTECTED]>. For more information on the Apache * Software Foundation, please see <http://www.apache.org/>. - */ + */ package org.apache.fop.render; // Java @@ -66,7 +66,7 @@ import org.apache.fop.area.inline.Space; import org.apache.fop.area.inline.Viewport; import org.apache.fop.area.inline.Word; -import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fo.FOUserAgent; /** @@ -123,7 +123,7 @@ * * @param fontInfo The fonts */ - void setupFontInfo(Document fontInfo); + void setupFontInfo(FOTreeControl foTreeControl); /** * Set up renderer options. 1.6 +19 -18 xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java Index: AWTRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AWTRenderer.java 14 Aug 2003 07:42:58 -0000 1.5 +++ AWTRenderer.java 19 Aug 2003 06:54:31 -0000 1.6 @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * [EMAIL PROTECTED] - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber <[EMAIL PROTECTED]>. For more information on the Apache * Software Foundation, please see <http://www.apache.org/>. - */ + */ package org.apache.fop.render.awt; /* @@ -78,6 +78,7 @@ // FOP import org.apache.fop.apps.InputHandler; import org.apache.fop.control.Document; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.render.AbstractRenderer; import org.apache.fop.viewer.PreviewDialog; import org.apache.fop.viewer.Translator; @@ -94,12 +95,12 @@ protected List pageList = new java.util.Vector(); //protected ProgressListener progressListener = null; - /** - The InputHandler associated with this Renderer. + /** + The InputHandler associated with this Renderer. Sent to the PreviewDialog for document reloading. */ protected InputHandler inputHandler; - + /** * The resource bundle used for AWT messages. */ @@ -139,7 +140,7 @@ * valid font measures. */ protected PreviewDialog frame; - + public AWTRenderer(InputHandler handler) { inputHandler = handler; translator = new Translator(); @@ -159,11 +160,11 @@ return 0; } - public void setupFontInfo(Document fontInfo) { + public void setupFontInfo(FOTreeControl foTreeControl) { // create a temp Image to test font metrics on BufferedImage fontImage = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); - FontSetup.setup(fontInfo, fontImage.createGraphics()); + FontSetup.setup((Document)foTreeControl, fontImage.createGraphics()); } public int getPageNumber() { @@ -212,7 +213,7 @@ public int print(Graphics g, PageFormat format, int pos) { return 0; } - + private PreviewDialog createPreviewDialog(InputHandler handler) { frame = new PreviewDialog(this, handler); frame.addWindowListener(new WindowAdapter() { @@ -233,7 +234,7 @@ frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); frame.setVisible(true); - frame.setStatus(translator.getString("Status.Build.FO.tree")); + frame.setStatus(translator.getString("Status.Build.FO.tree")); return frame; } } 1.8 +2 -1 xml-fop/src/java/org/apache/fop/render/pdf/FontSetup.java Index: FontSetup.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/FontSetup.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FontSetup.java 14 Aug 2003 19:16:41 -0000 1.7 +++ FontSetup.java 19 Aug 2003 06:54:31 -0000 1.8 @@ -249,7 +249,8 @@ * @param resources PDFResources object to attach the font to * @param fontInfo font info object to get font information from */ - public static void addToResources(PDFDocument doc, PDFResources resources, Document fontInfo) { + public static void addToResources(PDFDocument doc, PDFResources resources, + Document fontInfo) { Map fonts = fontInfo.getUsedFonts(); Iterator e = fonts.keySet().iterator(); while (e.hasNext()) { 1.9 +2 -1 xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PDFRenderer.java 14 Aug 2003 15:31:10 -0000 1.8 +++ PDFRenderer.java 19 Aug 2003 06:54:31 -0000 1.9 @@ -282,7 +282,8 @@ * @see org.apache.fop.render.Renderer#stopRenderer() */ public void stopRenderer() throws IOException { - FontSetup.addToResources(pdfDoc, pdfDoc.getResources(), fontInfo); + FontSetup.addToResources(pdfDoc, pdfDoc.getResources(), + (org.apache.fop.control.Document)fontInfo); pdfDoc.outputTrailer(ostream); this.pdfDoc = null; 1.9 +3 -2 xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java Index: PSRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PSRenderer.java 14 Aug 2003 14:59:56 -0000 1.8 +++ PSRenderer.java 19 Aug 2003 06:54:31 -0000 1.9 @@ -76,6 +76,7 @@ import org.apache.fop.control.Document; import org.apache.fop.render.AbstractRenderer; import org.apache.fop.render.RendererContext; +import org.apache.fop.fo.FOTreeControl; import org.apache.fop.image.FopImage; import org.apache.fop.image.ImageFactory; @@ -260,9 +261,9 @@ * * @param fontInfo the font info object to set up */ - public void setupFontInfo(Document fontInfo) { + public void setupFontInfo(FOTreeControl foTreeControl) { /* use PDF's font setup to get PDF metrics */ - org.apache.fop.render.pdf.FontSetup.setup(fontInfo, null); + org.apache.fop.render.pdf.FontSetup.setup((Document)foTreeControl, null); this.fontInfo = fontInfo; } 1.4 +3 -2 xml-fop/src/java/org/apache/fop/render/svg/SVGRenderer.java Index: SVGRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/svg/SVGRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SVGRenderer.java 14 Aug 2003 07:42:58 -0000 1.3 +++ SVGRenderer.java 19 Aug 2003 06:54:31 -0000 1.4 @@ -60,6 +60,7 @@ import org.apache.fop.control.Document; import org.apache.fop.fo.FOUserAgent; import org.apache.fop.fo.properties.RuleStyle; +import org.apache.fop.fo.FOTreeControl; import org.w3c.dom.Node; import org.w3c.dom.svg.SVGSVGElement; @@ -167,11 +168,11 @@ /** * @see org.apache.fop.render.Renderer#setupFontInfo(FontInfo) */ - public void setupFontInfo(Document fontInfo) { + public void setupFontInfo(FOTreeControl foTreeControl) { // create a temp Image to test font metrics on BufferedImage fontImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); - org.apache.fop.render.awt.FontSetup.setup(fontInfo, + org.apache.fop.render.awt.FontSetup.setup((Document)foTreeControl, fontImage.createGraphics()); } 1.4 +3 -2 xml-fop/src/java/org/apache/fop/render/xml/XMLRenderer.java Index: XMLRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/xml/XMLRenderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XMLRenderer.java 14 Aug 2003 07:42:58 -0000 1.3 +++ XMLRenderer.java 19 Aug 2003 06:54:31 -0000 1.4 @@ -93,6 +93,7 @@ import org.apache.fop.area.inline.Viewport; import org.apache.fop.area.inline.Word; import org.apache.fop.fo.properties.RuleStyle; +import org.apache.fop.fo.FOTreeControl; /** * Renderer that renders areas to XML for debugging purposes. @@ -208,10 +209,10 @@ * * @param fontInfo the font info object to set up */ - public void setupFontInfo(Document fontInfo) { + public void setupFontInfo(FOTreeControl foTreeControl) { /* use PDF's font setup to get PDF metrics */ - org.apache.fop.render.pdf.FontSetup.setup(fontInfo, null); + org.apache.fop.render.pdf.FontSetup.setup((Document)foTreeControl, null); } private boolean isCoarseXml() {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]