]> granicus.if.org Git - graphviz/commitdiff
fix #1496
authorellson <devnull@localhost>
Thu, 23 Oct 2008 13:56:42 +0000 (13:56 +0000)
committerellson <devnull@localhost>
Thu, 23 Oct 2008 13:56:42 +0000 (13:56 +0000)
lib/common/shapes.c

index 8955e7212cbe106761a1eea6a73ab1d83a73ac64..04894ff0c67d87a36d9a46548099226469875c20 100644 (file)
@@ -844,10 +844,11 @@ static void poly_init(node_t * n)
          * We assume the ellipse is defined by a scaling up of bb.
          */
        temp = bb.y * SQRT2;
-       /* if there is height to spare and the label is centered vertically */
        if (height > temp && ND_label(n)->valign == 'c') {
+           /* if there is height to spare
+            * and the label is centered vertically
+            * then just pad x in proportion to the spare height */
            bb.x *= sqrt(1. / (1. - SQR(bb.y / height)));
-           bb.y = height;
        }
        else {
            bb.x *= SQRT2;