]> granicus.if.org Git - graphviz/commitdiff
GD_border(g) in fp
authorellson <devnull@localhost>
Thu, 11 Sep 2008 02:40:24 +0000 (02:40 +0000)
committerellson <devnull@localhost>
Thu, 11 Sep 2008 02:40:24 +0000 (02:40 +0000)
lib/common/input.c
lib/common/types.h

index 7487be4be3547ef930d63090d2ed84f7f8671929..a72a8c6a7d104a51e2984ea66adcbae6018856b2 100644 (file)
@@ -771,7 +771,6 @@ void do_graph_label(graph_t * sg)
     /* it would be nice to allow multiple graph labels in the future */
     if ((str = agget(sg, "label"))) {
        char pos_flag;
-       point dpt;
        pointf dimen;
 
        GD_has_labels(sg->root) |= GRAPH_LABEL;
@@ -809,21 +808,20 @@ void do_graph_label(graph_t * sg)
         */
        dimen = GD_label(sg)->dimen;
        PAD(dimen);
-       PF2P(dimen, dpt);
        if (!GD_flip(sg->root)) {
            if (GD_label_pos(sg) & LABEL_AT_TOP)
                pos_ix = TOP_IX;
            else
                pos_ix = BOTTOM_IX;
-           GD_border(sg)[pos_ix] = dpt;
+           GD_border(sg)[pos_ix] = dimen;
        } else {
            /* when rotated, the labels will be restored to TOP or BOTTOM  */
            if (GD_label_pos(sg) & LABEL_AT_TOP)
                pos_ix = RIGHT_IX;
            else
                pos_ix = LEFT_IX;
-           GD_border(sg)[pos_ix].x = dpt.y;
-           GD_border(sg)[pos_ix].y = dpt.x;
+           GD_border(sg)[pos_ix].x = dimen.y;
+           GD_border(sg)[pos_ix].y = dimen.x;
        }
     }
 }
index c428843fd9ef596afa9ad1956efbd80f440e6dd4..1ab9486bae030d287b4c335d09a32ca8079dac18 100644 (file)
@@ -317,7 +317,7 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
        layout_t *drawing;
        textlabel_t *label;     /* if the cluster has a title */
        boxf bb;                        /* bounding box */
-       point border[4];        /* sizes of margins for graph labels */
+       pointf border[4];       /* sizes of margins for graph labels */
        unsigned char gui_state; /* Graph state for GUI ops */
        unsigned char has_labels;
        boolean has_images;