Add Some Figures
[ipdf/sam.git] / figures / shape.html
diff --git a/figures/shape.html b/figures/shape.html
new file mode 100644 (file)
index 0000000..f130d83
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+       <title>Interactive SVG with Javascript</title>
+<script type="text/javascript" id="ohgodnowhatamIdoing">
+       var count = 0;
+       function interact()
+       {
+               setTimeout(function () {
+                       var colour = (count % 2 == 0) ? "#000000" : "#00ff00";
+                       document.getElementById("rect1").style.fill = colour;
+                       count += 1;
+               },1000);
+       }
+</script>
+</head>
+<body>
+<svg id="svg_example" xmlns="http://www.w3.org/2000/svg"
+       version="1.1" width="104" height="186">
+<path id="straightline" d = "m 0, 0 104, 186" style="stroke:#000000;"/>
+<rect id="rect1"
+       x = "30" y = "20" width = "30" height = "150"
+       style = "fill:#0000ff; fill-opacity:0.5; stroke:#000000;"/>
+<path id="path"
+       d = "m 57,185 c 0,0 57,-13 32,-43 -25,-30 -53,2 -25,-30 28,
+               -32 52,17 28,-32 -24,-50 -16,44 -35,12 -19,-32 13,-64 13,
+               -64 0,0 40,-50 -0,-14 -40,36 -94,68 -59,109 35,41 45,62 45,62 z"
+       style = "fill:#ff0000; fill-opacity:0.75; stroke:#000000;"/>
+<rect id="rect2"
+       x = "12" y = "130" width = "60" height = "20"
+       style = "fill:#00ff00; fill-opacity:0.5; stroke:#000000;"/>
+</svg>
+<img src="shape.svg"/>
+
+<button id="ohdearabutton" onclick="interact();">Asplode</button>
+
+
+</body>
+</html>

UCC git Repository :: git.ucc.asn.au