X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=edf20c609fec627179cf1cbb589f12df7947202c;hb=bf1467b590e28b4dc641a3c753ce728b90d42081;hp=7e301874d63d8b3ac43243ecaf68b60844fc7a89;hpb=9d5cf883b49ff08738e437514a4d0eb978c23647;p=xboard.git diff --git a/xboard.c b/xboard.c index 7e30187..edf20c6 100644 --- a/xboard.c +++ b/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -4321,9 +4321,17 @@ void DrawSeekText(char *buf, int x, int y) XDrawString(xDisplay, xBoardWindow, coordGC, x, y+4, buf, strlen(buf)); } -void DrawSeekDot(int x, int y, int color) +void DrawSeekDot(int x, int y, int colorNr) { - XFillArc(xDisplay, xBoardWindow, color == 0 ? prelineGC : color == 1 ? darkSquareGC : highlineGC, + int square = colorNr & 0x80; + GC color; + colorNr &= 0x7F; + color = colorNr == 0 ? prelineGC : colorNr == 1 ? darkSquareGC : highlineGC; + if(square) + XFillRectangle(xDisplay, xBoardWindow, color, + x-squareSize/9, y-squareSize/9, 2*squareSize/9, 2*squareSize/9); + else + XFillArc(xDisplay, xBoardWindow, color, x-squareSize/8, y-squareSize/8, squareSize/4, squareSize/4, 0, 64*360); }