1#ifndef __NCPP_VISUAL_HH
2#define __NCPP_VISUAL_HH
23 if (visual ==
nullptr)
24 throw init_error (
"Notcurses failed to create a new visual");
27 explicit Visual (
const uint32_t* rgba,
int rows,
int rowstride,
int cols)
31 if (visual ==
nullptr)
32 throw init_error (
"Notcurses failed to create a new visual");
39 if (visual ==
nullptr)
40 throw init_error (
"Notcurses failed to create a new visual");
45 if (!is_notcurses_stopped ())
71 return error_guard<ncplane*, ncplane*> (
ncvisual_blit (get_notcurses (), visual,
vopts),
nullptr);
76 return error_guard<int> (
ncvisual_stream (get_notcurses (), visual, timescale, streamer,
vopts, curry), -1);
104 bool at (
int y,
int x, uint32_t* pixel)
const
106 if (pixel ==
nullptr)
118 void common_init (
ncplane *plane,
const char *file)
120 if (plane ==
nullptr)
124 if (visual ==
nullptr)
125 throw init_error (
"Notcurses failed to create a new visual");
Visual(const Plane &p, ncblitter_e blit, unsigned begy, unsigned begx, unsigned leny, unsigned lenx)
int decode() const noexcept
bool geom(const struct ncvisual_options *vopts, ncvgeom *geom) const NOEXCEPT_MAYBE
bool at(int y, int x, uint32_t *pixel) const
ncplane * subtitle(Plane &parent) noexcept
int polyfill(int y, int x, uint32_t rgba) const NOEXCEPT_MAYBE
ncplane * blit(const ncvisual_options *vopts) const NOEXCEPT_MAYBE
bool set(int y, int x, uint32_t pixel) const NOEXCEPT_MAYBE
int decode_loop() const noexcept
int stream(const ncvisual_options *vopts, float timescale, ncstreamcb streamer, void *curry=nullptr) const NOEXCEPT_MAYBE
Visual(const uint32_t *rgba, int rows, int rowstride, int cols)
bool simple_streamer(ncvisual_options *vopts, const timespec *tspec, void *curry=nullptr) const NOEXCEPT_MAYBE
bool rotate(double rads) const NOEXCEPT_MAYBE
const struct ncplane_options struct ncvisual struct ncvisual_options * vopts
int(* ncstreamcb)(struct ncvisual *, struct ncvisual_options *, const struct timespec *, void *)
ncvisual * ncvisual_from_rgba(const void *rgba, int rows, int rowstride, int cols)
int ncvisual_decode(ncvisual *nc)
int ncvisual_set_yx(const struct ncvisual *n, unsigned y, unsigned x, uint32_t pixel)
ncvisual * ncvisual_from_file(const char *filename)
ncplane * ncvisual_subtitle_plane(ncplane *parent, const ncvisual *ncv)
int ncvisual_decode_loop(ncvisual *nc)
int ncvisual_rotate(ncvisual *ncv, double rads)
ncvisual * ncvisual_from_plane(const ncplane *n, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx)
int ncvisual_stream(notcurses *nc, ncvisual *ncv, float timescale, ncstreamcb streamer, const struct ncvisual_options *vopts, void *curry)
void ncvisual_destroy(ncvisual *ncv)
int ncvisual_geom(const notcurses *nc, const ncvisual *n, const struct ncvisual_options *vopts, ncvgeom *geom)
int ncvisual_simple_streamer(ncvisual *ncv, struct ncvisual_options *vopts, const struct timespec *tspec, void *curry)
int ncvisual_polyfill_yx(ncvisual *n, unsigned y, unsigned x, uint32_t rgba)
int ncvisual_at_yx(const ncvisual *n, unsigned y, unsigned x, uint32_t *pixel)
ncplane * ncvisual_blit(notcurses *nc, ncvisual *ncv, const struct ncvisual_options *vopts)