eXept Software AG Logo

Smalltalk/X Webserver

Smalltalk Dynamic Web Pages - Source of WebDemoApp1-theSVG2:

Home

Documentation
www.exept.de
Everywhere
for:
theSVG2:aRequest
    "a reply, generating svg which is embedded by test_svg2:"

    |builder|

    "/ suppress decoration
    aRequest response replyPresenter:nil.

    builder := HTML::SVGTreeBuilder new.
    builder
       svg; 
         viewBox:(0@0 corner:270@400);
         width:'100%';
         height:'100%';
         g; id:'mainlayer';
           rect; 
             fill:'red'; stroke:'black'; x:15; y:15; width:100; height:50;
             onClick:'alert(''you clicked on red'');';
           rectEnd;
           rect; 
             fill:'blue'; stroke:'black'; x:150; y:15; width:100; height:50; rx:12; ry:18; 
             onClick:'alert(''you clicked on blue'');';
           rectEnd;
         gEnd;
       svgEnd.

    aRequest response
        nextPutAll:(builder xmlString)

Edit (disabled)
Index


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 30 Dec 2024 17:23:11 GMT