From 2dbf8dc0fbca496ab63f60ae8698c8240dfed801 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 7 May 2005 10:38:34 +0000 Subject: [PATCH] fix for rotation code in pdf,eps,svg formats -- Peter Speck git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@498 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index 8b3493ec..faa9c916 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -1209,7 +1209,7 @@ static void svg_text(FILE *fp, gfx_node_t *node) fputs(",", fp); svg_write_number(fp, y); fputs(") rotate(", fp); - svg_write_number(fp, node->angle); + svg_write_number(fp, -node->angle); fputs(")\"", fp); x = y = 0; svg_close_tag(fp); @@ -1605,7 +1605,7 @@ static void eps_write_text(eps_state *state, gfx_node_t *node) fputc(' ', fp); svg_write_number(fp, y); fputs(" translate ", fp); - svg_write_number(fp, -node->angle); + svg_write_number(fp, node->angle); fputs(" rotate 0 ", fp); svg_write_number(fp, ydelta); fputs(" moveto ", fp); @@ -1997,7 +1997,7 @@ static void pdf_write_text(pdf_state *state, gfx_node_t *node, } pdf_set_fill_color(s, node->color); if (node->angle != 0) { - double a = 2 * M_PI * -node->angle / 360.0; + double a = 2 * M_PI * node->angle / 360.0; double new_x, new_y; cos_a = cos(a); sin_a = sin(a); -- 2.30.2