Skip to content

Commit

Permalink
fix for SVG rotation bug, demonstrated by
Browse files Browse the repository at this point in the history
digraph BadRotation { graph [ rotate = 90]; A -> B ->C ->D ->E; }
fix proposed by steve roush
https://gitlab.com/graphviz/graphviz/issues/1392
  • Loading branch information
magneticnorth committed Jun 14, 2018
1 parent 2574c4d commit ac239f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/common/emit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit ac239f7

Please sign in to comment.