mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
kill NCSCALE_INFLATE #1576
This commit is contained in:
parent
4bf14935f5
commit
ea13e25cf4
@ -349,8 +349,6 @@ due to Sixel requirements. `outputx` will currently always equal `scaledx`.
|
||||
the relationship of `inputy`/`inputx` to `scaledy`/`scaledx` is as follows:
|
||||
|
||||
* `NCSCALE_NONE`: equal
|
||||
* `NCSCALE_INFLATE`: `scaledy` = `inputy` * *N*, `scaledx` = `inputx` * *N*,
|
||||
where *N* is an integer.
|
||||
* `NCSCALE_SCALE`: `scaledy` = `inputy` * *F*, `scaledx` = `inputx` * *F*, where
|
||||
*F* is a float, and at least one of `outputy` and `outputx` maximize the
|
||||
space within the target plane relative to mandatory scaling.
|
||||
|
@ -16,7 +16,6 @@ typedef enum {
|
||||
NCSCALE_STRETCH,
|
||||
NCSCALE_NONE_HIRES,
|
||||
NCSCALE_SCALE_HIRES,
|
||||
NCSCALE_INFLATE,
|
||||
} ncscale_e;
|
||||
|
||||
typedef enum {
|
||||
|
@ -87,18 +87,16 @@ typedef enum {
|
||||
|
||||
// How to scale an ncvisual during rendering. NCSCALE_NONE will apply no
|
||||
// scaling. NCSCALE_SCALE scales a visual to the plane's size, maintaining
|
||||
// aspect ratio. NCSCALE_INFLATE does the same, but without interpolation.
|
||||
// NCSCALE_STRETCH stretches and scales the image in an attempt to fill the
|
||||
// entirety of the plane. NCSCALE_NONE_HIRES and NCSCALE_SCALE_HIRES behave
|
||||
// like their counterparts, but admit blitters which don't preserve aspect
|
||||
// ratio.
|
||||
// aspect ratio. NCSCALE_STRETCH stretches and scales the image in an attempt
|
||||
// to fill the entirety of the plane. NCSCALE_NONE_HIRES and
|
||||
// NCSCALE_SCALE_HIRES behave like their counterparts, but admit blitters
|
||||
// which don't preserve aspect ratio.
|
||||
typedef enum {
|
||||
NCSCALE_NONE,
|
||||
NCSCALE_SCALE,
|
||||
NCSCALE_STRETCH,
|
||||
NCSCALE_NONE_HIRES,
|
||||
NCSCALE_SCALE_HIRES,
|
||||
NCSCALE_INFLATE,
|
||||
} ncscale_e;
|
||||
|
||||
// Returns the number of columns occupied by a multibyte (UTF-8) string, or
|
||||
|
@ -2540,8 +2540,6 @@ lex_long(const char* op, int* i, char** endptr){
|
||||
int notcurses_lex_scalemode(const char* op, ncscale_e* scalemode){
|
||||
if(strcasecmp(op, "stretch") == 0){
|
||||
*scalemode = NCSCALE_STRETCH;
|
||||
}else if(strcasecmp(op, "inflate") == 0){
|
||||
*scalemode = NCSCALE_INFLATE;
|
||||
}else if(strcasecmp(op, "scalehi") == 0){
|
||||
*scalemode = NCSCALE_SCALE_HIRES;
|
||||
}else if(strcasecmp(op, "hires") == 0){
|
||||
@ -2559,8 +2557,6 @@ int notcurses_lex_scalemode(const char* op, ncscale_e* scalemode){
|
||||
const char* notcurses_str_scalemode(ncscale_e scalemode){
|
||||
if(scalemode == NCSCALE_STRETCH){
|
||||
return "stretch";
|
||||
}else if(scalemode == NCSCALE_INFLATE){
|
||||
return "inflate";
|
||||
}else if(scalemode == NCSCALE_SCALE){
|
||||
return "scale";
|
||||
}else if(scalemode == NCSCALE_NONE){
|
||||
|
Loading…
x
Reference in New Issue
Block a user