X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=evalgraph.c;fp=evalgraph.c;h=a24ba02b67bdaf1982187fa519ceeccf7c504bb4;hb=55d82733a8c6a6e29280bb6413fb2037cbcd381b;hp=1380276dce7a164a644e1ab9f5199db322d67dc9;hpb=9bc5b6e6ca1e15a01cd9406322ad4fc93a45adc8;p=xboard.git diff --git a/evalgraph.c b/evalgraph.c index 1380276..a24ba02 100644 --- a/evalgraph.c +++ b/evalgraph.c @@ -109,8 +109,10 @@ static int GetValueY( int value ) { if( value < -range*700 ) value = -range*700; if( value > +range*700 ) value = +range*700; - - return (nHeightPB / 2) - (int)(value * (nHeightPB - 2*MarginH) / (1400.*range)); + if(value > 100*range) value += appData.zoom * 100 - 100*range; else + if(value < -100*range) value -= appData.zoom * 100 - 100*range; else + value *= appData.zoom; + return (nHeightPB / 2) - (int)(value * (nHeightPB - 2*MarginH) / ((1200. + 200.*appData.zoom)*range)); } // the brush selection is made part of the DrawLine, by passing a style argument @@ -159,7 +161,7 @@ static void DrawHistogram( int x, int y, int width, int value, int side ) { int left, top, right, bottom; - if( value > -25 && value < +25 ) return; + if( value > -appData.evalThreshold*range && value < +appData.evalThreshold*range ) return; left = x; right = left + width + 1;