]> granicus.if.org Git - graphviz/commitdiff
fix bug with sign of radius value in mapping of circles
authorellson <devnull@localhost>
Thu, 6 Dec 2007 14:12:13 +0000 (14:12 +0000)
committerellson <devnull@localhost>
Thu, 6 Dec 2007 14:12:13 +0000 (14:12 +0000)
reported by: Skye Bender-deMoll <skyebend@skyeome.net>
(and Greg)

lib/common/emit.c

index 14523e4a8619acdb68e190af5a7e488048dc6524..d1e4eeafa84e747f5fcdfde97cc93dfc77b93e9c 100644 (file)
@@ -1067,8 +1067,9 @@ static void emit_begin_node(GVJ_t * job, node_t * n)
                     p = N_NEW(nump, pointf);
                     p[0].x = coord.x;
                     p[0].y = coord.y;
-                    p[1].x = coord.x + vertices[peripheries - 1].x;
-                    p[1].y = coord.y + vertices[peripheries - 1].y;
+                   /* ... but vertices contains LL cornet of bb */
+                    p[1].x = coord.x - vertices[peripheries - 1].x;
+                    p[1].y = coord.y - vertices[peripheries - 1].y;
                 }
                 else { /* ellipse is treated as polygon */
                     obj->url_map_shape= MAP_POLYGON;
@@ -1078,7 +1079,7 @@ static void emit_begin_node(GVJ_t * job, node_t * n)
                         p[i].x += coord.x;
                         p[i].y += coord.y;
                     }
-                }
+               }
             }
             /* all other polygonal shape */
             else {