Title: PowerPointPrsentation
1XML
eXtensible Markup Language
P. Reusch
2Scalable Vector Graphics (SVG) Scripting
http//www.w3.org/TR/2001/REC-SVG-20010904/
3(No Transcript)
4lt?xml version"1.0" standalone"no"?gt lt!--
script1.svg --gt lt!DOCTYPE svg PUBLIC "-//W3C//DTD
SVG 20010904//EN" "http//www.w3.org/TR/2001/REC-S
VG-20010904/DTD/svg10.dtd"gt ltsvg width"6cm"
height"5cm" viewBox"0 0 600 500"
xmlns"http//www.w3.org/2000/svg"gt ltdescgtExample
script01 - invoke an ECMAScript function from an
onclick event lt/descgt lt!-- ECMAScript to change
the radius with each click --gt ltscript
type"text/ecmascript"gt lt!CDATAfunction
circle_click(evt) var circle evt.target var
currentRadius circle.getAttribute("r") if
(currentRadius 100) circle.setAttribute("r",
currentRadius2) else circle.setAttribute("r",
currentRadius0.5) gt lt/scriptgt lt!-- Outline
the drawing area with a blue line --gt ltrect x"1"
y"1" width"598" height"498" fill"none"
stroke"blue"/gt lt!-- Act on each click event
--gt ltcircle onclick"circle_click(evt)" cx"300"
cy"225" r"100" fill"red"/gt lttext x"300"
y"480" font-family"Verdana" font-size"35"
text-anchor"middle"gt Click auf den
Kreis lt/textgt lt/svggt
5 lt!-- Outline the drawing area with a blue line
--gt ltrect x"1" y"1" width"598" height"498"
fill"none" stroke"blue"/gt lt!-- Act on each
click event --gt ltcircle onclick"circle_click(evt)
" cx"300" cy"225" r"100" fill"red"/gt lttext
x"300" y"480" font-family"Verdana"
font-size"35" text-anchor"middle"gt Click auf
den Kreis lt/textgt lt/svggt
6lt!-- ECMAScript to change the radius with each
click --gt ltscript type"text/ecmascript"gt
lt!CDATAfunction circle_click(evt) var
circle evt.target var currentRadius
circle.getAttribute("r") if (currentRadius
100) circle.setAttribute("r", currentRadius2) el
se circle.setAttribute("r", currentRadius0.5)
gt lt/scriptgt