mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
add NCVISUAL_OPTION_NOINTERPOLATE #1576
This commit is contained in:
parent
617071cf2c
commit
a6433caeaa
13
USAGE.md
13
USAGE.md
@ -3183,12 +3183,13 @@ int notcurses_lex_blitter(const char* op, ncblitter_e* blitter);
|
||||
// Get the name of a blitter.
|
||||
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
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010ull // transcolor is transparent
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull // new plane is child of n
|
||||
#define NCVISUAL_OPTION_NODEGRADE 0x0001ull // fail rather than degrade
|
||||
#define NCVISUAL_OPTION_BLEND 0x0002ull // use CELL_ALPHA_BLEND
|
||||
#define NCVISUAL_OPTION_HORALIGNED 0x0004ull // x is an alignment, not abs
|
||||
#define NCVISUAL_OPTION_VERALIGNED 0x0008ull // y is an alignment, not abs
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010ull // transcolor is in effect
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull // interpret n as parent
|
||||
#define NCVISUAL_OPTION_NOINTERPOLATE 0x0040ull // non-interpolative scaling
|
||||
|
||||
struct ncvisual_options {
|
||||
// if no ncplane is provided, one will be created using the exact size
|
||||
|
@ -30,12 +30,13 @@ typedef enum {
|
||||
NCBLIT_8x1, // eight vertical levels, (plots)
|
||||
} ncblitter_e;
|
||||
|
||||
#define NCVISUAL_OPTION_NODEGRADE 0x0001
|
||||
#define NCVISUAL_OPTION_BLEND 0x0002
|
||||
#define NCVISUAL_OPTION_HORALIGNED 0x0004
|
||||
#define NCVISUAL_OPTION_VERALIGNED 0x0008
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020
|
||||
#define NCVISUAL_OPTION_NODEGRADE 0x0001ull
|
||||
#define NCVISUAL_OPTION_BLEND 0x0002ull
|
||||
#define NCVISUAL_OPTION_HORALIGNED 0x0004ull
|
||||
#define NCVISUAL_OPTION_VERALIGNED 0x0008ull
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010ull
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull
|
||||
#define NCVISUAL_OPTION_NOINTERPOLATE 0x0040ull
|
||||
|
||||
struct ncvisual_options {
|
||||
struct ncplane* n;
|
||||
|
@ -2443,12 +2443,13 @@ API ALLOC struct ncvisual* ncvisual_from_plane(const struct ncplane* n,
|
||||
int begy, int begx,
|
||||
int leny, int lenx);
|
||||
|
||||
#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
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010ull // transcolor is in effect
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull // interpret n as parent
|
||||
#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
|
||||
#define NCVISUAL_OPTION_ADDALPHA 0x0010ull // transcolor is in effect
|
||||
#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull // interpret n as parent
|
||||
#define NCVISUAL_OPTION_NOINTERPOLATE 0x0040ull // non-interpolative scaling
|
||||
|
||||
struct ncvisual_options {
|
||||
// if no ncplane is provided, one will be created using the exact size
|
||||
|
@ -3,7 +3,7 @@ use libnotcurses_sys::*;
|
||||
fn main() -> NcResult<()> {
|
||||
let mut nc = Notcurses::new()?;
|
||||
|
||||
let chan_blue = NcChannelPair::with_rgb(0x88aa00, 0x2222287);
|
||||
let chan_blue = NcChannelPair::with_rgb(0x88aa00, 0x22287);
|
||||
let chan_green = NcChannelPair::with_rgb(0x224411, 0x229922);
|
||||
|
||||
// FIXME: this doesn't show at all :/
|
||||
|
@ -1366,7 +1366,7 @@ int ncpile_render(ncplane* n){
|
||||
if(engorge_crender_vector(pile)){
|
||||
return -1;
|
||||
}
|
||||
// FIXME notcurses_stdplane() doesn't belong here
|
||||
// FIXME notcurses_stdplane() doesn't belong here #1615
|
||||
ncpile_render_internal(n, pile->crender, pile->dimy, pile->dimx,
|
||||
notcurses_stdplane(nc)->absy,
|
||||
notcurses_stdplane(nc)->absx);
|
||||
|
@ -139,7 +139,7 @@ int ncvisual_blitset_geom(const notcurses* nc, const tinfo* tcache,
|
||||
if(lenx == NULL){
|
||||
lenx = &fakelenx;
|
||||
}
|
||||
if(vopts && vopts->flags >= (NCVISUAL_OPTION_CHILDPLANE << 1u)){
|
||||
if(vopts && vopts->flags >= (NCVISUAL_OPTION_NOINTERPOLATE << 1u)){
|
||||
logwarn(nc, "Warning: unknown ncvisual options %016jx\n", (uintmax_t)vopts->flags);
|
||||
}
|
||||
if(vopts && (vopts->flags & NCVISUAL_OPTION_CHILDPLANE) && !vopts->n){
|
||||
|
Loading…
x
Reference in New Issue
Block a user