OLD | NEW |
| (Empty) |
1 <?xml version="1.0" encoding="UTF-8"?> | |
2 <!-- =====================================================================--> | |
3 <!-- --> | |
4 <!-- text-text-05-t.svg --> | |
5 <!-- --> | |
6 <!-- Tests that the viewer can handle the rotate attribute on the text --> | |
7 <!-- element. --> | |
8 <!-- --> | |
9 <!-- Author : Vincent Hardy, 06-Jan-2004 --><!D
OCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG
/1.1/DTD/svg11-tiny.dtd"> | |
10 | |
11 <svg onload="runRepaintAndPixelTest()" xmlns="http://www.w3.org/2000/svg" xmlns:
xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" id="svg-ro
ot" width="100%" height="100%" viewBox="0 0 480 360"> | |
12 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/descrip
tion/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" owner="VH" d
esc="Tests that the viewer can handle the rotate attribute on the text e
lement" status="accepted" version="$Revision: 1.8 $" testname="$RCSfile: text-te
xt-05-t.svg,v $"> | |
13 <OperatorScript> | |
14 <Paragraph> | |
15 The purpose of this test is to validate the interaction of text-
anchor | |
16 and x/y glyph positioning. | |
17 </Paragraph> | |
18 <Paragraph> | |
19 Each row shows a different combination of x/y values: 1, more th
an characters, | |
20 fewer than characters. Each column shows different anchor values
: start, middle | |
21 and end. | |
22 </Paragraph> | |
23 <Paragraph> | |
24 The blue markers show the various x/y absolute positions around
which text | |
25 chunks should be anchored. The glyphs are black squares of incre
asing sizes. | |
26 </Paragraph> | |
27 </OperatorScript> | |
28 </SVGTestCase> | |
29 <title id="test-title">text-fontSize-01-t.svg</title> | |
30 <desc id="test-desc"/> | |
31 | |
32 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"></sc
ript> | |
33 <!--======================================================================--
> | |
34 <!--Content of Test Case follows... =====================--
> | |
35 <!--======================================================================--
> | |
36 <g id="test-body-content" font-size="16"> | |
37 <defs> | |
38 <font id="embeded" horiz-adv-x="224"> | |
39 <font-face font-family="embeded" units-per-em="1000" panose-1="0 0 0 0 0 0 0 0 0
0" ascent="917" descent="-250" alphabetic="0"/> | |
40 <missing-glyph horiz-adv-x="800" d="M50 0V800H750V0H50ZM700 50V7
50H100V50H700Z"/> | |
41 <glyph unicode="1" glyph-name="gl_1" horiz-adv-x="1500" d="M 0 0
L 250 0 L 250 250 L 0 250 Z"/> | |
42 <glyph unicode="2" glyph-name="gl_2" horiz-adv-x="1500" d="M 0 0
L 500 0 L 500 500 L 0 500 Z"/> | |
43 <glyph unicode="3" glyph-name="gl_3" horiz-adv-x="1500" d="M 0 0
L 750 0 L 750 750 L 0 750 Z"/> | |
44 <glyph unicode="4" glyph-name="gl_4" horiz-adv-x="1500" d="M 0 0
L 1000 0 L 1000 1000 L 0 1000 Z"/> | |
45 </font> | |
46 | |
47 </defs> | |
48 | |
49 <defs> | |
50 <g id="marker"> | |
51 <line y2="-15" stroke="red"/> | |
52 <rect x="-4" y="-4" width="8" height="8"/> | |
53 </g> | |
54 </defs> | |
55 | |
56 <g id="legend" transform="translate(10, 40)"> | |
57 <text y="30">1.x 1.y</text> | |
58 <text y="60">4.x 1.y</text> | |
59 <text y="90">2.x 1.y</text> | |
60 <text y="120">1.x 4.y</text> | |
61 <text y="150">4.x 4.y</text> | |
62 <text y="180">2.x 4.y</text> | |
63 <text y="210">1.x 2.y</text> | |
64 <text y="240">4.x 2.y</text> | |
65 <text y="270">2.x 2.y</text> | |
66 </g> | |
67 | |
68 <g id="anchorStart" text-anchor="start" transform="translate(150
, 40)"> | |
69 <text y="-17" text-anchor="middle">text-anchor</text> | |
70 <text y="-3" text-anchor="middle">start</text> | |
71 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/> | |
72 | |
73 <g id="textContent"> | |
74 <!-- 1.x 1.y --> | |
75 <use y="30" xlink:href="#marker" fill="#8888ff"/> | |
76 <text x="0" y="30" font-family="embeded" font-size="10">
1234</text> | |
77 | |
78 <!-- 4.x 1.y : four text chunks --> | |
79 <use x="10" y="60" xlink:href="#marker" fill="#8888ff"/> | |
80 <use x="20" y="60" xlink:href="#marker" fill="#8888ff"/> | |
81 <use x="30" y="60" xlink:href="#marker" fill="#8888ff"/> | |
82 <use x="40" y="60" xlink:href="#marker" fill="#8888ff"/> | |
83 <text x="10 20 30 40" y="60" font-family="embeded" font-
size="10">1234</text> | |
84 | |
85 <!-- 2.x 1.y : two text chunks --> | |
86 <use x="10" y="90" xlink:href="#marker" fill="#8888ff"/> | |
87 <use x="60" y="90" xlink:href="#marker" fill="#8888ff"/> | |
88 <text x="10 60" y="90" font-family="embeded" font-size="
10">1234</text> | |
89 | |
90 <!-- 1.x 4.y : four text chunks --> | |
91 <g transform="translate(0, 120)"> | |
92 <use x="0" y="-10" xlink:href="#marker" fill="#8888f
f"/> | |
93 <use x="15" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
94 <use x="30" y="5" xlink:href="#marker" fill="#8888ff
"/> | |
95 <use x="45" y="10" xlink:href="#marker" fill="#8888f
f"/> | |
96 <text x="0" y="-10 -5 5 10" font-family="embeded" fo
nt-size="10">1234</text> | |
97 </g> | |
98 | |
99 <!-- 4.x 4.y : four text chunks --> | |
100 <g transform="translate(0, 150)"> | |
101 <use x="10" y="-10" xlink:href="#marker" fill="#8888
ff"/> | |
102 <use x="20" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
103 <use x="30" y="5" xlink:href="#marker" fill="#8888ff
"/> | |
104 <use x="40" y="10" xlink:href="#marker" fill="#8888f
f"/> | |
105 <text x="10 20 30 40" y="-10 -5 5 10" font-family="e
mbeded" font-size="10">1234</text> | |
106 </g> | |
107 | |
108 <!-- 2.x 4.y : four text chunks --> | |
109 <g transform="translate(0, 180)"> | |
110 <use x="10" y="-10" xlink:href="#marker" fill="#8888
ff"/> | |
111 <use x="20" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
112 <use x="35" y="5" xlink:href="#marker" fill="#8888ff
"/> | |
113 <use x="50" y="10" xlink:href="#marker" fill="#8888f
f"/> | |
114 <text x="10 20" y="-10 -5 5 10" font-family="embeded
" font-size="10">1234</text> | |
115 </g> | |
116 | |
117 <!-- 1.x 2.y : two text chunks --> | |
118 <g transform="translate(0, 210)"> | |
119 <use x="0" y="-10" xlink:href="#marker" fill="#8888f
f"/> | |
120 <use x="15" y="5" xlink:href="#marker" fill="#8888ff
"/> | |
121 <text x="0" y="-10 5" font-family="embeded" font-siz
e="10">1234</text> | |
122 </g> | |
123 | |
124 <!-- 4.x 2.y : four text chunks --> | |
125 <g transform="translate(0, 240)"> | |
126 <use x="10" y="-10" xlink:href="#marker" fill="#8888
ff"/> | |
127 <use x="20" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
128 <use x="30" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
129 <use x="40" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
130 <text x="10 20 30 40" y="-10 -5" font-family="embede
d" font-size="10">1234</text> | |
131 </g> | |
132 | |
133 <!-- 2.x 2.y : two text chunks --> | |
134 <g transform="translate(0, 270)"> | |
135 <use x="10" y="-10" xlink:href="#marker" fill="#8888
ff"/> | |
136 <use x="60" y="-5" xlink:href="#marker" fill="#8888f
f"/> | |
137 <text x="10 60" y="-10 -5" font-family="embeded" fon
t-size="10">1234</text> | |
138 </g> | |
139 | |
140 </g> | |
141 </g> | |
142 | |
143 <g id="anchorMiddle" text-anchor="middle" transform="translate(2
50, 40)"> | |
144 <text y="-17" text-anchor="middle">text-anchor</text> | |
145 <text y="-3" text-anchor="middle">middle</text> | |
146 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/> | |
147 <use xlink:href="#textContent"/> | |
148 </g> | |
149 | |
150 <g id="anchorEnd" text-anchor="end" transform="translate(350, 40
)"> | |
151 <text y="-17" text-anchor="middle">text-anchor</text> | |
152 <text y="-3" text-anchor="middle">end</text> | |
153 <line x1="0" y1="10" x2="0" y2="290" stroke="red"/> | |
154 <use xlink:href="#textContent"/> | |
155 </g> | |
156 | |
157 </g> | |
158 | |
159 <text id="revision" x="10" y="350" font-size="40" stroke="none" fill="black"
>$Revision: 1.8 $</text> | |
160 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" strok
e="#000000"/> | |
161 | |
162 <script> | |
163 if (window.testRunner) | |
164 testRunner.dumpSelectionRect(); | |
165 | |
166 function repaintTest() { | |
167 document.execCommand("SelectAll"); | |
168 } | |
169 </script> | |
170 </svg> | |
OLD | NEW |