]> granicus.if.org Git - graphviz/commitdiff
new fix for #1388
authorellson <devnull@localhost>
Thu, 14 Aug 2008 16:10:05 +0000 (16:10 +0000)
committerellson <devnull@localhost>
Thu, 14 Aug 2008 16:10:05 +0000 (16:10 +0000)
lib/common/labels.c

index ebc7c988dcc7bcee3219efebf927ac49e92755fb..3e39c926275870478f0cc51a938864c2da88390b 100644 (file)
@@ -194,7 +194,7 @@ void emit_label(GVJ_t * job, emit_state_t emit_state, textlabel_t * lp)
     p.y = lp->p.y;
 
     /* dimensions of box for label, no padding, adjusted for resizing */
-    halfwidth_x = (lp->dimen.x + lp->d.x) / 2.0;
+    halfwidth_x = MAX(lp->d.x, (lp->dimen.x / 2.0));
 
     center_x = p.x;
     left_x = center_x - halfwidth_x;