mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-04 06:00:30 +00:00
pixel PoC / ncneofetch -> ncvisual_blit() #1462
This commit is contained in:
parent
5db0f3457b
commit
36646f1b9b
@ -607,12 +607,13 @@ display_thread(void* vmarshal){
|
||||
pixeling = true;
|
||||
}
|
||||
struct ncvisual_options vopts = {
|
||||
.n = notcurses_stdplane(m->nc),
|
||||
.x = NCALIGN_CENTER,
|
||||
.blitter = pixeling ? NCBLIT_PIXEL : NCBLIT_3x2,
|
||||
.scaling = pixeling ? NCSCALE_NONE : NCSCALE_SCALE_HIRES,
|
||||
.flags = NCVISUAL_OPTION_HORALIGNED,
|
||||
.flags = NCVISUAL_OPTION_HORALIGNED | NCVISUAL_OPTION_CHILDPLANE,
|
||||
};
|
||||
struct ncplane* iplane = ncvisual_render(m->nc, ncv, &vopts);
|
||||
struct ncplane* iplane = ncvisual_blit(m->nc, ncv, &vopts);
|
||||
ncvisual_destroy(ncv);
|
||||
if(iplane){
|
||||
int x = ncplane_x(iplane);
|
||||
|
@ -15,12 +15,14 @@ handle(struct notcurses* nc, const char *fn){
|
||||
uint64_t channels = NCCHANNELS_INITIALIZER(rand() % 256, rand() % 256, 100, rand() % 256, 100, 140);
|
||||
ncplane_set_base(stdn, "a", 0, channels);
|
||||
struct ncvisual_options vopts = {
|
||||
.n = notcurses_stdplane(nc),
|
||||
.y = y,
|
||||
.x = x,
|
||||
.scaling = NCSCALE_NONE_HIRES,
|
||||
.blitter = NCBLIT_PIXEL,
|
||||
.flags = NCVISUAL_OPTION_CHILDPLANE | NCVISUAL_OPTION_NODEGRADE,
|
||||
};
|
||||
struct ncplane* nv = ncvisual_render(nc, ncv, &vopts);
|
||||
struct ncplane* nv = ncvisual_blit(nc, ncv, &vopts);
|
||||
if(nv == NULL){
|
||||
ncvisual_destroy(ncv);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user