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.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.svg.SVGArea;
  10. import org.apache.fop.image.ImageArea;
  11. import org.apache.fop.apps.FOPException;
  12. import org.apache.fop.layout.*;
  13. import org.apache.fop.layout.inline.*;
  14. import org.apache.log.Logger;
  15. // Java
  16. import java.io.OutputStream;
  17. import java.io.IOException;
  18. /**
  19. * interface implement by all renderers.
  20. *
  21. * a Renderer implementation takes areas/spaces and produces output in
  22. * some format.
  23. */
  24. public interface Renderer {
  25. /**
  26. * Set the logger
  27. */
  28. public void setLogger(Logger logger);
  29. /**
  30. * set up the given FontInfo
  31. */
  32. public void setupFontInfo(FontInfo fontInfo);
  33. /**
  34. * set up renderer options
  35. */
  36. public void setOptions(java.util.Hashtable options);
  37. /**
  38. * set the producer of the rendering
  39. */
  40. public void setProducer(String producer);
  41. /**
  42. * render the given area tree to the given stream
  43. */
  44. //public void render(AreaTree areaTree, OutputStream stream) throws IOException, FOPException;
  45. public void render(Page page, OutputStream stream)
  46. throws IOException, FOPException;
  47. /**
  48. * render the given area container
  49. */
  50. public void renderAreaContainer(AreaContainer area);
  51. /**
  52. * render the given area container
  53. */
  54. public void renderBodyAreaContainer(BodyAreaContainer area);
  55. /**
  56. * render the given span area
  57. */
  58. public void renderSpanArea(SpanArea area);
  59. /**
  60. * render the given block area
  61. */
  62. public void renderBlockArea(BlockArea area);
  63. /**
  64. * render the given display space
  65. */
  66. public void renderDisplaySpace(DisplaySpace space);
  67. /**
  68. * render the given SVG area
  69. */
  70. public void renderSVGArea(SVGArea area);
  71. /**
  72. * render a foreign object area
  73. */
  74. public void renderForeignObjectArea(ForeignObjectArea area);
  75. /**
  76. * render the given image area
  77. */
  78. public void renderImageArea(ImageArea area);
  79. /**
  80. * render the given inline area
  81. */
  82. public void renderWordArea(WordArea area);
  83. /**
  84. * render the given inline space
  85. */
  86. public void renderInlineSpace(InlineSpace space);
  87. /**
  88. * render the given line area
  89. */
  90. public void renderLineArea(LineArea area);
  91. /**
  92. * render the given page
  93. */
  94. public void renderPage(Page page);
  95. /**
  96. * render the given leader area
  97. */
  98. public void renderLeaderArea(LeaderArea area);
  99. public void startRenderer(OutputStream outputStream)
  100. throws IOException;
  101. public void stopRenderer(OutputStream outputStream)
  102. throws IOException;
  103. }