]> granicus.if.org Git - graphviz/commitdiff
Fix bug when rankdir=BT and graph has a label. The graph was not being
authorellson <devnull@localhost>
Tue, 18 Oct 2005 19:04:50 +0000 (19:04 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 19:04:50 +0000 (19:04 +0000)
translated enough for the label

lib/common/postproc.c

index 9b82f0586a2f7379ff4207cf3beee8699d3f8412..cdbd570d6abd1dc9faca7eaa3b66323d84eb2d70 100644 (file)
@@ -250,9 +250,15 @@ void dotneato_postprocess(Agraph_t * g)
            }
        } else {
            if (GD_label_pos(g) & LABEL_AT_TOP) {
-               GD_bb(g).UR.y += d.y;
+               if (Rankdir == RANKDIR_TB)
+                   GD_bb(g).UR.y += d.y;
+               else
+                   GD_bb(g).LL.y -= d.y;
            } else {
-               GD_bb(g).LL.y -= d.y;
+               if (Rankdir == RANKDIR_TB)
+                   GD_bb(g).LL.y -= d.y;
+               else
+                   GD_bb(g).UR.y += d.y;
            }
 
            if (d.x > GD_bb(g).UR.x - GD_bb(g).LL.x) {