mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
ncvisual_blit: call resize_bitmap() for implicit scaling without multimedia engine #1718
This commit is contained in:
parent
c64e6e265e
commit
383dc90842
@ -64,9 +64,18 @@ int ncvisual_blit(ncvisual* ncv, int rows, int cols, ncplane* n,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(rgba_blit_dispatch(n, bset, ncv->rowstride, ncv->data, rows, cols, barg) >= 0){
|
int stride = 4 * cols;
|
||||||
|
uint32_t* data = resize_bitmap(ncv->data, ncv->pixy, ncv->pixx,
|
||||||
|
ncv->rowstride, rows, cols, stride);
|
||||||
|
if(data == NULL){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if(rgba_blit_dispatch(n, bset, stride, data, rows, cols, barg) >= 0){
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
if(data != ncv->data){
|
||||||
|
free(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user