| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.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. |
| |
| --> |
| <!-- ====================================================================== --> |
| <!-- test anchor inside text --> |
| <!-- --> |
| <!-- @author tkormann@ilog.fr --> |
| <!-- @version $Id$ --> |
| <!-- ====================================================================== --> |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg xmlns="http://www.w3.org/2000/svg" |
| xmlns:xlink="http://www.w3.org/1999/xlink" |
| id="body" width="450" height="500" viewBox="0 0 450 500"> |
| |
| <text class="title" x="50%" y="40">test anchor inside text |
| <desc>Click in any of the links in the table. You should see a smilley.</desc></text> |
| |
| <g> |
| |
| <defs> |
| <g id="smilley"> |
| <g transform="scale(.8, .8) translate(-15,-15)"> |
| <circle cx="15" cy="15" r="10"/> |
| <circle cx="12" cy="12" r="1.5" fill="black"/> |
| <circle cx="17" cy="12" r="1.5" fill="black"/> |
| <path d="M 10 19 A 8 8 0 0 0 20 19" stroke="black" stroke-width="1"/> |
| </g> |
| </g> |
| <g id="successBlack" fill="#aaa"> |
| <use xlink:href="#smilley" /> |
| </g> |
| <g id="successCrimson" fill="crimson"> |
| <use xlink:href="#smilley" /> |
| </g> |
| <g id="successOrange" fill="orange"> |
| <use xlink:href="#smilley" /> |
| </g> |
| <g id="successBlue" fill="blue"> |
| <use xlink:href="#smilley" /> |
| </g> |
| |
| <path id="Path1" style="fill:none; stroke:blue;" |
| d="M140 300 C140 150 280 150 280 300"/> |
| |
| </defs> |
| |
| <g transform="translate(5, 5) scale(.2)"> |
| <use xlink:href="#successBlack"/> |
| <a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| <text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| </a> |
| </g> |
| <g transform="translate(15, 5) scale(.2)"> |
| <use xlink:href="#successCrimson"/> |
| <a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| <text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| </a> |
| </g> |
| <g transform="translate(25, 5) scale(.2)"> |
| <use xlink:href="#successOrange"/> |
| <a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| <text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| </a> |
| </g> |
| <g transform="translate(35, 5) scale(.2)"> |
| <use xlink:href="#successBlue"/> |
| <a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| <text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| </a> |
| </g> |
| |
| <view id="black" viewBox="3,2.5,4,4" /> |
| <view id="crimson" viewBox="13,2.5,4,4" /> |
| <view id="orange" viewBox="23,2.5,4,4" /> |
| <view id="blue" viewBox="33,2.5,4,4" /> |
| |
| <!-- ################################################## --> |
| |
| <a xlink:href="#black"> |
| <text x="50" y="100">This is simple text under the text element |
| <a xlink:href="#crimson"><tspan fill="crimson">and here is a simple tspan </tspan></a> |
| and |
| <tspan x="50" dy="1.1em" fill="orange"><a xlink:href="#orange">some more with nested <a xlink:href="#blue"><tspan fill="blue"> tspan </tspan></a>and more...</a></tspan> |
| </text> |
| </a> |
| |
| |
| <!-- ################################################## --> |
| |
| <g transform="translate(0 300)" > |
| <a xlink:href="#black"> |
| <text x="50" y="100">This is text with transform |
| <a xlink:href="#crimson"><tspan fill="crimson">and here is a simple tspan </tspan></a> |
| and |
| <tspan x="50" dy="1.1em" fill="orange"><a xlink:href="#orange">some more with nested <a xlink:href="#blue"><tspan fill="blue"> tspan </tspan></a> and more...</a></tspan> |
| </text> |
| </a> |
| </g> |
| |
| <!-- ################################################## --> |
| |
| <use xlink:href="#Path1" /> |
| |
| <a xlink:href="#black"> |
| <text x="50" y="300" fill="black">This is simple |
| <textPath fill="crimson" xlink:href="#Path1" startOffset="0%"><a xlink:href="#crimson">text on a path |
| <a xlink:href="#orange"><tspan fill="orange" dy="-10">with nested tspan</tspan></a> |
| <tspan dy="10"> and dy attributes </tspan></a></textPath> |
| <tspan fill="blue" dx="10"><a xlink:href="#blue">all with</a></tspan> different links. |
| </text> |
| </a> |
| |
| |
| <text x="50%" y="350" text-anchor="middle">Only the |
| <a xlink:href="#crimson"><tspan fill="crimson">crimson tspan</tspan></a> has an anchor</text> |
| |
| </g> |
| |
| </svg> |