From 221d5a5db5e1646779eb55b489b255feed502505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 12 Jun 2018 18:33:13 +0200 Subject: [PATCH] important Bugfix. Flipping direction in LaTeX renderer fixed --- latex-output/latex-output.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/latex-output/latex-output.c b/latex-output/latex-output.c index 2b85056..859b3a5 100644 --- a/latex-output/latex-output.c +++ b/latex-output/latex-output.c @@ -158,13 +158,14 @@ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_fil for (list_child = cell->child_cells; list_child != NULL; list_child = list_child->next) { inst = (struct gds_cell_instance *)list_child->data; /* generate translation scope */ - g_string_printf(buffer, "\\begin{scope}[shift={(%lf pt,%lf pt)}, rotate=%lf]\n", - ((double)inst->origin.x)/1000.0,((double)inst->origin.y)/1000.0, - inst->angle); + g_string_printf(buffer, "\\begin{scope}[shift={(%lf pt,%lf pt)}]\n", + ((double)inst->origin.x)/1000.0,((double)inst->origin.y)/1000.0); WRITEOUT_BUFFER(buffer); - g_string_printf(buffer, "\\begin{scope}[xscale=%s]\n", - (inst->flipped ? "-1" : "1")); + g_string_printf(buffer, "\\begin{scope}[rotate=%lf]\n", inst->angle); + WRITEOUT_BUFFER(buffer); + + g_string_printf(buffer, "\\begin{scope}[yscale=%s]\n", (inst->flipped ? "-1" : "1")); WRITEOUT_BUFFER(buffer); if (inst->cell_ref) @@ -175,6 +176,9 @@ static void render_cell(struct gds_cell *cell, GList *layer_infos, FILE *tex_fil g_string_printf(buffer, "\\end{scope}\n"); WRITEOUT_BUFFER(buffer); + + g_string_printf(buffer, "\\end{scope}\n"); + WRITEOUT_BUFFER(buffer); } }