X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=evalgraph.c;h=1a8bd075e3b3fd5235b20abb7a0f59339961850a;hp=2da07fd22d68ad675c811f1980fb49439ba413a2;hb=95244a1c40718e9ad8bda9e2df66677e180354d6;hpb=1c03d229073e56dda9e5856db5adaae51576a3bb diff --git a/evalgraph.c b/evalgraph.c index 2da07fd..1a8bd07 100644 --- a/evalgraph.c +++ b/evalgraph.c @@ -5,7 +5,8 @@ * * Copyright 2005 Alessandro Scotti * - * Enhancments Copyright 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + * Enhancments Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, + * 2016 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -53,6 +54,7 @@ int currFirst = 0; int currLast = 0; int currCurrent = -1; int range = 1; +int differentialView; int nWidthPB = 0; int nHeightPB = 0; @@ -85,6 +87,7 @@ GetPvScore (int index) { int score = currPvInfo[ index ].score; + if(differentialView) score = index < currLast-1 ? -currPvInfo[ index+1 ].score - score : 0; if( index & 1 ) score = -score; /* Flip score for black */ return score; @@ -312,15 +315,26 @@ static void DrawHistograms () { VisualizationData vd; + int i; double step = 1; if( InitVisualization( &vd ) ) { if( vd.hist_width < MIN_HIST_WIDTH ) { DrawHistogramAsDiagram( vd.cy, vd.paint_width, vd.hist_count ); + step = 0.5*vd.paint_width / (((vd.hist_count | 7) + 1)/2 + 1.); } else { - DrawHistogramFull( vd.cy, vd.hist_width, vd.hist_count ); + DrawHistogramFull( vd.cy, step = vd.hist_width, vd.hist_count ); } } + if(!differentialView) return; + differentialView = 0; + DrawSegment( MarginX + MarginW, vd.cy, NULL, NULL, PEN_NONE ); + for( i=0; i