render: center grid in window

Instead of placing the upper left corner of the grid at 0,0 in the
window, center it.
This commit is contained in:
Daniel Eklöf 2019-08-27 15:25:35 +02:00
parent 382bea8309
commit 2d7ca416f0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 44 additions and 31 deletions

View file

@ -274,6 +274,8 @@ struct terminal {
int scale;
int width; /* pixels */
int height; /* pixels */
int x_margin;
int y_margin;
int cols; /* number of columns */
int rows; /* number of rows */
int cell_width; /* pixels per cell, x-wise */