Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / W3C-SVG-1.1 / animate-elem-46-t.svg
blob4f90f63bbde8c94c201e89dafb4c1fb2de6045aa
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- =====================================================================-->
3 <!-- animate-elem-46-t.svg -->
4 <!-- -->
5 <!-- Animation of text-anchor -->
6 <!-- -->
7 <!-- Author : Vincent Hardy. -->
8 <!-- =====================================================================--><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
11 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewer="CN" owner="VH" desc="Animation of text properties: text-anchor, font-size, font-family, font-style and font-weight" status="accepted" version="$Revision: 1.8 $" testname="$RCSfile: animate-elem-46-t.svg,v $">
12 <OperatorScript>
13 <Paragraph>
14 This test validates the operation of the animate element on the various
15 text and font properties. This test is very similar to animate-elem-77-t.svg
16 which uses the set element instead of the animate element to modify graphics
17 properties.
18 </Paragraph>
20 <Paragraph>
21 For each text or font properties, there are three tests. One animates the text or font
22 property directly on a text element which uses the
23 property. The other two tests apply the animation on a container element (g and
24 a), and validate that the animated property is inherited by children text elements.
25 </Paragraph>
27 <Paragraph>
28 For each animation test, the element on which the animation is applied is also
29 translated by an animation so that the various states of the animation can
30 be checked more easily. There is a gray reference marker which shows
31 the expected animation state at the begining of the animation, mid-way, or at the
32 end of the animation.
33 </Paragraph>
35 <Paragraph>
36 Only the animation of font-size should show a continuous change of the font size.
37 </Paragraph>
39 <Paragraph>
40 The following animations have a discrete behavior: text-anchor, font-family,
41 font-style, font-weight.
42 </Paragraph>
43 </OperatorScript>
44 </SVGTestCase>
45 <g transform="translate(80, 80)">
47 <g transform="translate(20,10)" text-anchor="end" font-size="14">
48 <text x="5" y="15">text-anchor</text>
49 <text x="5" y="50">font-size</text>
50 <text x="5" y="85">font-family</text>
51 <text x="5" y="120">font-style</text>
52 <text x="5" y="155">font-weight</text>
53 </g>
55 <g id="type" transform="translate(90, -10)" text-anchor="middle" font-size="14">
56 <text x="20" y="3">&lt;text&gt;</text>
57 <text x="135" y="3">&lt;g&gt;</text>
58 <text x="250" y="3">&lt;a&gt;</text>
59 </g>
61 <g transform="translate(80,5)" text-anchor="start" font-size="20" fill="rgb(204,0,102)">
62 <g id="animateZero">
63 <defs>
64 <g id="animateZeroRef" font-size="30" font-weight="bold">
65 <text x="0" y="20" fill="#aaa" text-anchor="end">A</text>
66 <rect x="-2" y="18" width="4" height="4" fill="#aaa"/>
67 <text x="0" y="20" fill="#aaa" text-anchor="middle" transform="translate(30,0)">A</text>
68 <rect x="-2" y="18" width="4" height="4" fill="#aaa" transform="translate(30,0)"/>
69 <text x="0" y="20" fill="#aaa" text-anchor="start" transform="translate(60,0)">A</text>
70 <rect x="-2" y="18" width="4" height="4" fill="#aaa" transform="translate(60,0)"/>
71 <rect x="-2" y="18" width="4" height="4">
72 <animateTransform attributeName="transform" type="translate" values="0;30;60" dur="3s" fill="freeze" calcMode="discrete"/>
73 </rect>
74 </g>
75 </defs>
77 <use xlink:href="#animateZeroRef"/>
78 <use xlink:href="#animateZeroRef" x="110"/>
79 <use xlink:href="#animateZeroRef" x="220"/>
81 <text id="textID_0" x="0" y="20" text-anchor="end" font-size="30" font-weight="bold">A</text>
82 <animate xlink:href="#textID_0" attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/>
83 <animateTransform xlink:href="#textID_0" attributeName="transform" type="translate" values="0;30;60" dur="3s" fill="freeze" calcMode="discrete"/>
86 <g transform="translate(110, 0)" text-anchor="end" font-size="30" font-weight="bold">
87 <animate attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/>
88 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
89 <text x="0" y="20">A</text>
90 </g>
92 <a transform="translate(220, 0)" text-anchor="end" font-size="30" font-weight="bold">
93 <animate attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/>
94 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
95 <text x="0" y="20">A</text>
96 </a>
97 </g>
99 <g id="animateOne" transform="translate(0,35)">
100 <defs>
101 <g id="animateOneRef" font-weight="bold" text-anchor="start">
102 <text x="0" y="20" fill="#aaa" font-size="30">A</text>
103 <text x="0" y="20" fill="#aaa" font-size="12" transform="translate(30,0)">A</text>
104 <text x="0" y="20" fill="#aaa" font-size="30" transform="translate(60,0)">A</text>
105 </g>
106 </defs>
108 <use xlink:href="#animateOneRef"/>
109 <use xlink:href="#animateOneRef" x="110"/>
110 <use xlink:href="#animateOneRef" x="220"/>
112 <text id="textID_1" x="0" y="20" font-size="12" font-weight="bold">A</text>
113 <animate xlink:href="#textID_1" attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/>
114 <animateTransform xlink:href="#textID_1" attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze"/>
116 <g transform="translate(110, 0)" font-size="12" font-weight="bold">
117 <animate attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/>
118 <animateTransform attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze" additive="sum"/>
119 <text x="0" y="20">A</text>
120 </g>
122 <a transform="translate(220,0)" font-size="12" font-weight="bold">
123 <animate attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/>
124 <animateTransform attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze" additive="sum"/>
125 <text x="0" y="20">A</text>
126 </a>
127 </g>
129 <g id="animateTwo" transform="translate(0,70)">
130 <defs>
131 <g id="animateTwoRef" font-weight="bold" font-size="30">
132 <text x="0" y="20" fill="#aaa" font-family="sans-serif">A </text>
133 <text x="30" y="20" fill="#aaa" font-family="serif">A</text>
134 <text x="60" y="20" font-size="30" fill="#aaa" font-family="sans-serif">A</text>
135 </g>
136 </defs>
137 <use xlink:href="#animateTwoRef"/>
138 <use xlink:href="#animateTwoRef" x="110"/>
139 <use xlink:href="#animateTwoRef" x="220"/>
141 <text id="textID_2" x="0" y="20" font-weight="bold" font-size="30">A</text>
142 <animate xlink:href="#textID_2" attributeName="font-family" values="sans-serif;serif;sans-serif" dur="3s" fill="freeze"/>
143 <animateTransform xlink:href="#textID_2" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/>
145 <g font-weight="bold" font-size="30" transform="translate(110,0)">
146 <animate attributeName="font-family" values="sans-serif;serif;sans-serif" dur="3s" fill="freeze"/>
147 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
148 <text x="0" y="20">A</text>
149 </g>
151 <a font-weight="bold" font-size="30" transform="translate(220,0)">
152 <animate attributeName="font-family" values="sans-serif;serif;sans-serif" dur="3s" fill="freeze"/>
153 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
154 <text x="0" y="20">A</text>
155 </a>
156 </g>
158 <g id="animateThree" transform="translate(0,105)">
159 <defs>
160 <g id="animateThreeRef" font-size="30" font-weight="bold">
161 <text x="0" y="20" font-size="30" fill="#aaa" font-style="normal">A</text>
162 <text x="30" y="20" font-size="30" fill="#aaa" font-style="italic">A</text>
163 <text x="60" y="20" font-size="30" fill="#aaa" font-style="normal">A</text>
164 </g>
165 </defs>
166 <use xlink:href="#animateThreeRef"/>
167 <use xlink:href="#animateThreeRef" x="110"/>
168 <use xlink:href="#animateThreeRef" x="220"/>
170 <text id="textID_3" x="0" y="20" font-size="30" font-weight="bold">A</text>
171 <animate xlink:href="#textID_3" attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/>
172 <animateTransform xlink:href="#textID_3" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/>
174 <g transform="translate(110,0)" font-size="30" font-weight="bold">
175 <animate attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/>
176 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
177 <text x="0" y="20" font-size="30">A</text>
178 </g>
180 <a transform="translate(220,0)" font-size="30" font-weight="bold">
181 <animate attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/>
182 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
183 <text x="0" y="20" font-size="30">A</text>
184 </a>
186 </g>
188 <g id="animateFour" transform="translate(0,140)">
189 <defs>
190 <g id="animateFourRef" font-size="30">
191 <text x="0" y="20" fill="#aaa" font-weight="bold">A</text>
192 <text x="30" y="20" fill="#aaa" font-weight="normal">A</text>
193 <text x="60" y="20" fill="#aaa" font-weight="bold">A</text>
194 </g>
195 </defs>
197 <use xlink:href="#animateFourRef"/>
198 <use xlink:href="#animateFourRef" x="110"/>
199 <use xlink:href="#animateFourRef" x="220"/>
201 <text id="textID_4" x="0" y="20" font-size="30">A</text>
202 <animate xlink:href="#textID_4" attributeName="font-weight" values="bold;normal;bold" dur="3s" fill="freeze"/>
203 <animateTransform xlink:href="#textID_4" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/>
205 <g transform="translate(110,0)" font-size="30">
206 <animate attributeName="font-weight" values="bold;normal;bold" dur="3s" fill="freeze"/>
207 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
208 <text x="0" y="20">A</text>
209 </g>
211 <g transform="translate(220,0)" font-size="30">
212 <animate attributeName="font-weight" values="bold;normal;bold" dur="3s" fill="freeze"/>
213 <animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/>
214 <text x="0" y="20">A</text>
215 </g>
216 </g>
217 </g>
218 </g>
219 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.8 $</text>
220 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
221 </svg>