mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
USAGE: pixel -> ncpixel
This commit is contained in:
parent
465f4694b8
commit
71f6b7b02e
8
USAGE.md
8
USAGE.md
@ -2647,7 +2647,7 @@ It is sometimes desirable to modify the pixels of an `ncvisual` directly.
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
static inline int
|
static inline int
|
||||||
pixel_set_r(uint32_t* pixel, int r){
|
ncpixel_set_r(uint32_t* pixel, int r){
|
||||||
if(r > 255 || r < 0){
|
if(r > 255 || r < 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2656,7 +2656,7 @@ pixel_set_r(uint32_t* pixel, int r){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
pixel_set_g(uint32_t* pixel, int g){
|
ncpixel_set_g(uint32_t* pixel, int g){
|
||||||
if(g > 255 || g < 0){
|
if(g > 255 || g < 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2665,7 +2665,7 @@ pixel_set_g(uint32_t* pixel, int g){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
pixel_set_b(uint32_t* pixel, int b){
|
ncpixel_set_b(uint32_t* pixel, int b){
|
||||||
if(b > 255 || b < 0){
|
if(b > 255 || b < 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2675,7 +2675,7 @@ pixel_set_b(uint32_t* pixel, int b){
|
|||||||
|
|
||||||
// set the RGB values of an RGB pixel
|
// set the RGB values of an RGB pixel
|
||||||
static inline int
|
static inline int
|
||||||
pixel_set_rgb(uint32_t* pixel, int r, int g, int b){
|
ncpixel_set_rgb(uint32_t* pixel, int r, int g, int b){
|
||||||
if(pixel_set_r(pixel, r) || pixel_set_g(pixel, g) || pixel_set_b(pixel, b)){
|
if(pixel_set_r(pixel, r) || pixel_set_g(pixel, g) || pixel_set_b(pixel, b)){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ videothread(void* vnc){
|
|||||||
struct timespec fade;
|
struct timespec fade;
|
||||||
timespec_mul(&demodelay, 2, &fade);
|
timespec_mul(&demodelay, 2, &fade);
|
||||||
demo_render(nc);
|
demo_render(nc);
|
||||||
|
// vopts carries through 'changes.jpg', sitting above the standard plane
|
||||||
ncplane_fadeout(vopts.n, &fade, demo_fader, NULL);
|
ncplane_fadeout(vopts.n, &fade, demo_fader, NULL);
|
||||||
ncplane_destroy(vopts.n);
|
ncplane_destroy(vopts.n);
|
||||||
struct ncplane* apiap = ncplane_new(nc, 1, cols, rows - 1, 0, NULL);
|
struct ncplane* apiap = ncplane_new(nc, 1, cols, rows - 1, 0, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user