File: test.svg

package info (click to toggle)
ruby-fastimage 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,000 kB
  • sloc: ruby: 1,442; xml: 7; sh: 3; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0"?>

<svg version="1.1" 
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="200" height="300"
     style="background-color: #D2B48C;"
     onload="loaded()">
  <script type="text/javascript"><![CDATA[
      function loaded() {
        // change onloadFunc to point to your real onload function that you
        // want called when the page is truly ready
        var onloadFunc = doload;
        
        if (top.svgweb) {
          top.svgweb.addOnLoad(onloadFunc, true, window);
        } else {
          onloadFunc();
        }
      }   
      
     function doload() {
        // developers original onload handler
        
        // add an event listener to our circle; on* style events added right
        // to the markup are not yet supported
        var circle = document.getElementById('myCircle');
        circle.addEventListener('mousedown', function(evt) {
          alert('You pressed the mouse button on our circle: ' + evt.target.id);
        }, false);
     }
  ]]></script>
  <g id="myGroup" 
     fill="blue" 
     style="font-size: 18px; text-anchor: middle; font-family: serif;">
    <circle id="myCircle"
            cx="100" cy="75" r="50"
            stroke="firebrick"
            stroke-width="3" />
    <text x="100" y="155">Hello World</text>
    <text x="100" y="175">From An SVG File!</text>
  </g>
</svg>