Debian Codegraph @

test_non_regression/svg/text-tspan-02-b.svg

raw
1 <svg id="svg-root" width="100%" height="100%"
2 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
3 xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, European Research Consortium for =-->
7 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
8 <!--= All Rights Reserved. =-->
9 <!--= See http://www.w3.org/Consortium/Legal/. =-->
10 <!--======================================================================-->
11 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
12 template-version="1.4" reviewer="CL" author="AG" status="accepted"
13 version="$Revision: 1.11 $" testname="$RCSfile: text-tspan-02-b.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/text.html#TSpanElementRotateAttribute">
15 <p>
16 Tests the rotate attribute in the tspan element.
17 </p>
18 <ul>
19 <li>
20 Tests the case where more characters than rotate values are
21 supplied. In this case the last rotate value should propogate to
22 subsequent characters in the element and child tspan elements that
23 do not contain a rotate value.
24 </li>
25 <li>
26 Tests the case where more values than characters are supplied. In
27 this case each character should be rotated by the designated value
28 remaining unused values propogate to any child tspan elements that
29 do not contain a rotate value.
30 </li>
31 <li>
32 Tests the case where an ansestor of a tspan element specifies a
33 rotate value but the tspan itself doesn't. In this case the tspan
34 should use the current rotate value specified by the ansestor
35 element.
36 </li>
37 <li>
38 Tests the case where a tspan or text element specifies a rotate
39 value and contains a text string that is broken due to nested child
40 tspan. In this case characters after the child tspan element must
41 be rotated by the current rotate value.
42 </li>
43 </ul>
44 </d:testDescription>
45 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
46 <p>
47 Run the test. No interaction required.
48 </p>
49 </d:operatorScript>
50 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
51 <p>
52 For this test to pass the text "Not all characters in the text have a
53 specified rotation" must be displayed in green without any red showing.
54 If any red shows the test is a fail.
55 </p>
56 <p>
57 Rotation values:
58 </p>
59 <ul>
60 <li>
61 The characters in the text "Not" must be rotated by 5,15 and 25
62 degrees respectively.
63 </li>
64 <li>
65 The first 3 characters in the text "all characters" must be -10,-20
66 and -30 degrees respectively. Subsequent characters in the text must
67 be each rotated by -40 degrees.
68 </li>
69 <li>
70 All the characters in the text "text have a" must be rotated by -40
71 degrees.
72 </li>
73 <li>
74 The characters in the text "in the" must be rotated by 70,60,50,40,30
75 and 20 degrees respectively. Note: the space in the text consumes a
76 rotate value.
77 </li>
78 <li>
79 All the characters in the text "specified" must be rotated by -10
80 degrees.
81 </li>
82 <li>
83 All the characters in the text "rotation" must be rotated by 55
84 degrees.
85 </li>
86 </ul>
87 </d:passCriteria>
88 </d:SVGTestCase>
89 <title id="test-title">$RCSfile: text-tspan-02-b.svg,v $</title>
90 <defs>
91 <font-face
92 font-family="SVGFreeSansASCII"
93 unicode-range="U+0-7F">
94 <font-face-src>
95 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
96 </font-face-src>
97 </font-face>
98 </defs>
99 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
100
101 <text font-size="35" fill="red" x="20" y="120" rotate="5,15,25,35,-10,-20,-30,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,70,60,50,40,30,20,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,55,-10,-10,-10,-10,-10,-10,-10,-10,-10,55,55,55,55,55,55,55,55,55">
102 Not all characters in the
103 <tspan x="20" y="180">text have a specified rotation</tspan>
104 </text>
105
106
107 <text font-size="35" fill="green" x="20" y="120" rotate="5,15,25,35,45,55" stroke="green" stroke-width="0.5">
108 Not
109
110 <tspan id="child1" rotate="-10,-20,-30,-40">
111 all characters
112
113 <tspan id="child2" rotate="70,60,50,40,30,20,10">
114 in
115
116 <tspan id="child3">
117 the
118 </tspan>
119 </tspan>
120
121 <tspan x="20" y="180" id="child4">
122 text
123 </tspan>
124
125 have a
126 </tspan>
127
128 <tspan id="child5" rotate="-10">
129 specified
130 </tspan>
131
132 rotation
133 </text>
134
135 <text id="rotation_values" font-size="8" xml:space="preserve">
136 <tspan x="30" y="135">
137 5 15 25
138 </tspan>
139 <tspan x="80" y="130">
140 -10 -20 -30
141 </tspan>
142 <tspan x="125" y="130">
143 -40 -40 -40 -40 -40 -40 -40 -40 -40 -40
144 </tspan>
145 <tspan x="295" y="145">
146 70 60
147 </tspan>
148 <tspan x="340" y="140">
149 40 30 20
150 </tspan>
151 <tspan x="15" y="190">
152 -40 -40 -40 -40 -40 -40 -40 -40 -40
153 </tspan>
154 <tspan x="190" y="200">
155 -10 -10 -10 -10 -10 -10 -10 -10
156 </tspan>
157 <tspan x="275" y="190">
158 -10
159 </tspan>
160 <tspan x="340" y="210">
161 55 55 55 55 55 55 55 55
162 </tspan>
163 </text>
164
165 </g>
166 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
167 <text id="revision" x="10" y="340" stroke="none"
168 fill="black">$Revision: 1.11 $</text>
169 </g>
170 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
171 <!-- comment out this watermark once the test is approved --><!--
172 <g id="draft-watermark">
173 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
174 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
175 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
176 </g>-->
177 </svg>