[rrd-developers] Re: announce rrdtool 1.2.1

Peter Speck speck at vitality.dk
Sat May 7 11:52:11 MEST 2005


Hi,

Patch to fix rotation of y-label text in pdf, eps and svg formats.  
Diff is against rrdtool 1.2.1


--- ../rrdtool-1.2.1-orig/src/rrd_gfx.c    Mon May  2 00:07:48 2005
+++ src/rrd_gfx.c    Sat May  7 11:46:53 2005
@@ -1178,7 +1178,7 @@
       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);
@@ -1574,7 +1574,7 @@
      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);
@@ -1966,7 +1966,7 @@
    }
    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);


----
    - Peter Speck

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list