]> granicus.if.org Git - graphviz/commitdiff
fix #1295 - scaling of the arrow shaft for vee arrows
authorellson <devnull@localhost>
Fri, 29 Feb 2008 22:00:16 +0000 (22:00 +0000)
committerellson <devnull@localhost>
Fri, 29 Feb 2008 22:00:16 +0000 (22:00 +0000)
lib/common/emit.c
lib/common/render.h

index ad45a32f33fc0f4af502415fea781da3bd85ec70..ec96800d25a8cdb68e33646ee9d95ecae041d9ff 100644 (file)
@@ -1264,14 +1264,14 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles)
     bezierf bzf;
     splinesf offspl, tmpspl;
     pointf pf0, pf1, pf2 = { 0, 0 }, pf3, *offlist, *tmplist;
-    double scale, numc2;
+    double arrowsize, numc2;
     char* p;
 
 #define SEP 2.0
 
     setColorScheme (agget (e, "colorscheme"));
     if (ED_spl(e)) {
-       scale = late_double(e, E_arrowsz, 1.0, 0.0);
+       arrowsize = late_double(e, E_arrowsz, 1.0, 0.0);
        color = late_string(e, E_color, "");
 
        /* need to know how many colors separated by ':' */
@@ -1383,7 +1383,7 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles)
                    }
                }
                arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0],
-                       scale, job->obj->penwidth, bz.sflag);
+                       arrowsize, job->obj->penwidth, bz.sflag);
            }
            if (bz.eflag) {
                if (color != headcolor) {
@@ -1394,7 +1394,7 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles)
                    }
                }
                arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1],
-                       scale, job->obj->penwidth, bz.eflag);
+                       arrowsize, job->obj->penwidth, bz.eflag);
            }
            free(colors);
            for (i = 0; i < offspl.size; i++) {
@@ -1428,11 +1428,11 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles)
                                         FALSE, FALSE);
                    if (bz.sflag) {
                        arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0],
-                               scale, job->obj->penwidth, bz.sflag);
+                               arrowsize, job->obj->penwidth, bz.sflag);
                    }
                    if (bz.eflag) {
                        arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1],
-                               scale, job->obj->penwidth, bz.eflag);
+                               arrowsize, job->obj->penwidth, bz.eflag);
                    }
                     /* arrow_gen resets the job style 
                      * If we have more splines to do, restore the old one.
index 22d5a84d17870728facbf42300327582ef5b05e5..dd0c863839e8980da65df6ee040bf48ea186c287 100644 (file)
@@ -65,9 +65,9 @@ extern "C" {
 
     extern void add_box(path *, box);
     extern void arrow_flags(Agedge_t * e, int *sflag, int *eflag);
-    extern boxf arrow_bb(pointf p, pointf u, double scale, int flag);
+    extern boxf arrow_bb(pointf p, pointf u, double arrowsize, int flag);
     extern void arrow_gen(GVJ_t * job, emit_state_t emit_state, point p, point u,
-                         double scale, double penwidth, int flag);
+                         double arrowsize, double penwidth, int flag);
     extern double arrow_length(edge_t * e, int flag);
     extern int arrowEndClip(edge_t*, point*, int, int , bezier*, int eflag);
     extern int arrowStartClip(edge_t*, point* ps, int, int, bezier*, int sflag);