| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <!-- ====================================================================== --> |
| <!-- Modification of a textPath style attributes --> |
| <!-- --> |
| <!-- @author tkormann@ilog.fr --> |
| <!-- @author nicolas.socheleau@bitflash.com --> |
| <!-- @version $Id$ --> |
| <!-- ====================================================================== --> |
| |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| <title><textPath> CSS properties on 'onload'</title> |
| |
| <text x="50%" y="45" class="title"><textPath> CSS properties on 'onload'</text> |
| |
| <script type="text/ecmascript"><![CDATA[ |
| function changeStyle(evt, newValue) { |
| evt.target.setAttribute("style", newValue); |
| } |
| ]]></script> |
| |
| <defs> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| <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" /> |
| </defs> |
| |
| <g id="test-content" style="font-size:18"> |
| |
| <text x="100"><textPath xlink:href="#path1" onload="changeStyle(evt, 'font-family:Impact')">font-family:Arial</textPath></text> |
| <text x="100"><textPath xlink:href="#path2" onload="changeStyle(evt, 'font-size:32')">font-size:32</textPath></text> |
| <text x="100"><textPath xlink:href="#path3" onload="changeStyle(evt, 'fill:crimson')">fill:crimson</textPath></text> |
| <text x="100"><textPath xlink:href="#path4" onload="changeStyle(evt, 'stroke:orange;font-size:18')">stroke:orange; font-size:18</textPath></text> |
| <text x="200"><textPath xlink:href="#path5" onload="changeStyle(evt, 'text-anchor:start')">text-anchor:start</textPath></text> |
| <text x="200"><textPath xlink:href="#path6" onload="changeStyle(evt, 'text-anchor:middle')">text-anchor:middle</textPath></text> |
| <text x="200"><textPath xlink:href="#path7" onload="changeStyle(evt, 'text-anchor:end')">text-anchor:end</textPath></text> |
| <text x="100"><textPath xlink:href="#path8" onload="changeStyle(evt, 'font-weight:bold')">font-weight:bold</textPath></text> |
| <text x="100"><textPath xlink:href="#path9" onload="changeStyle(evt, 'font-style:italic')">font-style:italic</textPath></text> |
| <text x="100"><textPath xlink:href="#path10" onload="changeStyle(evt, 'letter-spacing:10')">letter-spacing:10</textPath></text> |
| |
| </g> |
| <!-- |
| <g> |
| <use xlink:href="#path1" /> |
| <use xlink:href="#path2" /> |
| <use xlink:href="#path3" /> |
| <use xlink:href="#path4" /> |
| <use xlink:href="#path5" /> |
| <use xlink:href="#path6" /> |
| <use xlink:href="#path7" /> |
| <use xlink:href="#path8" /> |
| <use xlink:href="#path9" /> |
| <use xlink:href="#path10" /> |
| </g> |
| --> |
| </svg> |