Debian Codegraph @

samples/tests/spec/text/textAnchor2.svg

raw
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ====================================================================== -->
24 <!-- Tests text-anchor on multiple text chunks on single tspan element -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ====================================================================== -->
29 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
30
31 <svg width="450" height="500" viewBox="0 0 450 500"
32 xmlns="http://www.w3.org/2000/svg"
33 xmlns:xlink="http://www.w3.org/1999/xlink" >
34
35 <text class="title" x="50%" y="30">text-anchor on a single &lt;tspan&gt;</text>
36
37 <g id="testContent">
38
39 <!-- ################################################################# -->
40 <!-- table -->
41 <!-- ################################################################# -->
42 <g>
43 <rect x="75" y="50" width="300" height="20" style="fill:black; stroke:black" />
44 <rect x="75" y="70" width="300" height="40" style="fill:#eee; stroke:black" />
45 <rect x="75" y="110" width="300" height="40" style="fill:white; stroke:black" />
46 <rect x="75" y="150" width="300" height="40" style="fill:#eee; stroke:black" />
47 <text x="90" y="64" style="fill:white;font-size:14">x attribute define new text chunks</text>
48 <g style="stroke:crimson; fill:none">
49 <line x1="145" y1="70" x2="145" y2="190" />
50 <line x1="185" y1="70" x2="185" y2="190" />
51 <line x1="225" y1="70" x2="225" y2="190" />
52 <line x1="265" y1="70" x2="265" y2="190" />
53 <line x1="305" y1="70" x2="305" y2="190" />
54 </g>
55 </g>
56
57 <g transform="translate(0 150)" stroke="black" >
58 <rect x="75" y="50" width="300" height="20" style="fill:black" />
59 <rect x="75" y="70" width="300" height="40" style="fill:#eee" />
60 <rect x="75" y="110" width="300" height="40" style="fill:white" />
61 <rect x="75" y="150" width="300" height="40" style="fill:#eee" />
62 <text x="90" y="64" style="fill:white;stroke:none;font-size:14"
63 >y attribute does not define new text chunk</text>
64 <g style="stroke:crimson; fill:none">
65 <line x1="225" y1="70" x2="225" y2="190" />
66 </g>
67 </g>
68
69 <g transform="translate(0 300)">
70 <rect x="75" y="50" width="300" height="20" style="fill:black; stroke:black" />
71 <rect x="75" y="70" width="300" height="40" style="fill:#eee; stroke:black" />
72 <rect x="75" y="110" width="300" height="40" style="fill:white; stroke:black" />
73 <rect x="75" y="150" width="300" height="40" style="fill:#eee; stroke:black" />
74 <text x="90" y="64" style="fill:white;font-size:14">x &amp; y attributes define new text chunks</text>
75 <g style="stroke:crimson; fill:none">
76 <line x1="145" y1="70" x2="145" y2="190" />
77 <line x1="185" y1="70" x2="185" y2="190" />
78 <line x1="225" y1="70" x2="225" y2="190" />
79 <line x1="265" y1="70" x2="265" y2="190" />
80 <line x1="305" y1="70" x2="305" y2="190" />
81 </g>
82 </g>
83
84 <!-- ################################################################# -->
85 <!-- x attribute defines new text chunks -->
86 <!-- ################################################################# -->
87
88 <text transform="translate(145 94)"><tspan x="0 40 80 120 160" style="text-anchor:start">Batik</tspan></text>
89 <text transform="translate(145 134)"><tspan x="0 40 80 120 160" style="text-anchor:middle">Batik</tspan></text>
90 <text transform="translate(145 174)"><tspan x="0 40 80 120 160" style="text-anchor:end">Batik</tspan></text>
91
92 <!-- ################################################################# -->
93 <!-- y attribute does not define new text chunk -->
94 <!-- ################################################################# -->
95 <text transform="translate(225 240)"><tspan y="0 10 0 10 0" style="text-anchor:start">Batik</tspan></text>
96 <text transform="translate(225 280)"><tspan y="0 10 0 10 0" style="text-anchor:middle">Batik</tspan></text>
97 <text transform="translate(225 320)"><tspan y="0 10 0 10 0" style="text-anchor:end">Batik</tspan></text>
98
99 <!-- ################################################################# -->
100 <!-- both x and y attributes define new text chunks -->
101 <!-- ################################################################# -->
102 <text transform="translate(145 390)"><tspan x="0 40 80 120 160" y="0 10 0 10 0" style="text-anchor:start">Batik</tspan></text>
103 <text transform="translate(145 430)"><tspan x="0 40 80 120 160" y="0 10 0 10 0" style="text-anchor:middle">Batik</tspan></text>
104 <text transform="translate(145 470)"><tspan x="0 40 80 120 160" y="0 10 0 10 0" style="text-anchor:end">Batik</tspan></text>
105
106 </g>
107
108 </svg>