]> granicus.if.org Git - graphviz/commitdiff
The use of commas should only be done in client-map maps. Restore previous code
authorerg <devnull@localhost>
Mon, 31 Jan 2011 20:20:39 +0000 (20:20 +0000)
committererg <devnull@localhost>
Mon, 31 Jan 2011 20:20:39 +0000 (20:20 +0000)
for server-side maps.

plugin/core/gvrender_core_map.c

index fa0bdfa166d698bc84a6df86670de184c08878b4..7f66b79947c8308e0955c61d17b522f7895c4f09 100644 (file)
@@ -48,7 +48,7 @@ static void map_output_shape (GVJ_t *job, map_shape_t map_shape, pointf * AF, in
         switch (map_shape) {
         case MAP_RECTANGLE:
            /* Y_GOES_DOWN so need UL to LR */
-            gvprintf(job, "rect %s %d,%d,%d,%d\n", url,
+            gvprintf(job, "rect %s %d,%d %d,%d\n", url,
                 A[0].x, A[1].y, A[1].x, A[0].y);
             break;
         case MAP_CIRCLE:
@@ -57,9 +57,8 @@ static void map_output_shape (GVJ_t *job, map_shape_t map_shape, pointf * AF, in
             break;
         case MAP_POLYGON:
             gvprintf(job, "poly %s", url);
-            gvprintf(job, " %d,%d", A[0].x, A[0].y);
-            for (i = 1; i < nump; i++)
-                gvprintf(job, ",%d,%d", A[i].x, A[i].y);
+            for (i = 0; i < nump; i++)
+                gvprintf(job, " %d,%d", A[i].x, A[i].y);
             gvputs(job, "\n");
             break;
         default: