Debian Codegraph @

samples/tests/spec/scripting/textSelection.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 <!-- Test description here -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ========================================================================= -->
29 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
30 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="500" viewBox="0 0 450 500">
31 <!-- ============================================================= -->
32 <!-- Test content -->
33 <!-- ============================================================= -->
34
35 <defs>
36 <filter id="dropShadow" filterUnits="userSpaceOnUse" >
37 <feGaussianBlur stdDeviation="2" in="SourceAlpha" />
38 <feOffset dx="2" dy="2" />
39 <feMerge>
40 <feMergeNode />
41 <feMergeNode in="SourceGraphic" />
42 </feMerge>
43 </filter>
44 </defs>
45
46 <g id="testContent">
47 <text x="50%" y="50%" font-size="40" text-anchor="middle" fill="white" filter="url(#dropShadow)" transform="translate(0, -40)">
48 Multi-line
49 <tspan x="50%" y="60%">Text Selection with</tspan>
50 <tspan x="50%" y="70%"><tspan font-size="25" dy="-25">ups</tspan><tspan dy="25"> and </tspan><tspan font-size="25" dy="25">downs</tspan></tspan>
51 </text>
52 </g>
53
54 <script type="text/ecmascript"><![CDATA[
55
56 function onZoom() {
57 var content = document.getElementById("testContent");
58 content.setAttributeNS(null, "transform", "translate(225, 250) rotate(-30) scale(1.5, 1.5) translate(-225, -250)");
59 }
60
61 function onDone() {
62 if (!(regardTestInstance == null)) {
63 regardTestInstance.scriptDone();
64 } else {
65 alert("This button only works when run in the regard framework");
66 }
67 }
68 ]]></script>
69
70 <g id="zoom" transform="translate(155, 398)" cursor="pointer" onclick="onZoom()">
71 <rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" />
72 <text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Zoom</text>
73 </g>
74
75 <g id="done" transform="translate(235, 398)" cursor="pointer" onmouseover="onDone()">
76 <rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" />
77 <text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Done</text>
78 </g>
79
80 <!-- ============================================================= -->
81 <!-- Batik sample mark -->
82 <!-- ============================================================= -->
83 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
84
85 </svg>