keller: add pixel iteration #1281

pull/1383/head
nick black 3 years ago
parent 49c7b6be3f
commit 1b2aedff67
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -547,6 +547,7 @@ int main(int argc, char** argv){
if(notcurses_mouse_enable(nc)){
goto err;
}
notcurses_check_pixel_support(nc);
if(input_dispatcher(nc)){
goto err;
}

@ -9,12 +9,18 @@ visualize(struct notcurses* nc, struct ncvisual* ncv){
NCBLIT_2x2,
NCBLIT_3x2,
NCBLIT_BRAILLE,
NCBLIT_PIXEL,
};
for(size_t i = 0 ; i < sizeof(bs) / sizeof(*bs) ; ++i){
if(bs[i] == NCBLIT_PIXEL && !notcurses_canpixel(nc)){
// FIXME throw up an indicator?
continue;
}
struct ncvisual_options vopts = {
.scaling = NCSCALE_STRETCH,
.blitter = bs[i],
.n = notcurses_stdplane(nc),
.y = bs[i] == NCBLIT_PIXEL,
};
if(ncvisual_render(nc, ncv, &vopts) == NULL){
return -1;

Loading…
Cancel
Save