From e3d24e26c3364029d471d0f996e5b30f8bb477c8 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 9 Jul 2011 13:50:58 +0200 Subject: [PATCH 1/1] Write more labels on score axis of eval graph The labels for +/-1 and +/-3 are now also written, provided there is enough space. --- evalgraph.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/evalgraph.c b/evalgraph.c index a24ba02..f386df3 100644 --- a/evalgraph.c +++ b/evalgraph.c @@ -138,18 +138,14 @@ static void DrawAxisSegmentHoriz( int value, Boolean drawValue ) // the initial brush selection is useless? BkMode needed for dotted line and text static void DrawAxis() { - int cy = nHeightPB / 2; + int cy = nHeightPB / 2, space = nHeightPB/(6 + appData.zoom); -// SelectObject( hdcPB, GetStockObject(NULL_BRUSH) ); - -// SetBkMode( hdcPB, TRANSPARENT ); - DrawAxisSegmentHoriz( +5, TRUE ); - DrawAxisSegmentHoriz( +3, FALSE ); - DrawAxisSegmentHoriz( +1, FALSE ); + DrawAxisSegmentHoriz( +3, space >= 20 ); + DrawAxisSegmentHoriz( +1, space >= 20 && space*appData.zoom >= 40 ); DrawAxisSegmentHoriz( 0, TRUE ); - DrawAxisSegmentHoriz( -1, FALSE ); - DrawAxisSegmentHoriz( -3, FALSE ); + DrawAxisSegmentHoriz( -1, space >= 20 && space*appData.zoom >= 40 ); + DrawAxisSegmentHoriz( -3, space >= 20 ); DrawAxisSegmentHoriz( -5, TRUE ); DrawLine( MarginX + MarginW, cy, nWidthPB - MarginW, cy, PEN_BLACK ); // x-axis -- 1.7.0.4