]> granicus.if.org Git - graphviz/commitdiff
preparing for SPLINESF
authorellson <devnull@localhost>
Fri, 15 Aug 2008 12:04:36 +0000 (12:04 +0000)
committerellson <devnull@localhost>
Fri, 15 Aug 2008 12:04:36 +0000 (12:04 +0000)
lib/common/postproc.c

index 08f70dca804ca9d6ec128e4dc58735ee0e6ce0d5..233de925faf46f41beb0c77385b8c21f62f4a661 100644 (file)
@@ -81,6 +81,16 @@ static void place_flip_graph_label(graph_t * g);
     closepath stroke\n\
 } def\n"
 
+#ifdef SPLINESF
+static pointf map_pointf(pointf p)
+{
+    p = ccwrotatepf(p, Rankdir*90);
+    p.x -= (double)Offset.x;
+    p.y -= (double)Offset.y;
+    return p;
+}
+#endif
+
 static point map_point(point p)
 {
     p = ccwrotatep(p, Rankdir*90);
@@ -102,12 +112,21 @@ static void map_edge(edge_t * e)
     }
     for (j = 0; j < ED_spl(e)->size; j++) {
        bz = ED_spl(e)->list[j];
+#ifdef SPLINESF
+       for (k = 0; k < bz.size; k++)
+           bz.list[k] = map_pointf(bz.list[k]);
+       if (bz.sflag)
+           ED_spl(e)->list[j].sp = map_pointf(ED_spl(e)->list[j].sp);
+       if (bz.eflag)
+           ED_spl(e)->list[j].ep = map_pointf(ED_spl(e)->list[j].ep);
+#else
        for (k = 0; k < bz.size; k++)
            bz.list[k] = map_point(bz.list[k]);
        if (bz.sflag)
            ED_spl(e)->list[j].sp = map_point(ED_spl(e)->list[j].sp);
        if (bz.eflag)
            ED_spl(e)->list[j].ep = map_point(ED_spl(e)->list[j].ep);
+#endif
     }
     if (ED_label(e))
        ED_label(e)->p = map_point(ED_label(e)->p);