(squareSize + lineGap);
}
- DrawBorder(x,y, type);
+ DrawBorder(x,y, type, lineGap & 1); // pass whether lineGap is odd
}
int hi1X = -1, hi1Y = -1, hi2X = -1, hi2Y = -1;
void CopyRectangle P((AnimNr anr, int srcBuf, int destBuf, int srcX, int srcY, int width, int height, int destX, int destY));
void SetDragPiece P((AnimNr anr, ChessSquare piece));
void DragPieceMove P((int x, int y));
-void DrawBorder P((int x, int y, int type));
+void DrawBorder P((int x, int y, int type, int odd));
void FlashDelay P((int flash_delay));
void SwitchWindow P((void));
}
void
-DrawBorder (int x, int y, int type)
+DrawBorder (int x, int y, int type, int odd)
{
cairo_t *cr;
char *col;
}
cr = cairo_create(csBoardWindow);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
- cairo_rectangle(cr, x, y, squareSize+lineGap, squareSize+lineGap);
+ cairo_rectangle(cr, x+odd/2., y+odd/2., squareSize+lineGap, squareSize+lineGap);
SetPen(cr, lineGap, col, 0);
cairo_stroke(cr);
cairo_destroy(cr);
- GraphExpose(currBoard, x - lineGap/2, y - lineGap/2, squareSize+2*lineGap, squareSize+2*lineGap);
+ GraphExpose(currBoard, x - lineGap/2, y - lineGap/2, squareSize+lineGap+odd, squareSize+lineGap+odd);
}
static int