| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 3 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.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 |
<!-- test anchor inside text --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg xmlns="http://www.w3.org/2000/svg" |
| 32 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 33 |
id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 34 |
|
| 35 |
<text class="title" x="50%" y="40">test anchor inside text |
| 36 |
<desc>Click in any of the links in the table. You should see a smilley.</desc></text> |
| 37 |
|
| 38 |
<g> |
| 39 |
|
| 40 |
<defs> |
| 41 |
<g id="smilley"> |
| 42 |
<g transform="scale(.8, .8) translate(-15,-15)"> |
| 43 |
<circle cx="15" cy="15" r="10"/> |
| 44 |
<circle cx="12" cy="12" r="1.5" fill="black"/> |
| 45 |
<circle cx="17" cy="12" r="1.5" fill="black"/> |
| 46 |
<path d="M 10 19 A 8 8 0 0 0 20 19" stroke="black" stroke-width="1"/> |
| 47 |
</g> |
| 48 |
</g> |
| 49 |
<g id="successBlack" fill="#aaa"> |
| 50 |
<use xlink:href="#smilley" /> |
| 51 |
</g> |
| 52 |
<g id="successCrimson" fill="crimson"> |
| 53 |
<use xlink:href="#smilley" /> |
| 54 |
</g> |
| 55 |
<g id="successOrange" fill="orange"> |
| 56 |
<use xlink:href="#smilley" /> |
| 57 |
</g> |
| 58 |
<g id="successBlue" fill="blue"> |
| 59 |
<use xlink:href="#smilley" /> |
| 60 |
</g> |
| 61 |
|
| 62 |
<path id="Path1" style="fill:none; stroke:blue;" |
| 63 |
d="M140 300 C140 150 280 150 280 300"/> |
| 64 |
|
| 65 |
</defs> |
| 66 |
|
| 67 |
<g transform="translate(5, 5) scale(.2)"> |
| 68 |
<use xlink:href="#successBlack"/> |
| 69 |
<a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| 70 |
<text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| 71 |
</a> |
| 72 |
</g> |
| 73 |
<g transform="translate(15, 5) scale(.2)"> |
| 74 |
<use xlink:href="#successCrimson"/> |
| 75 |
<a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| 76 |
<text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| 77 |
</a> |
| 78 |
</g> |
| 79 |
<g transform="translate(25, 5) scale(.2)"> |
| 80 |
<use xlink:href="#successOrange"/> |
| 81 |
<a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| 82 |
<text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| 83 |
</a> |
| 84 |
</g> |
| 85 |
<g transform="translate(35, 5) scale(.2)"> |
| 86 |
<use xlink:href="#successBlue"/> |
| 87 |
<a xlink:href="#svgView(viewBox(0,0,450,500))"> |
| 88 |
<text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text> |
| 89 |
</a> |
| 90 |
</g> |
| 91 |
|
| 92 |
<view id="black" viewBox="3,2.5,4,4" /> |
| 93 |
<view id="crimson" viewBox="13,2.5,4,4" /> |
| 94 |
<view id="orange" viewBox="23,2.5,4,4" /> |
| 95 |
<view id="blue" viewBox="33,2.5,4,4" /> |
| 96 |
|
| 97 |
<!-- ################################################## --> |
| 98 |
|
| 99 |
<a xlink:href="#black"> |
| 100 |
<text x="50" y="100">This is simple text under the text element |
| 101 |
<a xlink:href="#crimson"><tspan fill="crimson">and here is a simple tspan </tspan></a> |
| 102 |
and |
| 103 |
<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> |
| 104 |
</text> |
| 105 |
</a> |
| 106 |
|
| 107 |
|
| 108 |
<!-- ################################################## --> |
| 109 |
|
| 110 |
<g transform="translate(0 300)" > |
| 111 |
<a xlink:href="#black"> |
| 112 |
<text x="50" y="100">This is text with transform |
| 113 |
<a xlink:href="#crimson"><tspan fill="crimson">and here is a simple tspan </tspan></a> |
| 114 |
and |
| 115 |
<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> |
| 116 |
</text> |
| 117 |
</a> |
| 118 |
</g> |
| 119 |
|
| 120 |
<!-- ################################################## --> |
| 121 |
|
| 122 |
<use xlink:href="#Path1" /> |
| 123 |
|
| 124 |
<a xlink:href="#black"> |
| 125 |
<text x="50" y="300" fill="black">This is simple |
| 126 |
<textPath fill="crimson" xlink:href="#Path1" startOffset="0%"><a xlink:href="#crimson">text on a path |
| 127 |
<a xlink:href="#orange"><tspan fill="orange" dy="-10">with nested tspan</tspan></a> |
| 128 |
<tspan dy="10"> and dy attributes </tspan></a></textPath> |
| 129 |
<tspan fill="blue" dx="10"><a xlink:href="#blue">all with</a></tspan> different links. |
| 130 |
</text> |
| 131 |
</a> |
| 132 |
|
| 133 |
|
| 134 |
<text x="50%" y="350" text-anchor="middle">Only the |
| 135 |
<a xlink:href="#crimson"><tspan fill="crimson">crimson tspan</tspan></a> has an anchor</text> |
| 136 |
|
| 137 |
</g> |
| 138 |
|
| 139 |
</svg> |