From c81dfbe8facdec8a6d9645ef0c999b40e241d40d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 10 Feb 2010 10:50:11 +0100 Subject: [PATCH] Fix right-edge spillover of Seek-Graph dots in WinBoard Rescale the X-axis to allow margin for dot size and color offset. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 9636abc..f0811fd 100644 --- a/backend.c +++ b/backend.c @@ -2089,7 +2089,7 @@ PlotSeekAd(int i) if(r > maxRating) r = maxRating; if(tc < 1.) tc = 1.; if(tc > 95.) tc = 95.; - x = (w-hMargin)* log(tc)/log(100.) + hMargin; + x = (w-hMargin-squareSize/8-7)* log(tc)/log(95.) + hMargin; y = ((double)r - minRating)/(maxRating - minRating) * (h-vMargin-squareSize/8-1) + vMargin; if(ratingList[i] < 0) y = vMargin + squareSize/4; @@ -2201,7 +2201,7 @@ DrawSeekGraph() } DrawSeekText("unrated", hMargin+squareSize/8+7, h-1-vMargin-squareSize/4); for(i=1; i<100; i+=(i<10?1:5)) { - int xx = (w-hMargin)* log((double)i)/log(100.) + hMargin; + int xx = (w-hMargin-squareSize/8-7)* log((double)i)/log(95.) + hMargin; DrawSeekAxis(xx, h-1-vMargin, xx, h-6-vMargin-3*(i%10==0)); // TC ticks if(i<=5 || (i>40 ? i%20 : i%10) == 0) { char buf[MSG_SIZ]; -- 1.7.0.4