CurryInfo: icurry-3.2.0 / TermGraph.SVG.drawSvg

definition:
 
drawSvg :: Maybe Dimensions -> DGGraph -> NodeID -> [ChoiceMapping] -> XmlExp
drawSvg dims drawGraph root chMap =
  let deepestNd = filter ((==(maximum (map depthDG drawGraph))) . depthDG)
                         drawGraph
      dgHeight  = toFloat $ depthDG (head deepestNd) +
                    if length (concatMap childrenDG deepestNd) > 0
                      then 2
                      else 1
      dgWidth   = toFloat (graphWidth drawGraph root)
      calcX     = dgWidth * 140
      calcY     = max (dgHeight * 80) 400.0
      dimX      = fromMaybe (max calcX calcY) (fst <$> dims)
      dimY      = fromMaybe dimX (snd <$> dims)
  in XElem "svg" [("viewbox", "0 0 " ++ show dimX ++ " " ++ show dimY),
                  ("xmlns", "http://www.w3.org/2000/svg")]
               (fst (graphSvgRek
                  (dimY / dgHeight)
                  (dimX / dgWidth)
                  0
                  root
                  drawGraph
                  chMap
                  []))
demand:
 no demanded arguments
deterministic:
 deterministic operation
documentation:
 
Draw a svg of a given draw-Graph
failfree:
 <FAILING>
indeterministic:
 referentially transparent operation
infix:
 no fixity defined
iotype:
 {(_,_,_,_) |-> {XElem}}
name:
 drawSvg
precedence:
 no precedence defined
result-values:
 {XElem}
signature:
 Prelude.Maybe (Prelude.Float, Prelude.Float) -> [DGNode] -> Prelude.Int
-> [(Prelude.Int, Prelude.Int)] -> XML.XmlExp
solution-complete:
 operation might suspend on free variables
terminating:
 possibly non-terminating
totally-defined:
 possibly non-reducible on same data term