File: flowTextAlign.svg

package info (click to toggle)
batik 1.7%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 29,196 kB
  • sloc: java: 194,874; xml: 16,741; sh: 163; makefile: 41
file content (189 lines) | stat: -rw-r--r-- 7,265 bytes parent folder | download | duplicates (6)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

<!--

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

-->
<!-- ====================================================================== -->
<!-- Tests various text on a path                                           -->
<!--                                                                        -->
<!-- @author bella.robinson@cmis.csiro.au                                   -->
<!-- @version $Id: flowTextAlign.svg 475685 2006-11-16 11:16:05Z cam $   -->
<!-- ====================================================================== -->

<?xml-stylesheet type="text/css" href="extension.css" ?>

<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     id="body" width="450" height="500" viewBox="0 0 450 500">

<title>Test of Text vertical-align.</title>

<g id="content" >
  <text class="title" x="50%" y="40">Test of Text vertical-align</text>

  <g font-family="serif" transform="translate(0,60)">
    <g fill="rgb(220,220,255)">
      <rect x="12.5"  y="0" width="125" height="36"/>
      <rect x="162.5" y="0" width="125" height="36"/>
      <rect x="312.5" y="0" width="125" height="36"/>
    </g>

    <flowText xmlns="http://xml.apache.org/batik/ext"
              font-size="24" xml:space="preserve">
      <flowRegion vertical-align="top">
        <rect x="12.5"  y="0" width="125" height="36"/>
      </flowRegion>
      <flowRegion vertical-align="middle">
        <rect x="162.5"  y="0" width="125" height="36"/>
      </flowRegion>
      <flowRegion vertical-align="bottom">
        <rect x="312.5"  y="0" width="125" height="36"/>
      </flowRegion>
      <flowDiv>
        <flowRegionBreak justification="middle"
          >Try top</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Try middle</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Try bottom</flowRegionBreak>
      </flowDiv>
    </flowText>
  </g>

  <g font-family="serif" transform="translate(0,120)" >
    <g fill="rgb(220,220,255)">
      <rect x="12.5"  y="0"  width="125" height="36"/>
      <rect x="12.5"  y="40" width="125" height="36"/>
      <rect x="162.5" y="0"  width="125" height="36"/>
      <rect x="162.5" y="40" width="125" height="36"/>
      <rect x="312.5" y="0"  width="125" height="36"/>
      <rect x="312.5" y="40" width="125" height="36"/>
    </g>

    <flowText xmlns="http://xml.apache.org/batik/ext"
              font-size="24" xml:space="preserve">
      <flowRegion vertical-align="top">
        <rect x="12.5"  y="0"  width="125" height="36"/>
        <rect x="12.5"  y="40" width="125" height="36"/>
      </flowRegion>
      <flowRegion vertical-align="middle">
        <rect x="162.5"  y="0"  width="125" height="36"/>
        <rect x="162.5"  y="40" width="125" height="36"/>
      </flowRegion>
      <flowRegion vertical-align="bottom">
        <rect x="312.5"  y="0"  width="125" height="36"/>
        <rect x="312.5"  y="40" width="125" height="36"/>
      </flowRegion>
      <flowDiv>
        <flowRegionBreak justification="middle"
          >Try top two lines</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Middle two lines</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Bottom two lines</flowRegionBreak>
      </flowDiv>
    </flowText>
  </g>

  <g font-family="serif" transform="translate(0,220)" >
    <g fill="rgb(220,220,255)">
      <rect x="12.5"  y="0"  width="125" height="72"/>
      <rect x="162.5" y="0"  width="125" height="72"/>
      <rect x="312.5" y="0"  width="125" height="72"/>
    </g>

    <flowText xmlns="http://xml.apache.org/batik/ext"
              font-size="24" xml:space="preserve">
      <flowRegion vertical-align="top">
        <rect x="12.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowRegion vertical-align="middle">
        <rect x="162.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowRegion vertical-align="bottom">
        <rect x="312.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowDiv>
        <flowRegionBreak justification="middle"
          >Try top two lines</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Middle two lines</flowRegionBreak>
        <flowRegionBreak justification="middle"
          >Bottom two lines</flowRegionBreak>
      </flowDiv>
    </flowText>
  </g>

  <g font-family="serif" transform="translate(0,320)" >
    <g fill="rgb(220,220,255)">
      <rect x="12.5"  y="0"  width="125" height="72"/>
      <rect x="162.5" y="0"  width="125" height="72"/>
      <rect x="312.5" y="0"  width="125" height="72"/>
    </g>

    <flowText xmlns="http://xml.apache.org/batik/ext"
              font-size="24" xml:space="preserve">
      <flowRegion vertical-align="top">
        <rect x="12.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowRegion vertical-align="middle">
        <rect x="162.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowRegion vertical-align="bottom">
        <rect x="312.5"  y="0"  width="125" height="72"/>
      </flowRegion>
      <flowDiv>
        <flowPara justification="middle"
          >Try top</flowPara>
        <flowRegionBreak justification="middle"
          >two lines</flowRegionBreak>
        <flowPara justification="middle"
          >Middle</flowPara>
        <flowRegionBreak justification="middle"
          >two lines</flowRegionBreak>
        <flowPara justification="middle"
          >Bottom</flowPara>
        <flowRegionBreak justification="middle"
          >two lines</flowRegionBreak>
      </flowDiv>
    </flowText>
  </g>
</g>

<!-- check a totally empty flow text element. -->
<g font-family="serif" transform="translate(0,405)" >
  <g fill="rgb(220,220,255)">
    <rect x="12.5"  y="0"  width="125" height="72"/>
  </g>

  <flowText xmlns="http://xml.apache.org/batik/ext"
    font-size="24" xml:space="preserve">
    <flowRegion vertical-align="top">
      <rect x="12.5"  y="0"  width="125" height="72"/>
    </flowRegion>
    <flowPara/>
  </flowText>
</g>

    <!-- ============================================================= -->
    <!-- Batik sample mark                                             -->
    <!-- ============================================================= -->
    <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
</svg>