diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-26 18:33:32 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-26 18:33:32 +0000 |
| commit | 1dbddd7155872890a7f065c90d0e18ac6a2feed8 (patch) | |
| tree | d50fc498992f2314515cb6bd65480d47f0f0a7f1 /terminal.h | |
| parent | render: use alpha from cell colors (diff) | |
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.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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; |
