From 104c47f444b8f0747fcd1cba3f0b791410087dcf 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/program@498 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index 8b3493e..faa9c91 100644 --- a/src/rrd_gfx.c +++ b/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