You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Renderer.java 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.render;
  8. // FOP
  9. import org.apache.fop.apps.FOPException;
  10. import org.apache.fop.area.*;
  11. import org.apache.fop.area.inline.*;
  12. import org.apache.fop.layout.FontInfo;
  13. import org.apache.fop.fo.FOUserAgent;
  14. // Java
  15. import java.io.OutputStream;
  16. import java.io.IOException;
  17. import java.util.HashMap;
  18. /**
  19. * Interface implemented by all renderers.
  20. * This interface is used to control the rendering of pages
  21. * and to let block and inline level areas call the appropriate
  22. * method to render themselves
  23. *
  24. * a Renderer implementation takes areas/spaces and produces output in
  25. * some format.
  26. */
  27. public interface Renderer {
  28. public static final String ROLE = Renderer.class.getName();
  29. public void startRenderer(OutputStream outputStream) throws IOException;
  30. public void stopRenderer() throws IOException;
  31. /**
  32. * Set the User Agent
  33. */
  34. public void setUserAgent(FOUserAgent agent);
  35. /**
  36. * set up the given FontInfo
  37. */
  38. public void setupFontInfo(FontInfo fontInfo);
  39. /**
  40. * set up renderer options
  41. */
  42. public void setOptions(HashMap options);
  43. /**
  44. * set the producer of the rendering
  45. */
  46. public void setProducer(String producer);
  47. public boolean supportsOutOfOrder();
  48. public void preparePage(PageViewport page);
  49. public void startPageSequence(Title seqTitle);
  50. public void renderPage(PageViewport page) throws IOException, FOPException;
  51. public void renderViewport(Viewport viewport);
  52. public void renderContainer(Container cont);
  53. public void renderWord(Word area);
  54. public void renderInlineParent(InlineParent ip);
  55. public void renderCharacter(
  56. org.apache.fop.area.inline.Character ch);
  57. public void renderInlineSpace(Space space);
  58. public void renderLeader(Leader area);
  59. }