mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncplane_rgba(): properly set up alpha channel
This commit is contained in:
parent
2c73162c62
commit
61aa09eae0
@ -2063,8 +2063,8 @@ uint32_t* ncplane_rgba(const ncplane* nc, int begy, int begx, int leny, int lenx
|
||||
channels_fg_rgb(channels, &fr, &fb, &fg);
|
||||
channels_bg_rgb(channels, &br, &bb, &bg);
|
||||
// FIXME how do we deal with transparency?
|
||||
uint32_t frgba = (fr << 24u) + (fg << 16u) + (fb << 8u) + 0xff;
|
||||
uint32_t brgba = (br << 24u) + (bg << 16u) + (bb << 8u) + 0xff;
|
||||
uint32_t frgba = (fr) + (fg << 8u) + (fb << 16u) + 0xff000000;
|
||||
uint32_t brgba = (br) + (bg << 8u) + (bb << 16u) + 0xff000000;
|
||||
if((strcmp(c, " ") == 0) || (strcmp(c, "") == 0)){
|
||||
*top = *bot = brgba;
|
||||
}else if(strcmp(c, "▄") == 0){
|
||||
|
Loading…
Reference in New Issue
Block a user