From c1f9fd66ab250f14d4e40383a242691ac40782da Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 25 Sep 2014 12:29:15 +0200 Subject: [PATCH] Size seek graph to also cover board rim WinBoard The seek graph always used the plain board size, but in WB it is possible to diplay a rim around the board, and the seekgraph would then be positioned in the upper-left corner of the rim, leaving the lower and right board edge and rim uncovered. Its size is now increased to fill the entire window (as leaving a rim around it seems not useful). --- backend.c | 5 +++-- backend.h | 1 + winboard/winboard.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index e37d1eb..ec9cfbb 100644 --- a/backend.c +++ b/backend.c @@ -295,6 +295,7 @@ ChessSquare promoSweep = EmptySquare, defaultPromoChoice; int promoDefaultAltered; int keepInfo = 0; /* [HGM] to protect PGN tags in auto-step game analysis */ static int initPing = -1; +int border; /* [HGM] width of board rim, needed to size seek graph */ /* States for ics_getting_history */ #define H_FALSE 0 @@ -2716,8 +2717,8 @@ DrawSeekGraph () { int i; if(!seekGraphUp) return FALSE; - h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap; - w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; + h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap + 2*border; + w = BOARD_WIDTH * (squareSize + lineGap) + lineGap + 2*border; DrawSeekBackground(0, 0, w, h); DrawSeekAxis(hMargin, h-1-vMargin, w-5, h-1-vMargin); diff --git a/backend.h b/backend.h index f52f1f5..583a98a 100644 --- a/backend.h +++ b/backend.h @@ -261,6 +261,7 @@ typedef struct XB_ListGame { GameInfo gameInfo; /* Note that some entries may be NULL. */ } ListGame; +extern int border; extern int doubleClick; extern int storedGames; extern int opponentKibitzes; diff --git a/winboard/winboard.c b/winboard/winboard.c index 4e43c62..db317ce 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -166,7 +166,7 @@ BoardSize boardSize; Boolean chessProgram; //static int boardX, boardY; int minX, minY; // [HGM] placement: volatile limits on upper-left corner -int squareSize, lineGap, minorSize, border; +int squareSize, lineGap, minorSize; static int winW, winH; static RECT messageRect, whiteRect, blackRect, leftLogoRect, rightLogoRect; // [HGM] logo static int logoHeight = 0; @@ -1282,6 +1282,7 @@ LFfromMFP(LOGFONT* lf, MyFontParams *mfp) lf->lfStrikeOut = mfp->strikeout; lf->lfCharSet = mfp->charset; lf->lfOutPrecision = OUT_DEFAULT_PRECIS; + lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; lf->lfQuality = DEFAULT_QUALITY; lf->lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE; -- 1.7.0.4