This is a discussion on [rrd-users] Re: Anti Aliasing on stack within the RRD Users forums, part of the Networking and Network Related category; Hi Antoine, the antialaisiont is not that simple to switch on and off, but the following patch should help. Index: ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Antoine,
the antialaisiont is not that simple to switch on and off, but the following patch should help. Index: rrd_graph.c ================================================== ================= --- rrd_graph.c (revision 536) +++ rrd_graph.c (working copy) @@ -2506,11 +2506,11 @@ } } else { - float ybase0 = DNAN,ytop0=DNAN; + double ybase0 = DNAN,ytop0=DNAN; for(ii=0;ii<im->xsize;ii++){ /* keep things simple for now, just draw these bars do not try to build a big and complex area */ - float ybase,ytop; + double ybase,ytop; if ( im->slopemode == 0 && ii==0){ continue; } @@ -2531,7 +2531,7 @@ /* every area has to be wound clock-wise, so we have to make sur base remains base */ if (ybase > ytop){ - float extra = ytop; + double extra = ytop; ytop = ybase; ybase = extra; } @@ -2541,13 +2541,13 @@ } if ( !isnan(ybase0) ){ node = gfx_new_area(im->canvas, - ii-1+im->xorigin,ybase0, - ii-1+im->xorigin,ytop0, - ii+im->xorigin,ytop, + (double)ii-1.1+(double)im->xorigin,ybase0-0.1, + (double)ii-1.1+(double)im->xorigin,ytop0+0.1, + (double)ii+0.1+(double)im->xorigin,ytop+0.1, im->gdes[i].col ); gfx_add_point(node, - ii+im->xorigin,ybase + (double)ii+0.01+im->xorigin,ybase-0.1 ); } ybase0=ybase; cheers tobi Today Antoine Guilmard wrote: > Hi, > > I have a problem when rendering stack. > It's visible on this image : > http://guilmard.chez.tiscali.fr/stackaa.png > > DEF:Line1=DataBase1.rrd:adsldl:AVERAGE > CDEF:flaming1=Line1,40,*,100,/ > AREA:flaming1#ffff5f:" Download" > CDEF:flaming2=Line1,5,*,100,/ > STACK:flaming2#fff257 > STACK:flaming2#ffe54f > STACK:flaming2#ffd947 > STACK:flaming2#ffcc3f > STACK:flaming2#ffbf37 > STACK:flaming2#ffb230 > STACK:flaming2#ffa628 > STACK:flaming2#ff9920 > STACK:flaming2#ff8c18 > STACK:flaming2#ff8010 > STACK:flaming2#ff7308 > STACK:flaming2#ff6600 > > All the stack are anti aliased, and a "white line" (antialiased line) > appear below and above a stack. > It is possible to remove the antialiasing in the intern stack ? or > choose if you want > antialiasing for a stack like, STACK:flaming2#fff257,AA_UP,AA_DOWN ? > > Thanks. > > > > > > > -- > Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe > Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help > Archive http://lists.ee.ethz.ch/rrd-users > WebAdmin http://lists.ee.ethz.ch/lsg2.cgi > -- ______ __ _ /_ __/_ / / (_) 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-users-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/rrd-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi |