fix: ensure that board_offset is pixel aligned

ci-dev
LeRoyce Pearson 2024-05-29 18:03:16 -06:00
parent 7029cd4c60
commit 820e48e4ec
1 changed files with 2 additions and 2 deletions

View File

@ -255,8 +255,8 @@ fn render(window: seizer.Window) !void {
@floatFromInt(2 * margin + 5 * (margin + tile_size[1])), @floatFromInt(2 * margin + 5 * (margin + tile_size[1])),
}; };
const board_offset = [2]f32{ const board_offset = [2]f32{
(canvas.window_size[0] - space_taken_by_board[0]) / 2, @floor((canvas.window_size[0] - space_taken_by_board[0]) / 2),
(canvas.window_size[1] - space_taken_by_board[1]) / 2, @floor((canvas.window_size[1] - space_taken_by_board[1]) / 2),
}; };
if (win_count) |w| { if (win_count) |w| {