Fix animation with textures off
authorH.G. Muller <h.g.muller@hccnet.nl>
Thu, 11 Oct 2012 17:13:24 +0000 (19:13 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Oct 2012 09:28:22 +0000 (11:28 +0200)
The blank square was not shifted to (0,0) when drawing the animation buffer.

draw.c

diff --git a/draw.c b/draw.c
index 8a39aeb..b838c3b 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -605,7 +605,8 @@ BlankSquare (cairo_surface_t *dest, int x, int y, int color, ChessSquare piece,
          case 2: col = "#000000"; break;
        }
        SetPen(cr, 2.0, col, 0);
-       cairo_rectangle (cr, x, y, squareSize, squareSize);
+       cairo_rectangle (cr, fac*x, fac*y, squareSize, squareSize);
+       cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
        cairo_fill (cr);
        cairo_destroy (cr);
     }