[rrd-users] Minor Graph Rendering Issue

Tobias Oetiker tobi at oetiker.ch
Fri Dec 16 21:21:48 CET 2011


Today Chris Mason wrote:

> > snapshots get updated around midnight GMT
>
> I have just manually patched the latest snapshot and although it has
> fixed the problem, it seems to have created a problem when aligning a
> LINE to the top of the AREA with slope mode enabled:
>
> AREA:ifOutOctetsBits#002A97:'Total Out'
> LINE0.5:ifOutOctetsBits#000000
>
> I am seeing a ghosting effect which is displayed in the attached
> images (gi01a.png is before and gi01b.png is after).

indeed ...

Index: rrd_gfx.c
===================================================================
--- rrd_gfx.c   (revision 2243)
+++ rrd_gfx.c   (working copy)
@@ -331,7 +331,7 @@
     cairo_user_to_device_distance(cr, &line_width, &line_height);
     line_width = line_width / 2.0 - ceil(line_width / 2.0);
     line_height = line_height / 2.0 - ceil(line_height / 2.0);
-    *x = ceil(*x - 0.5) - line_width;
+    *x = floor(*x - 0.5) - line_width;
     *y = ceil(*y + 0.5) + line_height;
     cairo_device_to_user(cr, x, y);
 }

there is unfortunately still a odd effect that the chart is not entirely flush wich the left axis ... can't find the issue at present.

cheers
tobi

>
> Thanks,
> Chris
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list