[ncvisual] fix NCVISUAL_OPTION_VERALIGNED definition

pull/1480/head
nick black 3 years ago
parent 51182e3315
commit c87992c452
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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).

@ -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

@ -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

Loading…
Cancel
Save