From: H.G. Muller Date: Wed, 3 Oct 2012 09:20:12 +0000 (+0200) Subject: Redo seek graph with cairo X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=dedf8322d9e57e7a7fe41f04f92d27b6ef135778;p=xboard.git Redo seek graph with cairo New front-end services DrawSeekOpen() and DrawSeekClose() have been added, and are called from the back-end to enclose any drawing activity. In WinBoard these had to be defined as dummies. --- diff --git a/backend.c b/backend.c index 564b95e..c830d4e 100644 --- a/backend.c +++ b/backend.c @@ -2511,6 +2511,14 @@ PlotSeekAd (int i) } void +PlotSingleSeekAd (int i) +{ + DrawSeekOpen(); + PlotSeekAd(i); + DrawSeekClose(); +} + +void AddAd (char *handle, char *rating, int base, int inc, char rated, char *type, int nr, Boolean plot) { char buf[MSG_SIZ], *ext = ""; @@ -2530,7 +2538,7 @@ AddAd (char *handle, char *rating, int base, int inc, char rated, char *type, i seekNrList[nrOfSeekAds] = nr; zList[nrOfSeekAds] = 0; seekAdList[nrOfSeekAds++] = StrSave(buf); - if(plot) PlotSeekAd(nrOfSeekAds-1); + if(plot) PlotSingleSeekAd(nrOfSeekAds-1); } } @@ -2594,6 +2602,7 @@ DrawSeekGraph () h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap; w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; + DrawSeekOpen(); DrawSeekBackground(0, 0, w, h); DrawSeekAxis(hMargin, h-1-vMargin, w-5, h-1-vMargin); DrawSeekAxis(hMargin, h-1-vMargin, hMargin, 5); @@ -2618,6 +2627,7 @@ DrawSeekGraph () } } for(i=0; i