Drawing a tree with canvas