[rrd-developers] Re: rrdtool 1.2rc3 - a bit of a problem with RRFW

Tobias Oetiker oetiker at ee.ethz.ch
Wed Apr 6 00:37:58 MEST 2005


Yesterday Stanislav Sinyagin wrote:

> it looks like happening when LINE2 is too steep, and the antialiased
> borders of the two neighbouring lines intersect.

Hi Stan,

hmm libart seems to sometimes not be realy what one wants ... :-)
...

try this patch ...

Index: rrd_gfx.c
===================================================================
--- rrd_gfx.c   (revision 360)
+++ rrd_gfx.c   (working copy)
@@ -519,7 +519,7 @@
         case GFX_AREA: {
             ArtVpath *vec,*pvec;
             double dst[6];
-            ArtSVP *svp,*usvp,*rsvp;
+            ArtSVP *svp,*svpt;
             art_affine_scale(dst,canvas->zoom,canvas->zoom);
             vec = art_vpath_affine_transform(node->path,dst);
            if (node->closed_path)
@@ -530,18 +530,18 @@
             if(node->type == GFX_LINE){
                 svp = art_svp_vpath_stroke ( pvec, ART_PATH_STROKE_JOIN_ROUND,
                                              ART_PATH_STROKE_CAP_ROUND,
-                                             node->size*canvas->zoom,1,1);
+                                             node->size*canvas->zoom,4,0.25);
             } else {
-                svp = art_svp_from_vpath ( pvec );
+                svp  = art_svp_from_vpath ( pvec );
+                svpt = art_svp_uncross( svp );
+                art_free(svp);
+               svp  = art_svp_rewind_uncrossed(svpt,ART_WIND_RULE_ODDEVEN);
             }
             art_free(pvec);
-            usvp=art_svp_uncross(svp);
+            art_free(svpt);
+            art_rgb_svp_alpha (svp ,0,0, pys_width, pys_height,
+                               node->color, buffer, rowstride, NULL);
             art_free(svp);
-           rsvp=art_svp_rewind_uncrossed(usvp,ART_WIND_RULE_ODDEVEN);
-            art_free(usvp);
-            art_rgb_svp_alpha (rsvp ,0,0, pys_width, pys_height,
-                               node->color, buffer, rowstride, NULL);
-            art_free(rsvp);
             break;
         }
         case GFX_TEXT: {


cheers
tobi

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
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://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list