| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 3 |
|
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, Institut National de Recherche en =--> |
| 7 |
<!--= Informatique et en Automatique, Keio University). All Rights =--> |
| 8 |
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> |
| 9 |
<!--======================================================================--> |
| 10 |
<!-- ===================================================================== --> |
| 11 |
<!-- --> |
| 12 |
<!-- --> |
| 13 |
<!-- text-tref-BE-04.svg --> |
| 14 |
<!-- renamed for 1.1 suite to text-tref-01-f.svg --> |
| 15 |
<!-- --> |
| 16 |
<!-- Test basic capability to handle 'tref' element and attributes. --> |
| 17 |
<!-- --> |
| 18 |
<!-- --> |
| 19 |
<!-- Author : Lofton Henderson, 20-Mar-2000. --> |
| 20 |
<!-- 1.1 revision by Vincent Hardy --> |
| 21 |
<!-- --> |
| 22 |
<!-- History: --> |
| 23 |
<!-- 20-Mar-2000, LH: Serial#1 created. --> |
| 24 |
<!-- 24-Apr-2000, LH=" fix bugs in 3rd and 4th tests" serial#2. --> |
| 25 |
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> |
| 26 |
<!-- 24-Oct-2000, LH=" rmv external reference, per f2f" ser#3 --> |
| 27 |
<!-- ===================================================================== --> |
| 28 |
<!--======================================================================--> |
| 29 |
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> |
| 30 |
<!--= log messages, and therefore is no longer in the preceding preamble.=--> |
| 31 |
<!--======================================================================--> |
| 32 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360"> |
| 33 |
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"> |
| 34 |
<OperatorScript> |
| 35 |
<Paragraph> |
| 36 |
Test for viewer capability to handle the basics of the 'tref' element |
| 37 |
and its attributes. Basic referencing is tested, as well as |
| 38 |
the equivalence of 'tref' to 'tspan' in attributes handling. |
| 39 |
There are five sub-tests. |
| 40 |
</Paragraph> |
| 41 |
<Paragraph> |
| 42 |
The first box down from the top should contain green "Simple internal referenced text.", |
| 43 |
which is obtained by a 'tref' element reference to a 'text' element in a 'defs' |
| 44 |
section of this test file. |
| 45 |
</Paragraph> |
| 46 |
<Paragraph> |
| 47 |
The second box from the top tests changing of visual properties |
| 48 |
of 'tref' substrings. It should contain |
| 49 |
the string "Change color within string.", blue except for the single |
| 50 |
word "color" in red. Three 'tref' elements within the |
| 51 |
'text' element each point to a substring in the 'defs' section of |
| 52 |
this test file -- the second 'tref' sets fill color to red and the |
| 53 |
others set fill color to blue. |
| 54 |
</Paragraph> |
| 55 |
<Paragraph> |
| 56 |
The third box from the top tests an x-coordinate list in a 'tref', |
| 57 |
which individually places each character of the string "Char-by-char." |
| 58 |
The string is in a single 'text' element in the 'defs' section. |
| 59 |
</Paragraph> |
| 60 |
<Paragraph> |
| 61 |
The fourth box from the top tests that the x,y attributes of 'tref' behave |
| 62 |
like those of 'tspan'. The string |
| 63 |
"Bouncing up and down." is formed by four 'tref' elements pointing to 'text' |
| 64 |
elements in the 'defs' section, and each 'tref' is individually |
| 65 |
positioned by the x,y attributes. |
| 66 |
</Paragraph> |
| 67 |
<Paragraph> |
| 68 |
The final sub-test actually involves the single-line test description at the very |
| 69 |
top. It is written initially in blue, and then at the end is over-written in |
| 70 |
black by a 'tref' pointing to the 'desc' element of the test. |
| 71 |
</Paragraph> |
| 72 |
<Paragraph> |
| 73 |
The rendered picture should match the reference image, except that some color |
| 74 |
"fuzziness" in the top line may result from anti-aliasing. |
| 75 |
Also, variations are possible in the text fonts and layout (per CSS2 rules). |
| 76 |
</Paragraph> |
| 77 |
<Paragraph> |
| 78 |
The test also uses the 'rect' element, |
| 79 |
as well as basic fill (solid primary colors), |
| 80 |
stroke (black 1-pixel lines), font-family (Helvetica) |
| 81 |
and font-size properties. |
| 82 |
</Paragraph> |
| 83 |
</OperatorScript> |
| 84 |
</SVGTestCase> |
| 85 |
|
| 86 |
<title id="test-title">text-tref-01-f</title> |
| 87 |
<desc id="test-desc">Basic test of 'tref' element and its attributes.</desc> |
| 88 |
<!--======================================================================--> |
| 89 |
<!--Content of Test Case follows... =====================--> |
| 90 |
<!--======================================================================--> |
| 91 |
<g id="test-body-content"> |
| 92 |
<defs> |
| 93 |
<text id="tref-internal-reference">Simple internal referenced text.</text> |
| 94 |
<text id="tref-property-change-1">Change</text> |
| 95 |
<text id="tref-property-change-2">color</text> |
| 96 |
<text id="tref-property-change-3">within string.</text> |
| 97 |
<text id="tref-position-change-1">Bouncing</text> |
| 98 |
<text id="tref-position-change-2">up</text> |
| 99 |
<text id="tref-position-change-3">and</text> |
| 100 |
<text id="tref-position-change-4">down.</text> |
| 101 |
<text id="tref-coord-list">Char-by-char.</text> |
| 102 |
</defs> |
| 103 |
<!-- Test case label: this should be overwritten in black by final test. --> |
| 104 |
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="blue" >Basic test of 'tref' element and its attributes.</text> |
| 105 |
<!-- First sub-test, internal tref reference, within this file --> |
| 106 |
<text x="185" y="70" font-size="16" font-family="Helvetica" fill="green" > |
| 107 |
<tref xlink:href="#tref-internal-reference"/> |
| 108 |
</text> |
| 109 |
<rect x="180" y="55" width="230" height="18" fill="none" stroke="black" /> |
| 110 |
<text x="180" y="85" font-family="Helvetica" font-size="12" fill="black" >'tref', within file</text> |
| 111 |
<!-- Second sub-test, tref like tspan, for changing properties --> |
| 112 |
<text x="30" y="120" font-size="16" font-family="Helvetica" fill="blue" > |
| 113 |
<tref xlink:href="#tref-property-change-1"/> |
| 114 |
<tref xlink:href="#tref-property-change-2" fill="red" /> |
| 115 |
<tref xlink:href="#tref-property-change-3"/> |
| 116 |
</text> |
| 117 |
<rect x="25" y="105" width="215" height="18" fill="none" stroke="black" /> |
| 118 |
<text x="25" y="135" font-family="Helvetica" font-size="12" fill="black" >multiple 'tref' and property changes</text> |
| 119 |
<!-- Third sub-test, tref like tspan, x,y position list --> |
| 120 |
<text font-size="16" font-family="Helvetica" fill="red" > |
| 121 |
<tref x="185 200 215 230 245 260 275 290 305 320 335 350 365" y="165" xlink:href="#tref-coord-list"/> |
| 122 |
</text> |
| 123 |
<rect x="180" y="150" width="230" height="18" fill="none" stroke="black" /> |
| 124 |
<text x="180" y="180" font-family="Helvetica" font-size="12" fill="black" >'tref' with x-coordinate list</text> |
| 125 |
<!-- Fourth sub-test, tref like tspan, changing x,y position --> |
| 126 |
<text font-size="16" font-family="Helvetica" fill="blue" > |
| 127 |
<tref x="30" y="230" xlink:href="#tref-position-change-1"/> |
| 128 |
<tref x="101" y="214" xlink:href="#tref-position-change-2"/> |
| 129 |
<tref x="123.5" y="230" xlink:href="#tref-position-change-3"/> |
| 130 |
<tref x="154.5" y="246" xlink:href="#tref-position-change-4"/> |
| 131 |
</text> |
| 132 |
<rect x="25" y="199" width="215" height="56" fill="none" stroke="black" /> |
| 133 |
<text x="25" y="267" font-family="Helvetica" font-size="12" fill="black" >'tref's with x/y attribute changes</text> |
| 134 |
<!-- Final test: overwrite test label in black, by tref to 'desc' element |
| 135 |
instead of reference to 'text' element(s) within 'defs'. --> |
| 136 |
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="black" > |
| 137 |
<tref xlink:href="#test-desc"/> |
| 138 |
</text> |
| 139 |
<!-- Patch simululation of above... |
| 140 |
<text x="75" y="25" font-family="Helvetica" font-size="12" fill="black" > |
| 141 |
Basic test of 'tref' element and its attributes. |
| 142 |
</text> |
| 143 |
--> |
| 144 |
</g> |
| 145 |
<!--======================================================================--> |
| 146 |
<!--Legend and frame: Title, suite and SVG document serialization====--> |
| 147 |
<!--======================================================================--> |
| 148 |
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10" > |
| 149 |
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000" /> |
| 150 |
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/> |
| 151 |
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text> |
| 152 |
<a xlink:href="copyright-documents-19990405.html"> |
| 153 |
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text> |
| 154 |
</a> |
| 155 |
<text font-size="12" x="35" y="330">text-tref-01-f</text> |
| 156 |
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text> |
| 157 |
<text font-size="10" x="210" y="345">Release 1.0</text> |
| 158 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000" /> |
| 159 |
</g> |
| 160 |
</svg> |