aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/render/Renderer.java
blob: fe4af30f6700856d159aeb9eac64368bf56064d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * $Id$
 * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources.
 */
package org.apache.fop.render;

// FOP
import org.apache.fop.image.ImageArea;
import org.apache.fop.apps.FOPException;
import org.apache.fop.area.*;
import org.apache.fop.area.inline.*;
import org.apache.fop.layout.FontInfo;
import org.apache.fop.fo.FOUserAgent;

import org.apache.log.Logger;

// Java
import java.io.OutputStream;
import java.io.IOException;
import java.util.HashMap;

/**
 * Interface implemented by all renderers.
 * This interface is used to control the rendering of pages
 * and to let block and inline level areas call the appropriate
 * method to render themselves
 *
 * a Renderer implementation takes areas/spaces and produces output in
 * some format.
 */
public interface Renderer {

    public void startRenderer(OutputStream outputStream) throws IOException;

    public void stopRenderer() throws IOException;

    /**
     * Set the logger
     */
    public void setLogger(Logger logger);

    /**
     * Set the User Agent
     */
    public void setUserAgent(FOUserAgent agent);

    /**
     * set up the given FontInfo
     */
    public void setupFontInfo(FontInfo fontInfo);

    /**
     * set up renderer options
     */
    public void setOptions(HashMap options);

    /**
     * set the producer of the rendering
     */
    public void setProducer(String producer);

    public void startPageSequence(Title seqTitle);

    public void renderPage(PageViewport page) throws IOException, FOPException;

    public void renderViewport(Viewport viewport);

    public void renderContainer(Container cont);

    public void renderWord(Word area);

    public void renderCharacter(
              org.apache.fop.area.inline.Character ch);

    public void renderInlineSpace(Space space);

    public void renderLeader(Leader area);
}