| 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//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 |
<!-- Tests text-anchor on tspan elements --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg width="450" height="500" viewBox="0 0 450 500" |
| 32 |
xmlns="http://www.w3.org/2000/svg" |
| 33 |
xmlns:xlink="http://www.w3.org/1999/xlink" > |
| 34 |
|
| 35 |
<text class="title" x="50%" y="40">text-anchor on <tspan></text> |
| 36 |
|
| 37 |
<g id="testContent" transform="translate(56.25, 82.5) scale(.75,.75)"> |
| 38 |
|
| 39 |
<g transform="translate(0,0)"> |
| 40 |
<rect width="450" height="167" fill="black" opacity=".1" /> |
| 41 |
<rect y="167" width="450" height="167" fill="white" /> |
| 42 |
<rect y="334" width="450" height="166" fill="black" opacity=".1" /> |
| 43 |
|
| 44 |
<line x1="150" y1="0" x2="150" y2="500" style="stroke:red; fill:none" /> |
| 45 |
<line x1="320" y1="0" x2="320" y2="500" style="stroke:red; fill:none" /> |
| 46 |
<rect width="450" height="500" stroke="red" fill="none" /> |
| 47 |
</g> |
| 48 |
|
| 49 |
<g transform="translate(0, 0)"> |
| 50 |
<!-- ############################## --> |
| 51 |
<!-- textChunk1: text-anchor:start --> |
| 52 |
<!-- textChunk2: text-anchor:start --> |
| 53 |
<!-- ############################## --> |
| 54 |
<g transform="translate(0, 0)"> |
| 55 |
|
| 56 |
<text y="50"> |
| 57 |
<tspan x="150" style="text-anchor:start">I am the</tspan> |
| 58 |
<tspan style="fill:red"> same text chunk</tspan> |
| 59 |
<tspan x="320" y="30" style="text-anchor:start">another text chunk</tspan> |
| 60 |
</text> |
| 61 |
|
| 62 |
</g> |
| 63 |
|
| 64 |
|
| 65 |
<!-- ############################## --> |
| 66 |
<!-- textChunk1: text-anchor:middle --> |
| 67 |
<!-- textChunk2: text-anchor:start --> |
| 68 |
<!-- ############################## --> |
| 69 |
<g transform="translate(0 40)"> |
| 70 |
|
| 71 |
<text y="50"> |
| 72 |
<tspan x="150" style="text-anchor:middle">I am the</tspan> |
| 73 |
<tspan style="fill:red"> same text chunk</tspan> |
| 74 |
<tspan x="320" y="30" style="text-anchor:start">another text chunk</tspan> |
| 75 |
</text> |
| 76 |
|
| 77 |
</g> |
| 78 |
|
| 79 |
<!-- ############################## --> |
| 80 |
<!-- textChunk1: text-anchor:end --> |
| 81 |
<!-- textChunk2: text-anchor:start --> |
| 82 |
<!-- ############################## --> |
| 83 |
<g transform="translate(0 80)"> |
| 84 |
|
| 85 |
<text y="50"> |
| 86 |
<tspan x="150" style="text-anchor:end">I am the</tspan> |
| 87 |
<tspan style="fill:red"> same text chunk</tspan> |
| 88 |
<tspan x="320" y="30" style="text-anchor:start">another text chunk</tspan> |
| 89 |
</text> |
| 90 |
|
| 91 |
</g> |
| 92 |
</g> |
| 93 |
|
| 94 |
<!-- ############################################################################ --> |
| 95 |
<!-- ############################################################################ --> |
| 96 |
|
| 97 |
<g transform="translate(0 50)"> |
| 98 |
<!-- ############################## --> |
| 99 |
<!-- textChunk1: text-anchor:start --> |
| 100 |
<!-- textChunk2: text-anchor:middle --> |
| 101 |
<!-- ############################## --> |
| 102 |
<g transform="translate(0 120)"> |
| 103 |
|
| 104 |
<text y="50"> |
| 105 |
<tspan x="150" style="text-anchor:start">I am the</tspan> |
| 106 |
<tspan style="fill:red"> same text chunk</tspan> |
| 107 |
<tspan x="320" y="30" style="text-anchor:middle">another text chunk</tspan> |
| 108 |
</text> |
| 109 |
|
| 110 |
</g> |
| 111 |
|
| 112 |
|
| 113 |
<!-- ############################## --> |
| 114 |
<!-- textChunk1: text-anchor:middle --> |
| 115 |
<!-- textChunk2: text-anchor:middle --> |
| 116 |
<!-- ############################## --> |
| 117 |
<g transform="translate(0 160)"> |
| 118 |
|
| 119 |
<text y="50"> |
| 120 |
<tspan x="150" style="text-anchor:middle">I am the</tspan> |
| 121 |
<tspan style="fill:red"> same text chunk</tspan> |
| 122 |
<tspan x="320" y="30" style="text-anchor:middle">another text chunk</tspan> |
| 123 |
</text> |
| 124 |
|
| 125 |
</g> |
| 126 |
|
| 127 |
<!-- ############################## --> |
| 128 |
<!-- textChunk1: text-anchor:end --> |
| 129 |
<!-- textChunk2: text-anchor:middle --> |
| 130 |
<!-- ############################## --> |
| 131 |
<g transform="translate(0 200)"> |
| 132 |
|
| 133 |
<text y="50"> |
| 134 |
<tspan x="150" style="text-anchor:end">I am the</tspan> |
| 135 |
<tspan style="fill:red"> same text chunk</tspan> |
| 136 |
<tspan x="320" y="30" style="text-anchor:middle">another text chunk</tspan> |
| 137 |
</text> |
| 138 |
|
| 139 |
</g> |
| 140 |
</g> |
| 141 |
|
| 142 |
<!-- ############################################################################ --> |
| 143 |
<!-- ############################################################################ --> |
| 144 |
<g transform="translate(0, 80)"> |
| 145 |
|
| 146 |
<!-- ############################# --> |
| 147 |
<!-- textChunk1: text-anchor:start --> |
| 148 |
<!-- textChunk2: text-anchor:end --> |
| 149 |
<!-- ############################# --> |
| 150 |
<g transform="translate(0 260)"> |
| 151 |
|
| 152 |
<text y="50"> |
| 153 |
<tspan x="150" style="text-anchor:start">I am the</tspan> |
| 154 |
<tspan style="fill:red"> same text chunk</tspan> |
| 155 |
<tspan x="320" y="30" style="text-anchor:end">another text chunk</tspan> |
| 156 |
</text> |
| 157 |
|
| 158 |
</g> |
| 159 |
|
| 160 |
|
| 161 |
<!-- ############################## --> |
| 162 |
<!-- textChunk1: text-anchor:middle --> |
| 163 |
<!-- textChunk2: text-anchor:end --> |
| 164 |
<!-- ############################## --> |
| 165 |
<g transform="translate(0 300)"> |
| 166 |
|
| 167 |
<text y="50"> |
| 168 |
<tspan x="150" style="text-anchor:middle">I am the</tspan> |
| 169 |
<tspan style="fill:red"> same text chunk</tspan> |
| 170 |
<tspan x="320" y="30" style="text-anchor:end">another text chunk</tspan> |
| 171 |
</text> |
| 172 |
|
| 173 |
</g> |
| 174 |
|
| 175 |
<!-- ############################## --> |
| 176 |
<!-- textChunk1: text-anchor:end --> |
| 177 |
<!-- textChunk2: text-anchor:end --> |
| 178 |
<!-- ############################## --> |
| 179 |
<g transform="translate(0 340)"> |
| 180 |
|
| 181 |
<text y="50"> |
| 182 |
<tspan x="150" style="text-anchor:end">I am the</tspan> |
| 183 |
<tspan style="fill:red"> same text chunk</tspan> |
| 184 |
<tspan x="320" y="30" style="text-anchor:end">another text chunk</tspan> |
| 185 |
</text> |
| 186 |
|
| 187 |
</g> |
| 188 |
</g> |
| 189 |
</g> |
| 190 |
|
| 191 |
<!-- ============================================================= --> |
| 192 |
<!-- Batik sample mark --> |
| 193 |
<!-- ============================================================= --> |
| 194 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 195 |
</svg> |