diff --git a/USAGE.md b/USAGE.md index d493dd078..581d058c1 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3100,6 +3100,7 @@ const char* notcurses_str_blitter(ncblitter_e blitter); #define NCVISUAL_OPTION_NODEGRADE 0x0001ull // fail rather than degrade #define NCVISUAL_OPTION_BLEND 0x0002ull // use CELL_ALPHA_BLEND with visual #define NCVISUAL_OPTION_HORALIGNED 0x0004ull // x is an alignment, not absolute +#define NCVISUAL_OPTION_VERALIGNED 0x0008ull // y is an alignment, not absolute struct ncvisual_options { // if no ncplane is provided, one will be created using the exact size @@ -3113,7 +3114,8 @@ struct ncvisual_options { // if an ncplane is provided, y and x specify where the visual will be // rendered on that plane. otherwise, they specify where the created ncplane // will be placed relative to the standard plane's origin. x is an ncalign_e - // value if NCVISUAL_OPTION_HORALIGNED is provided. + // value if NCVISUAL_OPTION_HORALIGNED is provided. y is an ncalign_e + // value if NCVISUAL_OPTION_VERALIGNED is provided. int y, x; // the section of the visual that ought be rendered. for the entire visual, // pass an origin of 0, 0 and a size of 0, 0 (or the true height and width). diff --git a/doc/man/man3/notcurses_visual.3.md b/doc/man/man3/notcurses_visual.3.md index 06b79fd7d..3abedf06c 100644 --- a/doc/man/man3/notcurses_visual.3.md +++ b/doc/man/man3/notcurses_visual.3.md @@ -33,6 +33,7 @@ typedef enum { #define NCVISUAL_OPTION_NODEGRADE 0x0001 #define NCVISUAL_OPTION_BLEND 0x0002 #define NCVISUAL_OPTION_HORALIGNED 0x0004 +#define NCVISUAL_OPTION_VERALIGNED 0x0008 struct ncvisual_options { struct ncplane* n; @@ -161,7 +162,9 @@ section of the image. This might be larger (or smaller) than the visual area. the plane to start drawing. If **n** was **NULL** (new plane), they specify the origin of the new plane relative to the standard plane. If the **flags** field contains **NCVISUAL_OPTION_HORALIGNED**, the **x** parameter is -interpreted as an **ncalign_e** rather than an absolute position. +interpreted as an **ncalign_e** rather than an absolute position. If the +**flags** field contains **NCVISUAL_OPTION_VERALIGNED**, the **y** parameter +is interpreted as an **ncalign_e** rather than an absolute position. # BLITTERS diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index d79b87baa..b7658a322 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -2416,7 +2416,7 @@ API ALLOC struct ncvisual* ncvisual_from_plane(const struct ncplane* n, #define NCVISUAL_OPTION_NODEGRADE 0x0001ull // fail rather than degrade #define NCVISUAL_OPTION_BLEND 0x0002ull // use CELL_ALPHA_BLEND with visual #define NCVISUAL_OPTION_HORALIGNED 0x0004ull // x is an alignment, not absolute -#define NCVISUAL_OPTION_VERALIGNED 0x0004ull // y is an alignment, not absolute +#define NCVISUAL_OPTION_VERALIGNED 0x0008ull // y is an alignment, not absolute struct ncvisual_options { // if no ncplane is provided, one will be created using the exact size