mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
ncvisual_rewind
This commit is contained in:
parent
aa06831853
commit
8919d6fe70
3
NEWS.md
3
NEWS.md
@ -1,6 +1,9 @@
|
|||||||
This document attempts to list user-visible changes and any major internal
|
This document attempts to list user-visible changes and any major internal
|
||||||
rearrangements of Notcurses.
|
rearrangements of Notcurses.
|
||||||
|
|
||||||
|
* 2.0.2 (not yet released)
|
||||||
|
* Add `ncvisual_rewind()`.
|
||||||
|
|
||||||
* 2.0.1 (2020-10-19)
|
* 2.0.1 (2020-10-19)
|
||||||
* Add `ncmenu_item_set_status()` for disabling or enabling menu items.
|
* Add `ncmenu_item_set_status()` for disabling or enabling menu items.
|
||||||
* Disabled menu items cannot be selected.
|
* Disabled menu items cannot be selected.
|
||||||
|
4
USAGE.md
4
USAGE.md
@ -2662,6 +2662,10 @@ And finally, the `ncvisual` can be blitted to one or more `ncplane`s:
|
|||||||
struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv,
|
struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv,
|
||||||
const struct ncvisual_options* vopts);
|
const struct ncvisual_options* vopts);
|
||||||
|
|
||||||
|
// rewind to the first frame of the ncvisual. a subsequent `ncvisual_render()`
|
||||||
|
// will render the first frame, as if the ncvisual had been closed and reopened.
|
||||||
|
int ncvisual_rewind(struct ncvisual* nc);
|
||||||
|
|
||||||
// each has the empty cell in addition to the product of its dimensions. i.e.
|
// each has the empty cell in addition to the product of its dimensions. i.e.
|
||||||
// NCBLIT_1x1 has two states: empty and full block. NCBLIT_1x1x4 has five
|
// NCBLIT_1x1 has two states: empty and full block. NCBLIT_1x1x4 has five
|
||||||
// states: empty, the three shaded blocks, and the full block.
|
// states: empty, the three shaded blocks, and the full block.
|
||||||
|
BIN
data/normal.png
BIN
data/normal.png
Binary file not shown.
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 136 KiB |
@ -64,6 +64,8 @@ typedef int (*streamcb)(struct notcurses*, struct ncvisual*, void*);
|
|||||||
|
|
||||||
**int ncvisual_decode(struct ncvisual* nc);**
|
**int ncvisual_decode(struct ncvisual* nc);**
|
||||||
|
|
||||||
|
**int ncvisual_rewind(struct ncvisual* nc);**
|
||||||
|
|
||||||
**struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, const struct ncvisual_options* vopts);**
|
**struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, const struct ncvisual_options* vopts);**
|
||||||
|
|
||||||
**int ncvisual_simple_streamer(struct ncplane* n, struct ncvisual* ncv, const struct timespec* disptime, void* curry);**
|
**int ncvisual_simple_streamer(struct ncplane* n, struct ncvisual* ncv, const struct timespec* disptime, void* curry);**
|
||||||
@ -102,7 +104,8 @@ image and video files can be loaded into visuals using
|
|||||||
**ncvisual_from_file**. **ncvisual_from_file** discovers the container
|
**ncvisual_from_file**. **ncvisual_from_file** discovers the container
|
||||||
and codecs, but does not verify that the entire file is well-formed.
|
and codecs, but does not verify that the entire file is well-formed.
|
||||||
**ncvisual_decode** ought be invoked to recover subsequent frames, once
|
**ncvisual_decode** ought be invoked to recover subsequent frames, once
|
||||||
per frame.
|
per frame. **ncvisual_rewind** will return to the beginning of a multiframe
|
||||||
|
visual, as if **ncvisual_decode** had never been called on it.
|
||||||
|
|
||||||
Once the visual is loaded, it can be transformed using **ncvisual_rotate**
|
Once the visual is loaded, it can be transformed using **ncvisual_rotate**
|
||||||
and **ncvisual_resize**. These are persistent operations, unlike any scaling
|
and **ncvisual_resize**. These are persistent operations, unlike any scaling
|
||||||
|
@ -2316,6 +2316,10 @@ API void ncvisual_destroy(struct ncvisual* ncv);
|
|||||||
// success, and -1 on failure.
|
// success, and -1 on failure.
|
||||||
API int ncvisual_decode(struct ncvisual* nc);
|
API int ncvisual_decode(struct ncvisual* nc);
|
||||||
|
|
||||||
|
// rewind to the first frame of the ncvisual. a subsequent `ncvisual_render()`
|
||||||
|
// will render the first frame, as if the ncvisual had been closed and reopened.
|
||||||
|
API int ncvisual_rewind(struct ncvisual* nc);
|
||||||
|
|
||||||
// Rotate the visual 'rads' radians. Only M_PI/2 and -M_PI/2 are
|
// Rotate the visual 'rads' radians. Only M_PI/2 and -M_PI/2 are
|
||||||
// supported at the moment, but this will change FIXME.
|
// supported at the moment, but this will change FIXME.
|
||||||
API int ncvisual_rotate(struct ncvisual* n, double rads);
|
API int ncvisual_rotate(struct ncvisual* n, double rads);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user