From: Emden R. Gansner Date: Tue, 9 Feb 2016 21:58:02 +0000 (-0500) Subject: Reformat points field with different name and separate x and y into points. X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f55bf4f99c0aeabed7fc521ec2c7bdc600cd51f1;p=graphviz Reformat points field with different name and separate x and y into points. --- diff --git a/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 8213db5dd..7fd58b0c7 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -153,10 +153,10 @@ static void write_polyline (GVJ_t * job, xdot_polyline* polyline) int cnt = polyline->cnt; xdot_point* pts = polyline->pts; - gvprintf(job, "\"pts\" : ["); + gvprintf(job, "\"points\" : ["); for (i = 0; i < cnt; i++) { if (i > 0) gvprintf(job, ","); - gvprintf(job, "%.03f,%.03f", pts[i].x, pts[i].y); + gvprintf(job, "[%.03f,%.03f]", pts[i].x, pts[i].y); } gvprintf(job, "]\n"); }