X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=draw.c;h=4e7b6ac67451f92a67ad06d3246a07e4f38b8335;hb=7e0222e64da6706bf0dc2468f459b98e4346206b;hp=84fb6a1af617ad29d4d012370f7b236e8c60114c;hpb=c2c246be40c585f2d7ad2bed6abbc77fcb3d9cb1;p=xboard.git diff --git a/draw.c b/draw.c index 84fb6a1..4e7b6ac 100644 --- a/draw.c +++ b/draw.c @@ -78,7 +78,6 @@ extern char *getenv(); // [HGM] bitmaps: put before incuding the bitmaps / pixmaps, to know how many piece types there are. #include "common.h" -#include "frontend.h" #include "backend.h" #include "xevalgraph.h" #include "board.h" @@ -166,7 +165,6 @@ void InitDrawingSizes (BoardSize boardSize, int flags) { // [HGM] resize is functional now, but for board format changes only (nr of ranks, files) int boardWidth, boardHeight; - int i; static int oldWidth, oldHeight; static VariantClass oldVariant; static int oldMono = -1, oldTwoBoards = 0; @@ -282,9 +280,7 @@ ScaleOnePiece (int color, int piece) g_type_init (); - if(!svgPieces[color][piece]) { // try to freshly render cached svg pieces first, to supply the source bitmap - svgPieces[color][piece] = LoadSVG("", color, piece); // this fills pngPieceImages if we had cached svg with bitmap of wanted size - } + svgPieces[color][piece] = LoadSVG("", color, piece); // this fills pngPieceImages if we had cached svg with bitmap of wanted size if(!pngPieceImages[color][piece]) { // we don't have cached bitmap (implying we did not have cached svg) if(*appData.pieceDirectory) { // user specified piece directory @@ -775,7 +771,9 @@ DrawBlank (AnimNr anr, int x, int y, int startColor) void CopyRectangle (AnimNr anr, int srcBuf, int destBuf, int srcX, int srcY, int width, int height, int destX, int destY) { - cairo_t *cr = cairo_create (c_animBufs[anr+destBuf]); + cairo_t *cr; + c_animBufs[anr+4] = csBoardWindow; + cr = cairo_create (c_animBufs[anr+destBuf]); cairo_set_source_surface (cr, c_animBufs[anr+srcBuf], destX - srcX, destY - srcY); cairo_rectangle (cr, destX, destY, width, height); cairo_fill (cr);