CurryInfo: icurry-3.2.0 / TermGraph.SVG.treeSvg

definition: Info
 
treeSvg :: Int -> Maybe Dimensions -> (Graph, [ChoiceMapping], NodeID) -> XmlExp
treeSvg maxDepth dims (graph, chMap, root) =
  let (drawGraph, depth) = constructDGraph maxDepth graph root
      calcX      = toFloat ((width drawGraph) * 140)
      calcY      = max (toFloat depth * 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")]
           (treeSvgRek
              maxDepth
              0
              (dimY / (toFloat depth))
              (dimX / (toFloat $ width drawGraph))
              0
              drawGraph
              chMap)
demand: Info
 argument 3
deterministic: Info
 deterministic operation
documentation: Info
 
Draw a svg-tree of a given graph
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,{(,,)}) |-> {XElem}}
name: Info
 treeSvg
precedence: Info
 no precedence defined
result-values: Info
 {XElem}
signature: Info
 Prelude.Int -> Prelude.Maybe (Prelude.Float, Prelude.Float)
-> ([Node], [(Prelude.Int, Prelude.Int)], Prelude.Int) -> XML.XmlExp
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term