| 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 description here --> |
| 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 |
<style type="text/css"><![CDATA[ |
| 36 |
.Caption { font-size: 8; font-family: dialog; font-weight: normal; |
| 37 |
font-style: normal; stroke: none; stroke-width: 0; |
| 38 |
fill: black } |
| 39 |
text > tspan { fill: blue; } |
| 40 |
text > tspan > tspan { fill: purple; }]]> |
| 41 |
</style> |
| 42 |
|
| 43 |
<script type="text/ecmascript"><![CDATA[ |
| 44 |
var inRegard=false; |
| 45 |
var root; |
| 46 |
function regardStart() { |
| 47 |
inRegard = true; |
| 48 |
doChange(); |
| 49 |
} |
| 50 |
function doSet(idx, attr, tv, tsv, ttsv) { |
| 51 |
var t = root.getElementById("t"+idx); |
| 52 |
var ts = root.getElementById("ts"+idx); |
| 53 |
var tts = root.getElementById("tts"+idx); |
| 54 |
if (tv) t.setAttribute(attr, tv); |
| 55 |
if (tsv) ts.setAttribute(attr, tsv); |
| 56 |
if (ttsv) tts.setAttribute(attr, ttsv); |
| 57 |
} |
| 58 |
|
| 59 |
function doChange() { |
| 60 |
root = document.getRootElement(); |
| 61 |
doSet(1, "visibility", "hidden", "hidden", undefined); |
| 62 |
doSet(2, "visibility", undefined, undefined, "hidden"); |
| 63 |
doSet(3, "visibility", undefined, undefined, "visible"); |
| 64 |
doSet(4, "visibility", "visible", undefined, "visible"); |
| 65 |
doSet(5, "visibility", undefined, undefined, "hidden"); |
| 66 |
doSet(6, "visibility", "hidden", undefined, undefined); |
| 67 |
|
| 68 |
doSet(7, "display", undefined, "none", undefined); |
| 69 |
doSet(8, "display", undefined, undefined, "inline"); |
| 70 |
doSet(9, "display", undefined, "inline", undefined); |
| 71 |
doSet(10, "display", "none", "inline", "inline"); |
| 72 |
doSet(11, "display", "inline", undefined, undefined); |
| 73 |
|
| 74 |
if (inRegard) |
| 75 |
regardTestInstance.scriptDone(); |
| 76 |
} |
| 77 |
]]></script> |
| 78 |
|
| 79 |
<rect fill="gold" stroke="crimson" x="15" y="15" width="70" height="25" |
| 80 |
onclick="doChange()"/> |
| 81 |
<text fill="crimson" x="50" y="32" font-weight="bold" text-anchor="middle" |
| 82 |
pointer-events="none">Change!</text> |
| 83 |
|
| 84 |
<title>Text Properties</title> |
| 85 |
|
| 86 |
<!-- ============================================================= --> |
| 87 |
<!-- Test content --> |
| 88 |
<!-- ============================================================= --> |
| 89 |
<g id="testContent"> |
| 90 |
<text class="title" x="50%" y="40" font-size="15" > |
| 91 |
Text display and visibility.</text> |
| 92 |
|
| 93 |
<text x="50%" y="74" text-anchor="middle" |
| 94 |
>Visibility on text & tspans</text> |
| 95 |
<text x="50%" y="250" text-anchor="middle" |
| 96 |
>Display on text & tspans</text> |
| 97 |
|
| 98 |
<g stroke="black" stroke-width="1"> |
| 99 |
<rect x="12.5" y="82" width="425" height="25" fill="#EEE"/> |
| 100 |
<rect x="12.5" y="107" width="425" height="25" fill="#CCC"/> |
| 101 |
<rect x="12.5" y="132" width="425" height="25" fill="#EEE"/> |
| 102 |
<rect x="12.5" y="157" width="425" height="25" fill="#CCC"/> |
| 103 |
<rect x="12.5" y="182" width="425" height="25" fill="#EEE"/> |
| 104 |
<rect x="12.5" y="207" width="425" height="25" fill="#CCC"/> |
| 105 |
<line x1="325" x2="325" y1="82" y2="232"/> |
| 106 |
<line x1="381" x2="381" y1="82" y2="232"/> |
| 107 |
|
| 108 |
<rect x="12.5" y="257" width="425" height="25" fill="#EEE"/> |
| 109 |
<rect x="12.5" y="282" width="425" height="25" fill="#CCC"/> |
| 110 |
<rect x="12.5" y="307" width="425" height="25" fill="#EEE"/> |
| 111 |
<rect x="12.5" y="332" width="425" height="25" fill="#CCC"/> |
| 112 |
<rect x="12.5" y="357" width="425" height="25" fill="#EEE"/> |
| 113 |
<line x1="325" x2="325" y1="257" y2="382"/> |
| 114 |
<line x1="381" x2="381" y1="257" y2="382"/> |
| 115 |
</g> |
| 116 |
|
| 117 |
<text class="Caption" x="335" y="97" >---, ---, ---</text> |
| 118 |
<text class="Caption" x="335" y="122">---, hid, vis</text> |
| 119 |
<text class="Caption" x="335" y="147">---, hid, hid</text> |
| 120 |
<text class="Caption" x="335" y="172">hid, vis, hid</text> |
| 121 |
<text class="Caption" x="335" y="197">---, ---, ---</text> |
| 122 |
<text class="Caption" x="335" y="222">---, ---, ---</text> |
| 123 |
|
| 124 |
<text class="Caption" x="391" y="97" >hid, hid, ---</text> |
| 125 |
<text class="Caption" x="391" y="122">---, ---, hid</text> |
| 126 |
<text class="Caption" x="391" y="147">---, ---, vis</text> |
| 127 |
<text class="Caption" x="391" y="172">vis, ---, vis</text> |
| 128 |
<text class="Caption" x="391" y="197">---, ---, hid</text> |
| 129 |
<text class="Caption" x="391" y="222">hid, ---, ---</text> |
| 130 |
|
| 131 |
<text class="Caption" x="335" y="273">---, ---, ---</text> |
| 132 |
<text class="Caption" x="335" y="298">---, inl, non</text> |
| 133 |
<text class="Caption" x="335" y="323">---, non, inl</text> |
| 134 |
<text class="Caption" x="335" y="348">---, non, non</text> |
| 135 |
<text class="Caption" x="335" y="373">non, inl, non</text> |
| 136 |
|
| 137 |
<text class="Caption" x="391" y="273">---, non, ---</text> |
| 138 |
<text class="Caption" x="391" y="298">---, ---, inl</text> |
| 139 |
<text class="Caption" x="391" y="323">---, inl, ---</text> |
| 140 |
<text class="Caption" x="391" y="348">non, inl, inl</text> |
| 141 |
<text class="Caption" x="391" y="373">inl, ---, ---</text> |
| 142 |
|
| 143 |
<g transform="scale(1.25), translate(0, 10)"> |
| 144 |
<text id="t1" x="20" y="70">Text <tspan id="ts1" |
| 145 |
>tspan 1 <tspan id="tts1"> tspan 2</tspan |
| 146 |
> more span 1</tspan> finish text</text> |
| 147 |
|
| 148 |
<text id="t2" x="20" y="90" >Text <tspan id="ts2" visibility="hidden" |
| 149 |
>tspan 1 <tspan id="tts2" visibility="visible"> tspan 2</tspan |
| 150 |
> more span 1</tspan> finish text</text> |
| 151 |
|
| 152 |
<text id="t3" x="20" y="110">Text <tspan id="ts3" visibility="hidden" |
| 153 |
>tspan 1 <tspan id="tts3" visibility="hidden" |
| 154 |
> tspan 2</tspan> more span 1</tspan> finish text</text> |
| 155 |
|
| 156 |
<text id="t4" x="20" y="130" visibility="hidden" |
| 157 |
>Text <tspan id="ts4" visibility="visible" |
| 158 |
>tspan 1 <tspan id="tts4" visibility="hidden"> tspan 2</tspan |
| 159 |
> more span 1</tspan> finish text</text> |
| 160 |
|
| 161 |
<text id="t5" x="20" y="150" |
| 162 |
>Text <tspan id="ts5" |
| 163 |
>tspan 1 <tspan id="tts5" > tspan 2</tspan |
| 164 |
> more span 1</tspan> finish text</text> |
| 165 |
|
| 166 |
<text id="t6" x="20" y="170" |
| 167 |
>Text <tspan id="ts6" |
| 168 |
>tspan 1 <tspan id="tts6" > tspan 2</tspan |
| 169 |
> more span 1</tspan> finish text</text> |
| 170 |
|
| 171 |
|
| 172 |
<text id="t7" x="20" y="210">Text <tspan id="ts7" |
| 173 |
>tspan 1 <tspan id="tts7" |
| 174 |
>tspan 2 </tspan>more span 1</tspan |
| 175 |
> finish text</text> |
| 176 |
<text id="t8" x="20" y="230">Text <tspan id="ts8" display="inline" |
| 177 |
>tspan 1 <tspan id="tts8" display="none" |
| 178 |
> tspan 2</tspan> more span 1</tspan |
| 179 |
> finish text</text> |
| 180 |
<text id="t9" x="20" y="250">Text <tspan id="ts9" display="none" |
| 181 |
>tspan 1 <tspan id="tts9" display="inline" |
| 182 |
> tspan 2</tspan> more span 1</tspan |
| 183 |
> finish text</text> |
| 184 |
<text id="t10" x="20" y="270">Text <tspan id="ts10" display="none" |
| 185 |
>tspan 1 <tspan id="tts10" display="none" |
| 186 |
> tspan 2</tspan> more span 1</tspan |
| 187 |
> finish text</text> |
| 188 |
<text id="t11" x="20" y="290" display="none" |
| 189 |
>Text <tspan id="ts11" display="inline" |
| 190 |
>tspan 1 <tspan id="tts11" display="none" |
| 191 |
> tspan 2</tspan> more span 1</tspan |
| 192 |
> finish text</text> |
| 193 |
</g> |
| 194 |
</g> |
| 195 |
|
| 196 |
<!-- ============================================================= --> |
| 197 |
<!-- Batik sample mark --> |
| 198 |
<!-- ============================================================= --> |
| 199 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 200 |
|
| 201 |
</svg> |