mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
pixel PoC: switch colors around under pixel glyph #1388
This commit is contained in:
parent
2eff848061
commit
cd1f5bd0d0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user