From: Stephen C North Date: Wed, 4 Jul 2018 11:48:35 +0000 (-0400) Subject: Copy ac239f71ea9f807590505e6862cebe50e992e271 from gitlab graphviz. X-Git-Tag: 2.42.0~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75d5c7087cae97b21034a4325c6f1c2c0d8309e5;p=graphviz Copy ac239f71ea9f807590505e6862cebe50e992e271 from gitlab graphviz. 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 --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 3f573321b..a6d8f869c 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -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); } }