chiark / gitweb /
Increase by 1 pixel the clip rectangle used to draw and erase the
authorSimon Tatham <anakin@pobox.com>
Sun, 8 Apr 2012 13:06:47 +0000 (13:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 8 Apr 2012 13:06:47 +0000 (13:06 +0000)
Black Box finish button. Like the Guess blitter, it was assuming
non-expansion of circles.

[originally from svn r9452]

blackbox.c

index be7963426827921ec6ea354cb168b24f52577f89..3a85bd7d3bf83d65b8c50d421696433ab8df1f21 100644 (file)
@@ -1398,15 +1398,15 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
     if (CAN_REVEAL(state)) {
         int outline = (ui->cur_visible && ui->cur_x == 0 && ui->cur_y == 0)
             ? COL_CURSOR : COL_BALL;
-        clip(dr, TODRAW(0), TODRAW(0), TILE_SIZE-1, TILE_SIZE-1);
+        clip(dr, TODRAW(0)-1, TODRAW(0)-1, TILE_SIZE+1, TILE_SIZE+1);
         draw_circle(dr, TODRAW(0) + ds->crad, TODRAW(0) + ds->crad, ds->crad,
                     outline, outline);
         draw_circle(dr, TODRAW(0) + ds->crad, TODRAW(0) + ds->crad, ds->crad-2,
                     COL_BUTTON, COL_BUTTON);
        unclip(dr);
     } else {
-        draw_rect(dr, TODRAW(0), TODRAW(0),
-                 TILE_SIZE-1, TILE_SIZE-1, COL_BACKGROUND);
+        draw_rect(dr, TODRAW(0)-1, TODRAW(0)-1,
+                 TILE_SIZE+1, TILE_SIZE+1, COL_BACKGROUND);
     }
     draw_update(dr, TODRAW(0), TODRAW(0), TILE_SIZE, TILE_SIZE);
     ds->reveal = state->reveal;