| 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 multiple text chunks on single tspan element --> |
| 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="30">text-anchor on a single <tspan></text> |
| 36 |
|
| 37 |
<g id="testContent"> |
| 38 |
|
| 39 |
<!-- ################################################################# --> |
| 40 |
<!-- table --> |
| 41 |
<!-- ################################################################# --> |
| 42 |
<g> |
| 43 |
<rect x="75" y="50" width="300" height="20" style="fill:black; stroke:black" /> |
| 44 |
<rect x="75" y="70" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 45 |
<rect x="75" y="110" width="300" height="40" style="fill:white; stroke:black" /> |
| 46 |
<rect x="75" y="150" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 47 |
<text x="90" y="64" style="fill:white;font-size:14">x attributed tspan with extra text</text> |
| 48 |
<g style="stroke:lightsteelblue; fill:none"> |
| 49 |
<line x1="150" y1="70" x2="150" y2="190" /> |
| 50 |
<line x1="190" y1="70" x2="190" y2="190" /> |
| 51 |
<line x1="230" y1="70" x2="230" y2="190" /> |
| 52 |
<line x1="270" y1="70" x2="270" y2="190" /> |
| 53 |
<line x1="310" y1="70" x2="310" y2="190" /> |
| 54 |
</g> |
| 55 |
</g> |
| 56 |
|
| 57 |
<g transform="translate(0 150)"> |
| 58 |
<rect x="75" y="50" width="300" height="20" style="fill:black; stroke:black" /> |
| 59 |
<rect x="75" y="70" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 60 |
<rect x="75" y="110" width="300" height="40" style="fill:white; stroke:black" /> |
| 61 |
<rect x="75" y="150" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 62 |
<text x="90" y="64" style="fill:white;font-size:14">x attribute for some chars</text> |
| 63 |
<g style="stroke:lightsteelblue; fill:none"> |
| 64 |
<line x1="150" y1="70" x2="150" y2="190" /> |
| 65 |
<line x1="190" y1="70" x2="190" y2="190" /> |
| 66 |
<line x1="230" y1="70" x2="230" y2="190" /> |
| 67 |
</g> |
| 68 |
</g> |
| 69 |
|
| 70 |
<g transform="translate(0 300)"> |
| 71 |
<rect x="75" y="50" width="300" height="20" style="fill:black; stroke:black" /> |
| 72 |
<rect x="75" y="70" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 73 |
<rect x="75" y="110" width="300" height="40" style="fill:white; stroke:black" /> |
| 74 |
<rect x="75" y="150" width="300" height="40" style="fill:#eee; stroke:black" /> |
| 75 |
<text x="90" y="64" style="fill:white;font-size:14">x & y attributes with inheritance</text> |
| 76 |
<g style="stroke:lightsteelblue; fill:none"> |
| 77 |
<line x1="150" y1="70" x2="150" y2="190" /> |
| 78 |
<line x1="190" y1="70" x2="190" y2="190" /> |
| 79 |
<line x1="230" y1="70" x2="230" y2="190" /> |
| 80 |
<line x1="270" y1="70" x2="270" y2="190" /> |
| 81 |
</g> |
| 82 |
</g> |
| 83 |
|
| 84 |
<!-- ################################################################# --> |
| 85 |
<!-- x attribute defines new text chunks extra text after tspan --> |
| 86 |
<!-- ################################################################# --> |
| 87 |
|
| 88 |
<text transform="translate(150 94)"><tspan x="0 40 80 120 160" y="0 0 0 0 10" style="text-anchor:start">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 89 |
<text transform="translate(150 134)"><tspan x="0 40 80 120 160" y="0 0 0 0 10" style="text-anchor:middle">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 90 |
<text transform="translate(150 174)"><tspan x="0 40 80 120 160" y="0 0 0 0 10" style="text-anchor:end">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 91 |
|
| 92 |
<!-- ################################################################# --> |
| 93 |
<!-- x attribute defines new text chunks for only some chars --> |
| 94 |
<!-- ################################################################# --> |
| 95 |
<text transform="translate(150 240)"><tspan x="0 40 80" style="text-anchor:start">Batik</tspan></text> |
| 96 |
<text transform="translate(150 280)"><tspan x="0 40 80" style="text-anchor:middle">Batik</tspan></text> |
| 97 |
<text transform="translate(150 320)"><tspan x="0 40 80" style="text-anchor:end">Batik</tspan></text> |
| 98 |
|
| 99 |
<!-- ################################################################# --> |
| 100 |
<!-- both x and y attributes define new text chunks --> |
| 101 |
<!-- ################################################################# --> |
| 102 |
<text transform="translate(150 390)" x="0 0 0 120"><tspan x="0 40 80" y="0 10 0 10" style="text-anchor:start">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 103 |
<text transform="translate(150 430)" x="0 0 0 120"><tspan x="0 40 80" y="0 10 0 10" style="text-anchor:middle">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 104 |
<text transform="translate(150 470)" x="0 0 0 120"><tspan x="0 40 80" y="0 10 0 10" style="text-anchor:end">Batik</tspan><tspan fill="crimson"> rules!</tspan></text> |
| 105 |
|
| 106 |
</g> |
| 107 |
|
| 108 |
</svg> |