sixel: respect sixel aspect ratio

That is, parse P1 when initializing a new sixel, and don’t ignore
pad/pad in the raster attributes command.

The default aspect ratio is 2:1, but most sixels will override it in
the raster attributes command (to 1:1).
This commit is contained in:
Daniel Eklöf 2023-06-19 19:06:38 +02:00
parent 66d9b8da60
commit d6d143e2a6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 52 additions and 14 deletions

View file

@ -634,6 +634,15 @@ struct terminal {
int height; /* Image height, in pixels */
} image;
/*
* Pan is the vertical shape of a pixel
* Pad is the horizontal shape of a pixel
*
* pan/pad is the sixels aspect ratio
*/
int pan;
int pad;
bool scrolling:1; /* Private mode 80 */
bool use_private_palette:1; /* Private mode 1070 */
bool cursor_right_of_graphics:1; /* Private mode 8452 */