Debian Codegraph @

samples/tests/spec/structure/toolTips.svg

raw
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 <!-- This test validates handling of the title and desc elements on graphical -->
25 <!-- elements. By default, the JSVGCanvas shows a tooltip with the title and -->
26 <!-- description if present. -->
27 <!-- This test validates that tooltips are shown on the various graphical -->
28 <!-- elements and that overlapping elements are treated properly (i.e., that -->
29 <!-- tooltips do not 'show through' elements. -->
30 <!-- -->
31 <!-- @author [email protected] -->
32 <!-- @version $Id$ -->
33 <!-- ========================================================================= -->
34 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
35
36 <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">
37 <title>Marker Test</title>
38
39 <style type="text/css"><![CDATA[
40 .label { text-anchor: middle; }
41 ]]></style>
42
43 <g id="content">
44
45 <text class="title" x="50%" y="35">&lt;title&gt;and &lt;desc&gt;</text>
46 <text class="title" x="50%" y="50">tool tips on Graphical Elements</text>
47
48 <defs>
49 <rect id="useElem" fill="crimson" stroke="black"
50 x="0" y="0" width="20" height="14"/>
51 </defs>
52
53 <g id="graphicsElementsTable" transform="translate(75, 60)">
54
55 <g id="additionalInfoHeader" transform="translate(60, 0)">
56 <rect x="0" y="0" width="60" height="20" fill="#eeeeee" stroke="black" />
57 <rect x="60" y="0" width="60" height="20" fill="#eeeeee" stroke="black" />
58 <rect x="120" y="0" width="60" height="20" fill="#eeeeee" stroke="black" />
59 <rect x="180" y="0" width="60" height="20" fill="#eeeeee" stroke="black" />
60
61 <g id="additionalInfoHeaderLabels" transform="translate(0, 15)" class="label">
62 <text x="30" y="0">No info</text>
63 <text x="90" y="0">&lt;title&gt;</text>
64 <text x="150" y="0">&lt;desc&gt;</text>
65 <text x="210" y="0">both</text>
66 </g>
67 </g>
68
69 <g id="rectRow" transform="translate(0, 20)">
70 <g fill="white" stroke="black">
71 <rect x="0" y="0" width="60" height="20" />
72 <rect x="60" y="0" width="60" height="20" />
73 <rect x="120" y="0" width="60" height="20" />
74 <rect x="180" y="0" width="60" height="20" />
75 <rect x="240" y="0" width="60" height="20" />
76 </g>
77
78 <text x="30" y="15" class="label">&lt;rect&gt;</text>
79
80 <g id="rectSamples" fill="gold" stroke="black">
81 <!-- No info -->
82 <rect transform="translate(60, 0)" x="20" y="3" width="20" height="14" />
83
84 <!-- title -->
85 <rect transform="translate(120, 0)" x="20" y="3" width="20" height="14" >
86 <title>&lt;rect&gt; with title only</title>
87 </rect>
88
89 <!-- desc -->
90 <rect transform="translate(180, 0)" x="20" y="3" width="20" height="14">
91 <desc>&lt;rect&gt; with &lt;desc&gt; only</desc>
92 </rect>
93
94 <!-- title and desc -->
95 <rect transform="translate(240, 0)" x="20" y="3" width="20" height="14">
96 <title>Title: &lt;rect&gt; with title and &lt;desc&gt;</title>
97 <desc>Description: &lt;rect&gt; with title and &lt;desc&gt;</desc>
98 </rect>
99 </g>
100 </g> <!-- "rectRow" -->
101
102 <g id="circleRow" transform="translate(0, 40)">
103 <g fill="white" stroke="black">
104 <rect x="0" y="0" width="60" height="20" />
105 <rect x="60" y="0" width="60" height="20" />
106 <rect x="120" y="0" width="60" height="20" />
107 <rect x="180" y="0" width="60" height="20" />
108 <rect x="240" y="0" width="60" height="20" />
109 </g>
110
111 <text x="30" y="15" class="label">&lt;circle&gt;</text>
112
113 <g id="circleSamples" fill="gold" stroke="black">
114 <!-- No info -->
115 <circle transform="translate(60, 0)" cx="30" cy="10" r="8" />
116
117 <!-- title -->
118 <circle transform="translate(120, 0)" cx="30" cy="10" r="8" >
119 <title>&lt;circle&gt; with &lt;title&gt; only</title>
120 </circle>
121
122 <!-- desc -->
123 <circle transform="translate(180, 0)" cx="30" cy="10" r="8" >
124 <desc>&lt;circle&gt; with &lt;desc&gt; only</desc>
125 </circle>
126
127 <!-- title and desc -->
128 <circle transform="translate(240, 0)" cx="30" cy="10" r="8" >
129 <title>Title: &lt;circle&gt; with &lt;title&gt; and &lt;desc&gt;</title>
130 <desc>Description: &lt;circle&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
131 </circle>
132 </g>
133 </g> <!-- "circleRow" -->
134
135
136 <g id="ellipseRow" transform="translate(0, 60)">
137 <g fill="white" stroke="black">
138 <rect x="0" y="0" width="60" height="20" />
139 <rect x="60" y="0" width="60" height="20" />
140 <rect x="120" y="0" width="60" height="20" />
141 <rect x="180" y="0" width="60" height="20" />
142 <rect x="240" y="0" width="60" height="20" />
143 </g>
144
145 <text x="30" y="15" class="label">&lt;ellipse&gt;</text>
146
147 <g id="ellipseSamples" fill="gold" stroke="black">
148 <!-- No info -->
149 <ellipse transform="translate(60, 0)" cx="30" cy="10" rx="20" ry="5" />
150
151 <!-- title -->
152 <ellipse transform="translate(120, 0)" cx="30" cy="10" rx="20" ry="5" >
153 <title>&lt;ellipse&gt; with &lt;title&gt; only</title>
154 </ellipse>
155
156 <!-- desc -->
157 <ellipse transform="translate(180, 0)" cx="30" cy="10" rx="20" ry="5" >
158 <desc>&lt;ellipse&gt; with &lt;desc&gt; only</desc>
159 </ellipse>
160
161 <!-- title and desc -->
162 <ellipse transform="translate(240, 0)" cx="30" cy="10" rx="20" ry="5" >
163 <title>Title: &lt;ellipse&gt; with &lt;title&gt; and &lt;desc&gt;</title>
164 <desc>Description: &lt;ellipse&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
165 </ellipse>
166 </g>
167 </g> <!-- "ellipseRow" -->
168
169 <g id="lineRow" transform="translate(0, 80)">
170 <g fill="white" stroke="black">
171 <rect x="0" y="0" width="60" height="20" />
172 <rect x="60" y="0" width="60" height="20" />
173 <rect x="120" y="0" width="60" height="20" />
174 <rect x="180" y="0" width="60" height="20" />
175 <rect x="240" y="0" width="60" height="20" />
176 </g>
177
178 <text x="30" y="15" class="label">&lt;line&gt;</text>
179
180 <g id="lineSamples" stroke="black" stroke-width="4">
181 <!-- No info -->
182 <line transform="translate(60, 0)" x1="5" y1="10" x2="55" y2="10" />
183
184 <!-- title -->
185 <line transform="translate(120, 0)" x1="5" y1="10" x2="55" y2="10" >
186 <title>&lt;line&gt; with &lt;title&gt; only</title>
187 </line>
188
189 <!-- desc -->
190 <line transform="translate(180, 0)" x1="5" y1="10" x2="55" y2="10" >
191 <desc>&lt;line&gt; with &lt;desc&gt; only</desc>
192 </line>
193
194 <!-- title and desc -->
195 <line transform="translate(240, 0)" x1="5" y1="10" x2="55" y2="10" >
196 <title>Title: &lt;line&gt; with &lt;title&gt; and &lt;desc&gt;</title>
197 <desc>Description: &lt;line&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
198 </line>
199 </g>
200 </g> <!-- "lineRow" -->
201
202 <g id="polylineRow" transform="translate(0, 100)">
203 <g fill="white" stroke="black">
204 <rect x="0" y="0" width="60" height="20" />
205 <rect x="60" y="0" width="60" height="20" />
206 <rect x="120" y="0" width="60" height="20" />
207 <rect x="180" y="0" width="60" height="20" />
208 <rect x="240" y="0" width="60" height="20" />
209 </g>
210
211 <text x="30" y="15" class="label">&lt;polyline&gt;</text>
212
213 <g id="polylineSamples" stroke="black" fill="orange">
214 <!-- No info -->
215 <polyline transform="translate(60, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10"/>
216
217 <!-- title -->
218 <polyline transform="translate(120, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
219 <title>&lt;polyline&gt; with &lt;title&gt; only</title>
220 </polyline>
221
222 <!-- desc -->
223 <polyline transform="translate(180, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
224 <desc>&lt;polyline&gt; with &lt;desc&gt; only</desc>
225 </polyline>
226
227 <!-- title and desc -->
228 <polyline transform="translate(240, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
229 <title>Title: &lt;polyline&gt; with &lt;title&gt; and &lt;desc&gt;</title>
230 <desc>Description: &lt;polyline&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
231 </polyline>
232 </g>
233 </g> <!-- "polylineRow" -->
234
235 <g id="polygonRow" transform="translate(0, 120)">
236 <g fill="white" stroke="black">
237 <rect x="0" y="0" width="60" height="20" />
238 <rect x="60" y="0" width="60" height="20" />
239 <rect x="120" y="0" width="60" height="20" />
240 <rect x="180" y="0" width="60" height="20" />
241 <rect x="240" y="0" width="60" height="20" />
242 </g>
243
244 <text x="30" y="15" class="label">&lt;polygon&gt;</text>
245
246 <g id="polygonSamples" stroke="black" fill="orange">
247 <!-- No info -->
248 <polygon transform="translate(60, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10"/>
249
250 <!-- title -->
251 <polygon transform="translate(120, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
252 <title>&lt;polygon&gt; with &lt;title&gt; only</title>
253 </polygon>
254
255 <!-- desc -->
256 <polygon transform="translate(180, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
257 <desc>&lt;polygon&gt; with &lt;desc&gt; only</desc>
258 </polygon>
259
260 <!-- title and desc -->
261 <polygon transform="translate(240, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10">
262 <title>Title: &lt;polygon&gt; with &lt;title&gt; and &lt;desc&gt;</title>
263 <desc>Description: &lt;polygon&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
264 </polygon>
265 </g>
266 </g> <!-- "polygonRow" -->
267
268
269 <g id="pathRow" transform="translate(0, 140)">
270 <g fill="white" stroke="black">
271 <rect x="0" y="0" width="60" height="20" />
272 <rect x="60" y="0" width="60" height="20" />
273 <rect x="120" y="0" width="60" height="20" />
274 <rect x="180" y="0" width="60" height="20" />
275 <rect x="240" y="0" width="60" height="20" />
276 </g>
277
278 <text x="30" y="15" class="label">&lt;path&gt;</text>
279
280 <g id="pathSamples" stroke="black" fill="orange">
281 <!-- No info -->
282 <path transform="translate(60, 0)" d="M5,10l0,5l25,0l0,-10l25,0l0,5Z"/>
283
284 <!-- title -->
285 <path transform="translate(120, 0)" d="M5,10l0,5l25,0l0,-10l25,0l0,5Z">
286 <title>&lt;path&gt; with &lt;title&gt; only</title>
287 </path>
288
289 <!-- desc -->
290 <path transform="translate(180, 0)" d="M5,10l0,5l25,0l0,-10l25,0l0,5Z">
291 <desc>&lt;path&gt; with &lt;desc&gt; only</desc>
292 </path>
293
294 <!-- title and desc -->
295 <path transform="translate(240, 0)" d="M5,10l0,5l25,0l0,-10l25,0l0,5Z">
296 <title>Title: &lt;path&gt; with &lt;title&gt; and &lt;desc&gt;</title>
297 <desc>Description: &lt;path&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
298 </path>
299 </g>
300 </g> <!-- "pathRow" -->
301
302 <g id="imageRow" transform="translate(0, 160)">
303 <g fill="white" stroke="black">
304 <rect x="0" y="0" width="60" height="20" />
305 <rect x="60" y="0" width="60" height="20" />
306 <rect x="120" y="0" width="60" height="20" />
307 <rect x="180" y="0" width="60" height="20" />
308 <rect x="240" y="0" width="60" height="20" />
309 </g>
310
311 <text x="30" y="15" class="label">&lt;image&gt;</text>
312
313 <g id="imageSamples" stroke="black" fill="orange">
314 <!-- No info -->
315 <image transform="translate(60, 0)" x="8" y="2" width="43" height="18" xlink:href="../../resources/images/tde.jpg"/>
316
317 <!-- title -->
318 <image transform="translate(120, 0)" x="8" y="2" width="43" height="18" xlink:href="../../resources/images/tde.jpg">
319 <title>&lt;image&gt; with &lt;title&gt; only</title>
320 </image>
321
322 <!-- desc -->
323 <image transform="translate(180, 0)" x="8" y="2" width="43" height="18" xlink:href="../../resources/images/tde.jpg">
324 <desc>&lt;image&gt; with &lt;desc&gt; only</desc>
325 </image>
326
327 <!-- title and desc -->
328 <image transform="translate(240, 0)" x="8" y="2" width="43" height="18" xlink:href="../../resources/images/tde.jpg">
329 <title>Title: &lt;image&gt; with &lt;title&gt; and &lt;desc&gt;</title>
330 <desc>Description: &lt;image&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
331 </image>
332 </g>
333 </g> <!-- "imageRow" -->
334
335 <g id="textRow" transform="translate(0, 180)">
336 <g fill="white" stroke="black">
337 <rect x="0" y="0" width="60" height="20" />
338 <rect x="60" y="0" width="60" height="20" />
339 <rect x="120" y="0" width="60" height="20" />
340 <rect x="180" y="0" width="60" height="20" />
341 <rect x="240" y="0" width="60" height="20" />
342 </g>
343
344 <text x="30" y="15" class="label">&lt;text&gt;</text>
345
346 <g id="textSamples" stroke="none" fill="crimson" text-anchor="middle">
347 <!-- No info -->
348 <text transform="translate(60, 0)" x="30" y="15">Ho, la, la!</text>
349
350 <!-- title -->
351 <text transform="translate(120, 0)" x="30" y="15">Ho, la, la!
352 <title>&lt;text&gt; with &lt;title&gt; only</title>
353 </text>
354
355 <!-- desc -->
356 <text transform="translate(180, 0)" x="30" y="15">Ho, la, la!
357 <desc>&lt;text&gt; with &lt;desc&gt; only</desc>
358 </text>
359
360 <!-- title and desc -->
361 <text transform="translate(240, 0)" x="30" y="15">Ho, la, la!
362 <title>Title: &lt;text&gt; with &lt;title&gt; and &lt;desc&gt;</title>
363 <desc>Description: &lt;text&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
364 </text>
365 </g>
366 </g> <!-- "textRow" -->
367
368 <g id="useRow" transform="translate(0, 200)">
369 <g fill="white" stroke="black">
370 <rect x="0" y="0" width="60" height="20" />
371 <rect x="60" y="0" width="60" height="20" />
372 <rect x="120" y="0" width="60" height="20" />
373 <rect x="180" y="0" width="60" height="20" />
374 <rect x="240" y="0" width="60" height="20" />
375 </g>
376
377 <text x="30" y="15" class="label">&lt;use&gt;</text>
378
379 <g id="useSamples" stroke="none" fill="none">
380 <!-- No info -->
381 <use transform="translate(60, 0)" x="20" y="3"
382 xlink:href="#useElem"/>
383
384 <!-- title -->
385 <use transform="translate(120, 0)" x="20" y="3"
386 xlink:href="#useElem">
387 <title>&lt;use&gt; with &lt;title&gt; only</title>
388 </use>
389
390 <!-- desc -->
391 <use transform="translate(180, 0)" x="20" y="3"
392 xlink:href="#useElem">
393 <desc>&lt;use&gt; with &lt;desc&gt; only</desc>
394 </use>
395
396 <!-- title and desc -->
397 <use transform="translate(240, 0)" x="20" y="3"
398 xlink:href="#useElem">
399 <title>Title: &lt;use&gt; with &lt;title&gt; and &lt;desc&gt;</title>
400 <desc>Description: &lt;use&gt; with &lt;desc&gt; and &lt;desc&gt;</desc>
401 </use>
402 </g>
403 </g> <!-- "textRow" -->
404 </g> <!-- id="graphicsElementsTable" -->
405
406 <g id="toolTipOverlaps" transform="translate(75, 300)">
407
408 <g fill="#eeeeee" stroke="black">
409 <rect x="60" width="120" height="20" />
410 <rect x="180" width="120" height="20" />
411 <rect x="40" y="20" width="20" height="80" />
412 <rect x="40" y="100" width="20" height="80" />
413
414 <rect y="20" x="60" width="120" height="80" fill="white" />
415 <rect y="100" x="60" width="120" height="80" fill="white" />
416 <rect y="20" x="180" width="120" height="80" fill="white" />
417 <rect y="100" x="180" width="120" height="80" fill="white" />
418
419 <g class="label" stroke="none" fill="black">
420 <text x="120" y="15">Orange w/ Tip</text>
421 <text x="240" y="15">Orange wo/ Tip</text>
422 <text transform="rotate(-90, 55, 60)" x="55" y="60">Red w/Tip</text>
423 <text transform="rotate(-90, 55, 140)" x="55" y="140">Red wo/Tip</text>
424 </g>
425
426 <!-- ============================== -->
427 <!-- Top Left -->
428 <!-- red w tip, -->
429 <!-- orange w tip. -->
430 <!-- Tip on red and orange. Orange -->
431 <!-- tip on intersection. -->
432 <!-- ============================== -->
433 <g transform="translate(60, 20)">
434 <rect x="10" y="10" width="50" height="50" fill="crimson">
435 <title>Red &lt;rect&gt; with tip</title>
436 </rect>
437 <rect x="30" y="30" width="80" height="40" fill="orange">
438 <title>Orange &lt;rect&gt; with tip</title>
439 </rect>
440 </g>
441
442 <!-- ============================== -->
443 <!-- Top Right. -->
444 <!-- red w tip, -->
445 <!-- orange wo tip. -->
446 <!-- Tip on red. No tip on orange. -->
447 <!-- No tip on intersection. -->
448 <!-- ============================== -->
449 <g transform="translate(180, 20)">
450 <rect x="10" y="10" width="50" height="50" fill="crimson">
451 <title>Red &lt;rect&gt; with tip</title>
452 </rect>
453 <rect x="30" y="30" width="80" height="40" fill="orange" />
454 </g>
455
456 <!-- ============================== -->
457 <!-- Bottom Left -->
458 <!-- red wo tip, -->
459 <!-- orange w tip. -->
460 <!-- No tip on red. Tip on orange. -->
461 <!-- Orange tip on intersection. -->
462 <!-- ============================== -->
463 <g transform="translate(60, 100)">
464 <rect x="10" y="10" width="50" height="50" fill="crimson"/>
465 <rect x="30" y="30" width="80" height="40" fill="orange">
466 <title>Orange &lt;rect&gt; with tip</title>
467 </rect>
468 </g>
469
470 <!-- ============================== -->
471 <!-- Bottom Right. -->
472 <!-- red wo tip, -->
473 <!-- orange wo tip. -->
474 <!-- There should be no tooltips -->
475 <!-- shown. -->
476 <!-- ============================== -->
477 <g transform="translate(180, 100)">
478 <rect x="10" y="10" width="50" height="50" fill="crimson"/>
479 <rect x="30" y="30" width="80" height="40" fill="orange"/>
480 </g>
481
482 </g>
483 </g>
484 </g><!-- "content" -->
485
486 <!-- ============================================================= -->
487 <!-- Batik sample mark -->
488 <!-- ============================================================= -->
489 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
490
491 </svg>