sixel: add support for fully transparent bg (P2=1) (#132)

P2 selects how the terminal draws the background color.

P2                  Meaning
0 or 2 (default)    Pixel positions specified as 0 are set to the
                    current background color.
1                   Pixel positions specified as 0 remain at their
                    current color.

Both modes are now supported.

Ref. https://www.vt100.net/docs/vt3xx-gp/chapter14.html
This commit is contained in:
veltza 2024-04-17 19:04:27 +03:00 committed by GitHub
parent dd8675943d
commit 118e965d0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 85 additions and 33 deletions

2
st.h
View file

@ -77,6 +77,7 @@ typedef struct _ImageList {
struct _ImageList *next, *prev;
unsigned char *pixels;
void *pixmap;
void *clipmask;
int width;
int height;
int x;
@ -87,6 +88,7 @@ typedef struct _ImageList {
int cols;
int cw;
int ch;
int transparent;
} ImageList;
#endif // SIXEL_PATCH