aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layout/inline/LeaderArea.java
blob: ced173f3e9ebd5e733ceea19d3ea606de7d59b10 (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
/*
 * $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.layout.inline;

import org.apache.fop.render.Renderer;
import org.apache.fop.layout.*;

import java.util.Vector;
import java.util.Enumeration;

public class LeaderArea extends InlineArea {

    int ruleThickness;
    int leaderLengthOptimum;
    int leaderPattern;
    int ruleStyle;

    float red, green, blue;
    public LeaderArea(FontState fontState, float red, float green,
                      float blue, String text, int leaderLengthOptimum,
                      int leaderPattern, int ruleThickness, int ruleStyle) {
        super(fontState, leaderLengthOptimum, red, green, blue);

        this.leaderPattern = leaderPattern;
        this.leaderLengthOptimum = leaderLengthOptimum;
        this.ruleStyle = ruleStyle;
        // following the xsl spec rule: if rule-style="none" set thickness to 0;
        // actually in pdf this doesn't work, because a very thin line is still shown
        // this is handled in the pdf renderer
        if (ruleStyle == org.apache.fop.fo.properties.RuleStyle.NONE) {
            ruleThickness = 0;
        }
        this.ruleThickness = ruleThickness;
    }

    public int getRuleThickness() {
        return this.ruleThickness;
    }

    public int getRuleStyle() {
        return this.ruleStyle;
    }

    public int getLeaderPattern() {
        return this.leaderPattern;
    }

    public int getLeaderLength() {
        return this.contentRectangleWidth;
    }



}