]> granicus.if.org Git - graphviz/commitdiff
Fix new arrow code to compile on Windows
authorEmden Gansner <erg@research.att.com>
Mon, 21 May 2012 15:20:31 +0000 (11:20 -0400)
committerEmden Gansner <erg@research.att.com>
Mon, 21 May 2012 15:20:31 +0000 (11:20 -0400)
lib/common/arrows.c

index ddad793d3d8f0368842afbaaf7f83117a5ca51b8..097b6763b77bb1f454eae179bc9a9b75c032f4ec 100644 (file)
@@ -610,10 +610,18 @@ static void arrow_type_dot(GVJ_t * job, pointf p, pointf u, double arrowsize, do
  */
 static void arrow_type_curve(GVJ_t* job, pointf p, pointf u, double arrowsize, double penwidth, int flag)
 {
-    double const arrowwidth = penwidth > 4 ? 0.5 * penwidth / 4 : 0.5;
-    pointf const q = {p.x + u.x, p.y + u.y}, v = {-u.y * arrowwidth, u.x * arrowwidth},
-    w = {v.y, -v.x}; // same direction as u, same magnitude as v.
-    pointf AF[4], a[2] = {p, q};
+    double arrowwidth = penwidth > 4 ? 0.5 * penwidth / 4 : 0.5;
+    pointf q, v, w;
+    pointf AF[4], a[2];
+
+    q.x = p.x + u.x;
+    q.y = p.y + u.y; 
+    v.x = -u.y * arrowwidth; 
+    v.y = u.x * arrowwidth;
+    w.x = v.y; // same direction as u, same magnitude as v.
+    w.y = -v.x;
+    a[0] = p;
+    a[1] = q;
 
     AF[0].x = p.x + v.x + w.x;
     AF[0].y = p.y + v.y + w.y;