| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| 3 |
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ====================================================================== --> |
| 24 |
<!-- Modification of a textPath style attributes --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @author [email protected] --> |
| 28 |
<!-- @version $Id$ --> |
| 29 |
<!-- ====================================================================== --> |
| 30 |
|
| 31 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 32 |
|
| 33 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 34 |
<title><textPath> CSS properties on 'onload'</title> |
| 35 |
|
| 36 |
<text x="50%" y="45" class="title"><textPath> CSS properties on 'onload'</text> |
| 37 |
|
| 38 |
<script type="text/ecmascript"><![CDATA[ |
| 39 |
function changeStyle(evt, newValue) { |
| 40 |
evt.target.setAttribute("style", newValue); |
| 41 |
} |
| 42 |
]]></script> |
| 43 |
|
| 44 |
<defs> |
| 45 |
<path id="path1" transform="translate(100,100)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 46 |
<path id="path2" transform="translate(100,140)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 47 |
<path id="path3" transform="translate(100,180)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 48 |
<path id="path4" transform="translate(100,220)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 49 |
<path id="path5" transform="translate(100,260)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 50 |
<path id="path6" transform="translate(100,300)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 51 |
<path id="path7" transform="translate(100,340)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 52 |
<path id="path8" transform="translate(100,380)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 53 |
<path id="path9" transform="translate(100,420)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 54 |
<path id="path10" transform="translate(100,460)" style="stroke:black;fill:none" d="M -100 0 C -55 15 -45 15 0 0 C 45 -15 55 -15 100 0 C 145 15 155 15 200 0 C 245 -15 255 -15 300 0" /> |
| 55 |
</defs> |
| 56 |
|
| 57 |
<g id="test-content" style="font-size:18"> |
| 58 |
|
| 59 |
<text x="100"><textPath xlink:href="#path1" onload="changeStyle(evt, 'font-family:Impact')">font-family:Arial</textPath></text> |
| 60 |
<text x="100"><textPath xlink:href="#path2" onload="changeStyle(evt, 'font-size:32')">font-size:32</textPath></text> |
| 61 |
<text x="100"><textPath xlink:href="#path3" onload="changeStyle(evt, 'fill:crimson')">fill:crimson</textPath></text> |
| 62 |
<text x="100"><textPath xlink:href="#path4" onload="changeStyle(evt, 'stroke:orange;font-size:18')">stroke:orange; font-size:18</textPath></text> |
| 63 |
<text x="200"><textPath xlink:href="#path5" onload="changeStyle(evt, 'text-anchor:start')">text-anchor:start</textPath></text> |
| 64 |
<text x="200"><textPath xlink:href="#path6" onload="changeStyle(evt, 'text-anchor:middle')">text-anchor:middle</textPath></text> |
| 65 |
<text x="200"><textPath xlink:href="#path7" onload="changeStyle(evt, 'text-anchor:end')">text-anchor:end</textPath></text> |
| 66 |
<text x="100"><textPath xlink:href="#path8" onload="changeStyle(evt, 'font-weight:bold')">font-weight:bold</textPath></text> |
| 67 |
<text x="100"><textPath xlink:href="#path9" onload="changeStyle(evt, 'font-style:italic')">font-style:italic</textPath></text> |
| 68 |
<text x="100"><textPath xlink:href="#path10" onload="changeStyle(evt, 'letter-spacing:10')">letter-spacing:10</textPath></text> |
| 69 |
|
| 70 |
</g> |
| 71 |
<!-- |
| 72 |
<g> |
| 73 |
<use xlink:href="#path1" /> |
| 74 |
<use xlink:href="#path2" /> |
| 75 |
<use xlink:href="#path3" /> |
| 76 |
<use xlink:href="#path4" /> |
| 77 |
<use xlink:href="#path5" /> |
| 78 |
<use xlink:href="#path6" /> |
| 79 |
<use xlink:href="#path7" /> |
| 80 |
<use xlink:href="#path8" /> |
| 81 |
<use xlink:href="#path9" /> |
| 82 |
<use xlink:href="#path10" /> |
| 83 |
</g> |
| 84 |
--> |
| 85 |
</svg> |