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:
parent
dd8675943d
commit
118e965d0c
6 changed files with 85 additions and 33 deletions
4
sixel.h
4
sixel.h
|
|
@ -39,6 +39,7 @@ typedef struct parser_context {
|
|||
int attributed_pad;
|
||||
int attributed_ph;
|
||||
int attributed_pv;
|
||||
int transparent;
|
||||
int repeat_count;
|
||||
int color_index;
|
||||
int bgindex;
|
||||
|
|
@ -52,10 +53,11 @@ typedef struct parser_context {
|
|||
|
||||
void scroll_images(int n);
|
||||
void delete_image(ImageList *im);
|
||||
int sixel_parser_init(sixel_state_t *st, sixel_color_t fgcolor, sixel_color_t bgcolor, unsigned char use_private_register, int cell_width, int cell_height);
|
||||
int sixel_parser_init(sixel_state_t *st, int transparent, sixel_color_t fgcolor, sixel_color_t bgcolor, unsigned char use_private_register, int cell_width, int cell_height);
|
||||
int sixel_parser_parse(sixel_state_t *st, const unsigned char *p, size_t len);
|
||||
int sixel_parser_set_default_color(sixel_state_t *st);
|
||||
int sixel_parser_finalize(sixel_state_t *st, ImageList **newimages, int cx, int cy, int cw, int ch);
|
||||
void sixel_parser_deinit(sixel_state_t *st);
|
||||
Pixmap sixel_create_clipmask(char *pixels, int width, int height);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue