csDualBoard = cstmp;
}
-void
-NewSurfaces ()
-{
-return;
- // delete surfaces after size becomes invalid, so they will be recreated
- if(csBoardWindow) cairo_surface_destroy(csBoardWindow);
- if(csBoardBackup) cairo_surface_destroy(csBoardBackup);
- if(csDualBoard) cairo_surface_destroy(csDualBoard);
- csBoardWindow = csBoardBackup = csDualBoard = NULL;
-}
-
#define BoardSize int
void
InitDrawingSizes (BoardSize boardSize, int flags)
oldWidth = boardWidth; oldHeight = boardHeight;
CreateGrid();
- NewSurfaces();
/*
* Inhibit shell resizing.
if(sqy < sqx) sqx = sqy;
if(sqx != squareSize) {
squareSize = sqx; // adopt new square size
- NewSurfaces();
CreatePNGPieces(); // make newly scaled pieces
InitDrawingSizes(0, 0); // creates grid etc.
} else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0);