mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
sixel: implement P2=1 - transparent pixels
When P2=1, empty pixels are transparent. This patch also changes the behavior of P2=0|2, from setting empty pixels to the default background color, to instead use the *current* background color. To implement this, a couple of changes are needed: * Sixel pixels always use alpha=1.0, except for *empty* cells when P2=1 (i.e. transparent pixels). * The renderer draws sixels with the OVER operator, instead of the SRC operator. * The renderer *must* now render the cells beneath the sixel. As an optimization, this is only done for sixels where P2=1. I.e. for fully opaque sixels, there’s no need to render the cells beneath. The sixel renderer isn’t yet hooked into the multi-threaded renderer. This means *rows* (not just the cells) beneath maybe-transparent sixels are rendered single-threaded. Closes #391.
This commit is contained in:
parent
5650120e08
commit
7d315d7bf9
5 changed files with 91 additions and 50 deletions
2
sixel.h
2
sixel.h
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
void sixel_fini(struct terminal *term);
|
||||
|
||||
void sixel_init(struct terminal *term);
|
||||
void sixel_init(struct terminal *term, int p1, int p2, int p3);
|
||||
void sixel_put(struct terminal *term, uint8_t c);
|
||||
void sixel_unhook(struct terminal *term);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue