| <?xml version="1.0" encoding="UTF-8"?> |
| <!--======================================================================--> |
| <!--= Copyright 2004 World Wide Web Consortium, (Massachusetts =--> |
| <!--= Institute of Technology, Institut National de Recherche en =--> |
| <!--= Informatique et en Automatique, Keio University). All Rights =--> |
| <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> |
| <!--======================================================================--><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> |
| |
| <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"> |
| <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="NR" desc="Test on the animation of text properties and inheritance of animated text properties" status="accepted" version="$Revision: 1.10 $" testname="$RCSfile: animate-elem-77-t.svg,v $"> |
| <OperatorScript> |
| <Paragraph> |
| This test demonstrates how <set> elements change |
| text properties on a <text> element. For |
| each of the text properties being tested, 3 |
| <set> elements are set. The first <set> |
| element acts directly on the <text> element. The |
| second <set> element acts on a <g> containing |
| children. The third <set> element acts on an <a> |
| containing children. In each case the test validates that |
| the animated value set on the <g> and <a> |
| elements is inherited by the <text> element. |
| All the <set> elements have a begin attribute |
| set to 0s with an offset of 1s after end. |
| So, the animation will apply 1s after the document is loaded |
| and will repeat every 1s after the animation ends. |
| </Paragraph> |
| <Paragraph> |
| The first <set> validates the transform property. When |
| applied to the <text> element, the letter A will be |
| translated to the right every 1s, in the <text> column. |
| When applied to the <g> element, the letter A inherits the |
| transform value and is translated to the right every 1s, as |
| seen in the <g> column. When applied to the <a> |
| element, the letter A inherits the transform value and is |
| translated to the right every 1s, as seen in <a> column. |
| </Paragraph> |
| <Paragraph> |
| The second <set> validates the text-anchor attribute. |
| When applied to the <text> element, the anchor position |
| of letter A is moved from start to end. When applied to the |
| <g> and <a> element, the property is inherited |
| and hence the anchor position of letter A is moved from start |
| to end in the second row. |
| </Paragraph> |
| <Paragraph> |
| The third <set> validates the font-size attribute. |
| The font size of letter A is changed from 20 to 30. |
| When applied to <g> and <a> elements, the letter |
| A inherits the font-size and hence in row 3, letter A has a |
| font-size of 30 in all 3 right columns of row 3. |
| </Paragraph> |
| <Paragraph> |
| The fourth <set> validates the font-family attribute. |
| The font-family is changed from default to serif. |
| When applied to <g> and <a> elements, the letter |
| A inherits the font-family attribute and hence in row 4, |
| letter A has serif font-family in all 3 columns. |
| </Paragraph> |
| <Paragraph> |
| The fifth <set> validates the font-style attribute. |
| The font-style is changed from normal to italic. |
| When applied to <g> and <a> elements, the letter |
| A inherits the font-style attribute and hence in row 5, |
| letter A is animated to italic in all 3 columns. |
| </Paragraph> |
| <Paragraph> |
| The sixth <set> validates the font-weight attribute. |
| The font-weight is changed from normal to bold. |
| When applied to <g> and <a> elements, the letter |
| A inherits the font-weight attribute and hence in row 6, |
| letter A is changed to bold on the right. |
| </Paragraph> |
| </OperatorScript> |
| </SVGTestCase> |
| <title id="test-title">$RCSfile: animate-elem-77-t.svg,v $</title> |
| |
| <!--======================================================================--> |
| <!--Content of Test Case follows... =====================--> |
| <!--======================================================================--> |
| |
| <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.10 $</text> |
| <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| |
| <text text-anchor="middle" x="240" y="30" font-size="20">text</text> |
| |
| <g transform="translate(80, 80)"> |
| |
| <g transform="translate(20,10)" text-anchor="end" font-size="14"> |
| <text x="5" y="15">transform</text> |
| <text x="5" y="50">text-anchor</text> |
| <text x="5" y="85">font-size</text> |
| <text x="5" y="120">font-family</text> |
| <text x="5" y="155">font-style</text> |
| <text x="5" y="190">font-weight</text> |
| </g> |
| |
| <g id="type" transform="translate(90, -10)" text-anchor="middle" font-size="14"> |
| <text x="20" y="3"><text></text> |
| <text x="135" y="3"><g></text> |
| <text x="250" y="3"><a></text> |
| </g> |
| |
| <g transform="translate(80,5)" text-anchor="start" font-size="20" fill="rgb(204,0,102)"> |
| <text id="one" x="10" y="20" fill="#aaa">A </text> |
| |
| <g id="setOne"> |
| <defs> |
| <g id="setOneRef"> |
| <text x="10" y="20" fill="#aaa">A </text> |
| <text x="10" y="20" fill="#aaa" transform="translate(30,0)">A </text> |
| </g> |
| </defs> |
| |
| <use xlink:href="#setOneRef"/> |
| <use xlink:href="#setOneRef" x="110"/> |
| <use xlink:href="#setOneRef" x="220"/> |
| |
| <text x="10" y="20">A |
| <animateTransform attributeName="transform" id="firstSet" type="translate" from="30,0" to="30,0" begin="0s; firstSet.end + 1s" dur="1s"/> |
| </text> |
| |
| <g transform="translate(110, 0)"> |
| <animateTransform attributeName="transform" id="secondSet" type="translate" from="140,0" to="140,0" begin="0s; secondSet.end + 1s" dur="1s"/> |
| <text x="10" y="20">A</text> |
| </g> |
| |
| <a transform="translate(220, 0)"> |
| <animateTransform attributeName="transform" id="thirdSet" type="translate" from="250,0" to="250,0" begin="0s; thirdSet.end + 1s" dur="1s"/> |
| <text x="10" y="20">A</text> |
| </a> |
| </g> |
| |
| <g id="setTwo" transform="translate(0,35)"> |
| <defs> |
| <g id="setTwoRef"> |
| <text x="10" y="20" fill="#aaa">A </text> |
| <text x="10" y="20" fill="#aaa" transform="translate(40,0)" text-anchor="end">A</text> |
| </g> |
| </defs> |
| |
| <use xlink:href="#setTwoRef"/> |
| <use xlink:href="#setTwoRef" x="110"/> |
| <use xlink:href="#setTwoRef" x="220"/> |
| |
| <text x="10" y="20">A |
| <set id="secondSet1" attributeName="text-anchor" to="end" begin="0s; secondSet1.end + 1s" dur="1s"/> |
| <animateTransform attributeName="transform" id="secondSet1_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet1_1.end + 1s" dur="1s"/> |
| </text> |
| |
| <g> |
| <set id="secondSet2" attributeName="text-anchor" to="end" begin="0s; secondSet2.end + 1s" dur="1s"/> |
| <text x="120" y="20">A |
| <animateTransform attributeName="transform" id="secondSet2_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| <a> |
| <set id="secondSet3" attributeName="text-anchor" to="end" begin="0s; secondSet3.end + 1s" dur="1s"/> |
| <text x="230" y="20">A |
| <animateTransform attributeName="transform" id="secondSet3_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet3_1.end + 1s" dur="1s"/> |
| </text> |
| </a> |
| </g> |
| |
| <g id="setThree" transform="translate(0,70)"> |
| <defs> |
| <g id="setThreeRef"> |
| <text x="10" y="20" fill="#aaa">A </text> |
| <text x="40" y="20" font-size="30" fill="#aaa">A</text> |
| </g> |
| </defs> |
| <use xlink:href="#setThreeRef"/> |
| <use xlink:href="#setThreeRef" x="110"/> |
| <use xlink:href="#setThreeRef" x="220"/> |
| |
| <text x="10" y="20">A |
| <set id="thirdSet1" attributeName="font-size" to="30" begin="0s; thirdSet1.end + 1s" dur="1s"/> |
| <animateTransform attributeName="transform" id="thirdSet1_1" type="translate" from="30,0" to="30,0" begin="0s; thirdSet1_1.end + 1s" dur="1s"/> |
| </text> |
| |
| <g> |
| <set id="thirdSet2" attributeName="font-size" to="30" begin="0s; thirdSet2.end + 1s" dur="1s"/> |
| <text x="120" y="20">A |
| <animateTransform attributeName="transform" id="thirdSet2_1" type="translate" from="30,0" to="30,0" begin="0s; thirdSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| <a> |
| <set id="thirdSet3" attributeName="font-size" to="30" begin="0s; thirdSet3.end + 1s" dur="1s"/> |
| <text x="230" y="20">A |
| <animateTransform attributeName="transform" id="thirdSet3_1" type="translate" from="30, 0" to="30,0" begin="0s; thirdSet3_1.end + 1s" dur="1s"/> |
| </text> |
| </a> |
| </g> |
| |
| <g id="setFour" transform="translate(0,105)"> |
| <defs> |
| <g id="setFourRef"> |
| <text x="10" y="20" font-size="30" fill="#aaa" font-family="sans-serif">A</text> |
| <text x="40" y="20" font-size="30" fill="#aaa" font-family="serif">A</text> |
| </g> |
| </defs> |
| <use xlink:href="#setFourRef"/> |
| <use xlink:href="#setFourRef" x="110"/> |
| <use xlink:href="#setFourRef" x="220"/> |
| |
| <text x="10" y="20" font-size="30" font-family="sans-serif">A |
| <set id="fourthSet1" attributeName="font-family" to="serif" begin="0s; fourthSet1.end + 1s" dur="1s"/> |
| <animateTransform attributeName="transform" id="fourthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet1_1.end + 1s" dur="1s"/> |
| </text> |
| |
| <g transform="translate(110,0)" font-family="sans-serif"> |
| <set id="fourthSet2" attributeName="font-family" to="serif" begin="0s; fourthSet2.end + 1s" dur="1s"/> |
| <text x="10" y="20" font-size="30">A |
| <animateTransform attributeName="transform" id="fourthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| <a transform="translate(220,0)" font-family="sans-serif"> |
| <set id="fourthSet3" attributeName="font-family" to="serif" begin="0s; fourthSet3.end + 1s" dur="1s"/> |
| <text x="10" y="20" font-size="30">A |
| <animateTransform attributeName="transform" id="fourthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </a> |
| |
| </g> |
| |
| <g id="setFive" transform="translate(0,140)"> |
| <defs> |
| <g id="setFiveRef"> |
| <text x="10" y="20" fill="#aaa">A</text> |
| <text x="40" y="20" fill="#aaa" font-style="italic">A</text> |
| </g> |
| </defs> |
| |
| <use xlink:href="#setFiveRef"/> |
| <use xlink:href="#setFiveRef" x="110"/> |
| <use xlink:href="#setFiveRef" x="220"/> |
| |
| <text x="10" y="20">A |
| <set id="fifthSet1" attributeName="font-style" to="italic" begin="0s; fifthSet1.end + 1s" dur="1s"/> |
| <animateTransform attributeName="transform" id="fifthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet1_1.end + 1s" dur="1s"/> |
| </text> |
| |
| <g transform="translate(110,0)"> |
| <set id="fifthSet2" attributeName="font-style" to="italic" begin="0s; fifthSet2.end + 1s" dur="1s"/> |
| <text x="10" y="20">A |
| <animateTransform attributeName="transform" id="fifthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| <g transform="translate(220,0)"> |
| <set id="fifthSet3" attributeName="font-style" to="italic" begin="0s; fifthSet3.end + 1s" dur="1s"/> |
| <text x="10" y="20">A |
| <animateTransform attributeName="transform" id="fifthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet3_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| </g> |
| |
| <g id="setSix" transform="translate(0,175)"> |
| <defs> |
| <g id="setSixRef"> |
| <text x="10" y="20" fill="#aaa">A</text> |
| <text x="40" y="20" fill="#aaa" font-weight="bold">A</text> |
| </g> |
| </defs> |
| |
| <use xlink:href="#setSixRef"/> |
| <use xlink:href="#setSixRef" x="110"/> |
| <use xlink:href="#setSixRef" x="220"/> |
| |
| <text x="10" y="20">A |
| <set id="sixthSet1" attributeName="font-weight" to="bold" begin="0s; sixthSet1.end + 1s" dur="1s"/> |
| <animateTransform attributeName="transform" id="sixthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet1_1.end + 1s" dur="1s"/> |
| </text> |
| |
| <g transform="translate(110,0)"> |
| <set id="sixthSet2" attributeName="font-weight" to="bold" begin="0s; sixthSet2.end + 1s" dur="1s"/> |
| <text x="10" y="20">A |
| <animateTransform attributeName="transform" id="sixthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet2_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| <g transform="translate(220,0)"> |
| <set id="sixthSet3" attributeName="font-weight" to="bold" begin="0s; sixthSet3.end + 1s" dur="1s"/> |
| <text x="10" y="20">A |
| <animateTransform attributeName="transform" id="sixthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet3_1.end + 1s" dur="1s"/> |
| </text> |
| </g> |
| |
| </g> |
| </g> |
| </g> |
| </svg> |