mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
colors: store as doubles, rather than uint32_t
Since cairo uses doubles, we don't want to have to convert a uin32_t to double values every time we render a cell.
This commit is contained in:
parent
54403738bb
commit
1dbddd7155
3 changed files with 73 additions and 55 deletions
10
terminal.h
10
terminal.h
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "tllist.h"
|
||||
|
||||
struct rgba { double r, g, b, a; };
|
||||
|
||||
struct attributes {
|
||||
bool bold;
|
||||
bool italic;
|
||||
|
|
@ -21,8 +23,8 @@ struct attributes {
|
|||
bool reverse;
|
||||
bool have_foreground;
|
||||
bool have_background;
|
||||
uint32_t foreground; /* Only valid when have_foreground == true */
|
||||
uint32_t background; /* Only valid when have_background == true */
|
||||
struct rgba foreground; /* Only valid when have_foreground == true */
|
||||
struct rgba background; /* Only valid when have_background == true */
|
||||
};
|
||||
|
||||
struct cell {
|
||||
|
|
@ -76,8 +78,8 @@ struct grid {
|
|||
int col;
|
||||
} alt_saved_cursor;
|
||||
|
||||
uint32_t foreground;
|
||||
uint32_t background;
|
||||
struct rgba foreground;
|
||||
struct rgba background;
|
||||
|
||||
tll(struct damage) damage;
|
||||
tll(struct damage) scroll_damage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue