Thursday, January 6, 2011

wumpus-tree

Copperbox revision 2016.

I've added annotations on nodes anchors - annotations are made on tree nodes before the tree is drawn. During the rendering process the annotation is placed correctly w.r.t. the node.

tree2 :: (Real u, Floating u, FromPtSize u) => TreeBuild u (ZTreeSpec u)
tree2 = do
    special   <- nodeId $ dotText "a"   
    rightmost <- nodeId $ dotText "z"
    annotate rightmost (\ancr -> textline "....anno" `at` southeast ancr )
    let bs = [zleaf, zleaf, zleaf]
    let gs = [zleaf, zleaf, leaf $ rightmost ]
    return $ 
      branch special [zbranch bs, zleaf, zbranch gs]


Here's the picture:

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.