aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-19 17:06:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-24 05:31:08 +0000
commitd6d143e2a6916178d1ea74551617cf8a5cddc39e (patch)
tree0601dee6f24bd0c4586619544e9e5e27cca8d77f /terminal.h
parentsixel: fix cursor positioning logic (diff)
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).
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h9
1 files changed, 9 insertions, 0 deletions
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 */