From d6d143e2a6916178d1ea74551617cf8a5cddc39e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 19 Jun 2023 19:06:38 +0200 Subject: sixel: respect sixel aspect ratio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- terminal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index ec0db44b..0df9c5b6 100644 --- a/terminal.h +++ b/terminal.h @@ -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 sixel’s 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 */ -- cgit v1.3