;; .schemedoc-dependencies "c:\programs\laml-full-32-1\lib\man\svg-extensions" "c:\programs\laml-full-32-1\lib\xml-in-laml\mirrors\man\svg11-mirror" (load (string-append laml-dir "laml.scm")) (laml-style "simple-svg11") (lib-load "svg-extensions.scm") (define grey (rgb-color-encoding 220 220 200)) (define (some-subgraph prefix) (let* ((x1 100) (x2 200) (x3 300) (y1 100) (y2 200) (node-props (list 'bg-color "yellow" 'min-height 80 ))) (let* ((n1 (svg-node circular x1 y1 (string-append prefix "1") node-props)) (n2 (svg-node circular x3 y1 (string-append prefix "2") node-props)) (n3 (svg-node circular x2 y2 (string-append prefix "3") node-props)) (e1 (svg-edge n2 n1)) (e2 (svg-edge n2 n3))) (svg-graph (list n1 n2 n3) (list e1 e2))))) (write-html '(pp prolog) (svg 'width "600" 'height "350" (let ((x1 100) (x2 200) (x3 300) (y1 100) (y2 200) (y3 250) ) (let* ((comp-props (list 'width 150 'rx 50 'padding 15 'bg-color grey)) (vn-1 (svg-node rectangular x1 y1 "s1" 'font-size 20)) (vn-2 (svg-node rectangular x1 y2 "s2" 'font-size 20)) (set-1 (svg-composite-node x3 y1 (some-subgraph "Ca") comp-props)) (set-2 (svg-composite-node x3 y3 (some-subgraph "Ba") comp-props)) (edge-1 (svg-edge vn-1 "rc" set-1 "lc" 'arrow "yes")) (edge-2 (svg-edge vn-2 "rt" set-1 "lc" 'arrow "yes" 'dy 10)) ) (svg-graph (list vn-1 vn-2 set-1 set-2) (list edge-1 edge-2))) ) ) (full-source-path-with-extension "svg") ) (end-laml)