From: oetiker Date: Sat, 7 May 2005 10:38:34 +0000 (+0000) Subject: fix for rotation code in pdf,eps,svg formats -- Peter Speck X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=104c47f444b8f0747fcd1cba3f0b791410087dcf;p=rrdtool.git 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 --- 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);