pixel PoC: switch colors around under pixel glyph #1388

This commit is contained in:
nick black 2021-03-16 00:48:16 -04:00
parent 2eff848061
commit cd1f5bd0d0
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -10,9 +10,9 @@ handle(struct notcurses* nc, const char *fn){
}
int dimy, dimx;
struct ncplane* stdn = notcurses_stddim_yx(nc, &dimy, &dimx);
uint64_t channels = CHANNELS_RGB_INITIALIZER(100, 140, 100, 140, 100, 140);
ncplane_set_base(stdn, "a", 0, channels);
for(int x = 0 ; x < dimx ; x += 15){
uint64_t channels = CHANNELS_RGB_INITIALIZER(random() % 256, random() % 256, 100, random() % 256, 100, 140);
ncplane_set_base(stdn, "a", 0, channels);
struct ncvisual_options vopts = {
.x = x,
.scaling = NCSCALE_NONE_HIRES,
@ -24,8 +24,12 @@ handle(struct notcurses* nc, const char *fn){
return -1;
}
notcurses_render(nc);
ncplane_destroy(nv);
sleep(1);
channels = CHANNELS_RGB_INITIALIZER(random() % 256, random() % 256, 100, random() % 256, 100, 140);
ncplane_set_base(stdn, "a", 0, channels);
notcurses_render(nc);
sleep(1);
ncplane_destroy(nv);
}
ncvisual_destroy(ncv);
return 0;