]> granicus.if.org Git - graphviz/commitdiff
Copy ac239f71ea9f807590505e6862cebe50e992e271 from gitlab graphviz.
authorStephen C North <scnorth@gmail.com>
Wed, 4 Jul 2018 11:48:35 +0000 (07:48 -0400)
committerStephen C North <scnorth@gmail.com>
Wed, 4 Jul 2018 11:48:35 +0000 (07:48 -0400)
fix for SVG rotation bug, demonstrated by
digraph BadRotation { graph [ rotate = 90]; A -> B ->C ->D ->E; }
fix proposed by steve roush
https://gitlab.com/graphviz/graphviz/issues/1392

lib/common/emit.c

index 3f573321b1581b7a3e42e1a82fdd422ba966e88c..a6d8f869cb5e705fa352bcdf6379daeaad1c8900 100644 (file)
@@ -1416,8 +1416,10 @@ static void init_job_pagination(GVJ_t * job, graph_t *g)
     job->pageBoundingBox.UR.x = ROUND(job->canvasBox.UR.x * job->dpi.x / POINTS_PER_INCH);
     job->pageBoundingBox.UR.y = ROUND(job->canvasBox.UR.y * job->dpi.y / POINTS_PER_INCH);
     if (job->rotation) {
-       job->pageBoundingBox.LL = exch_xy(job->pageBoundingBox.LL);
-       job->pageBoundingBox.UR = exch_xy(job->pageBoundingBox.UR);
+        job->pageBoundingBox.LL = exch_xy(job->pageBoundingBox.LL);
+        job->pageBoundingBox.UR = exch_xy(job->pageBoundingBox.UR);
+        job->canvasBox.LL = exch_xyf(job->canvasBox.LL);
+        job->canvasBox.UR = exch_xyf(job->canvasBox.UR);
     }
 }