]> granicus.if.org Git - graphviz/commitdiff
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1855 where the SVG view setup...
authorStephen C North <scnorth@gmail.com>
Mon, 6 Dec 2021 13:37:08 +0000 (08:37 -0500)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Dec 2021 20:29:32 +0000 (12:29 -0800)
plugin/core/gvrender_core_svg.c
rtest/test_regression.py

index 0fef81c45ca8e1c50d621bd358a690a22992e309..f02770a27dac0b1ffe498d66372cf8a85025f90f 100644 (file)
@@ -251,9 +251,8 @@ static void svg_begin_page(GVJ_t * job)
      * and it is the entire graph if we're not currently paging */
     svg_print_id_class(job, obj->id, NULL, "graph", obj->u.g);
     GVPUTS(job, " transform=\"scale(");
-    gvprintdouble(job, job->scale.x);
-    GVPUTS(job, " ");
-    gvprintdouble(job, job->scale.y);
+    // cannot be gvprintdouble because 2 digits precision insufficient
+    gvprintf(job, "%g %g", job->scale.x, job->scale.y);
     gvprintf(job, ") rotate(%d) translate(", -job->rotation);
     gvprintdouble(job, job->translation.x);
     GVPUTS(job, " ");
index f8abf5d010248fb67fbcdca9e78fe2332777fd9c..0a29050a51f6f41d0b4663e1ecb6791d8b4bce99 100644 (file)
@@ -832,7 +832,6 @@ def test_html(src: Path):
   assert p.returncode == 0
   assert stderr == ""
 
-@pytest.mark.xfail(strict=True)
 def test_1855():
   """
   SVGs should have a scale with sufficient precision