]> granicus.if.org Git - graphviz/commitdiff
addEdgeLabels: remove unused parameters
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Mar 2022 04:18:25 +0000 (20:18 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Mar 2022 18:32:34 +0000 (11:32 -0700)
The use of separate points to the edge itself was removed in commit
24c4a1ce2994b624ba680c74a33aef60ec16de21 in 2011.

lib/common/render.h
lib/common/routespl.c
lib/common/splines.c
lib/neatogen/multispline.c
lib/neatogen/neatosplines.c
lib/ortho/ortho.c

index fca6d89296af36a8158c14cc7abed7b81baa6f43..83703e7f0aeb7b2783729fca55e09020ce949113 100644 (file)
@@ -124,7 +124,7 @@ extern "C" {
     RENDER_API int place_portlabel(edge_t * e, bool head_p);
     RENDER_API void makePortLabels(edge_t * e);
     RENDER_API pointf edgeMidpoint(graph_t* g, edge_t * e);
-    RENDER_API void addEdgeLabels(edge_t * e, pointf rp, pointf rq);
+    RENDER_API void addEdgeLabels(edge_t *e);
     RENDER_API void pop_obj_state(GVJ_t *job);
     RENDER_API obj_state_t* push_obj_state(GVJ_t *job);
     RENDER_API int rank(graph_t * g, int balance, int maxiter);
index d8715af245f953f8c26cc5068ff53ebe9bdf044a..f1f29940652d19cb77c8199b27eb591b187c2085 100644 (file)
@@ -1115,7 +1115,7 @@ makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* si
     if (e_cnt == 1 || Concentrate) {
        if (curved) bend(dumb,get_cycle_centroid(g, edges[0]));
        clip_and_install(e, aghead(e), dumb, 4, sinfo);
-       addEdgeLabels(e, p, q);
+       addEdgeLabels(e);
        return;
     }
 
@@ -1171,7 +1171,7 @@ makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* si
        else
            clip_and_install(e0, aghead(e0), dumber, 4, sinfo);
 
-       addEdgeLabels(e0, p, q);
+       addEdgeLabels(e0);
        dumb[1].x += del.x;
        dumb[1].y += del.y;
        dumb[2].x += del.x;
index 1ddab3aa8a5c31fa135baf73d143f5650f3c41eb..bc07b2fa6167c97a6f02bd8600cda6c672dda7fe 100644 (file)
@@ -1341,15 +1341,11 @@ edgeMidpoint (graph_t* g, edge_t * e)
 #define MAXLABELWD  (POINTS_PER_INCH/2.0)
 
 /* addEdgeLabels:
- * rp and rq are the port points of the tail and head node.
  * Adds label, headlabel and taillabel.
  * Updates bounding box.
- * We try to use the actual endpoints of the spline, as they may differ
- * significantly from rp and rq, but if the spline is degenerate (e.g.,
- * the nodes overlap), we use rp and rq.
+ * We use the endpoints of the spline.
  */
-void addEdgeLabels(edge_t * e, pointf rp, pointf rq)
-{
+void addEdgeLabels(edge_t *e) {
     makePortLabels(e);
 }
 
index 3fa371ae8df7f6d8094be98cecc70b2d66fe7d83..24dac296950d44b0c89f58d0b0c6474f074d81c6 100644 (file)
@@ -738,7 +738,7 @@ static void finishEdge(edge_t* e, Ppoly_t spl, int flip, pointf p, pointf q) {
     clip_and_install(e, aghead(e), spline, spl.pn, &sinfo);
     free(spline);
 
-    addEdgeLabels(e, p1, q1);
+    addEdgeLabels(e);
 }
 
 #define EQPT(p,q) (((p).x==(q).x)&&((p).y==(q).y))
index ab1e9f27bbf4945469efa7f4409b59ddbc5bc2b7..d3b02373b944b300728271753754772e44cf7213 100644 (file)
@@ -481,7 +481,7 @@ static void makePolyline(edge_t * e) {
     if (Verbose > 1)
        fprintf(stderr, "polyline %s %s\n", agnameof(agtail(e)), agnameof(aghead(e)));
     clip_and_install(e, aghead(e), spl.ps, spl.pn, &sinfo);
-    addEdgeLabels(e, p0, q0);
+    addEdgeLabels(e);
 }
 
 /* makeSpline:
@@ -528,7 +528,7 @@ void makeSpline(edge_t *e, Ppoly_t **obs, int npoly, bool chkPts) {
        fprintf(stderr, "spline %s %s\n", agnameof(agtail(e)), agnameof(aghead(e)));
     clip_and_install(e, aghead(e), spline.ps, spline.pn, &sinfo);
     free(barriers);
-    addEdgeLabels(e, p, q);
+    addEdgeLabels(e);
 }
 
   /* True if either head or tail has a port on its boundary */
@@ -616,9 +616,9 @@ static int _spline_edges(graph_t * g, expand_t* pmargin, int edgetype)
 /* fprintf (stderr, "%s -- %s %d\n", agnameof(agtail(e)), agnameof(aghead(e)), ED_count(e)); */
            node_t *head = aghead(e);
            if (useEdges && ED_spl(e)) {
-               addEdgeLabels(e,
-                             add_pointf(ND_coord(n), ED_tail_port(e).p),
-                             add_pointf(ND_coord(head), ED_head_port(e).p));
+               add_pointf(ND_coord(n), ED_tail_port(e).p);
+               add_pointf(ND_coord(head), ED_head_port(e).p);
+               addEdgeLabels(e);
            } 
            else if (ED_count(e) == 0) continue;  /* only do representative */
            else if (n == head) {    /* self arc */
index 0a0d923d6a8f0855285ebbbb2f734840277f95f1..a87168381cabc5bec168bc56ee8c4f320d40bd1b 100644 (file)
@@ -1205,7 +1205,7 @@ attachOrthoEdges(maze* mp, size_t n_edges, route* route_list, splineInfo *sinfo,
            fprintf(stderr, "ortho %s %s\n", agnameof(agtail(e)),agnameof(aghead(e)));
        clip_and_install(e, aghead(e), ispline, npts, sinfo);
        if (doLbls && (lbl = ED_label(e)) && !lbl->set)
-           addEdgeLabels(e, p1, q1);
+           addEdgeLabels(e);
     }
     free(ispline);
 }