|
|
|
@ -78,7 +78,7 @@ typedef int (*streamcb)(struct notcurses*, struct ncvisual*, void*);
|
|
|
|
|
|
|
|
|
|
**int ncvisual_resize(struct ncvisual* ***n***, int ***rows***, int ***cols***);**
|
|
|
|
|
|
|
|
|
|
**int ncvisual_inflate(struct ncvisual* ***n***, int ***scale***);**
|
|
|
|
|
**int ncvisual_resize_noninterpolative(struct ncvisual* ***n***, int ***rows***, int ***cols***);**
|
|
|
|
|
|
|
|
|
|
**int ncvisual_polyfill_yx(struct ncvisual* ***n***, int ***y***, int ***x***, uint32_t ***rgba***);**
|
|
|
|
|
|
|
|
|
@ -114,13 +114,13 @@ per frame. **ncvisual_decode_loop** will return to the first frame,
|
|
|
|
|
as if **ncvisual_decode** had never been called.
|
|
|
|
|
|
|
|
|
|
Once the visual is loaded, it can be transformed using **ncvisual_rotate**,
|
|
|
|
|
**ncvisual_resize**, and **ncvisual_inflate**. These are persistent operations,
|
|
|
|
|
unlike any scaling that takes place at render time. If a subtitle is associated
|
|
|
|
|
with the frame, it can be acquired with **ncvisual_subtitle**.
|
|
|
|
|
**ncvisual_resize** uses the media layer's best scheme to enlarge or shrink the
|
|
|
|
|
original data, typically involving some interpolation. **ncvisual_inflate**
|
|
|
|
|
maps each pixel to ***scale***x***scale*** pixels square, retaining the
|
|
|
|
|
original color; it is an error if ***scale*** is less than one.
|
|
|
|
|
**ncvisual_resize**, and **ncvisual_resize_noninterpolative**. These are
|
|
|
|
|
persistent operations, unlike any scaling that takes place at render time. If a
|
|
|
|
|
subtitle is associated with the frame, it can be acquired with
|
|
|
|
|
**ncvisual_subtitle**. **ncvisual_resize** uses the media layer's best scheme
|
|
|
|
|
to enlarge or shrink the original data, typically involving some interpolation.
|
|
|
|
|
**ncvisual_resize_noninterpolative** performs a naive linear sampling,
|
|
|
|
|
retaining only original colors.
|
|
|
|
|
|
|
|
|
|
**ncvisual_from_rgba** and **ncvisual_from_bgra** both require a number of
|
|
|
|
|
***rows***, a number of image columns **cols**, and a virtual row length of
|
|
|
|
@ -228,9 +228,8 @@ instance **NCSCALE_SCALE_HIRES** and a large image), more rows and columns will
|
|
|
|
|
result in more effective resolution.
|
|
|
|
|
|
|
|
|
|
A string can be transformed to a scaling mode with **notcurses_lex_scalemode**,
|
|
|
|
|
recognizing **stretch**, **scalehi**, **hires**, **scale**, **inflate**, and
|
|
|
|
|
**none**. Conversion in the opposite direction is performed with
|
|
|
|
|
**notcurses_str_scalemode**.
|
|
|
|
|
recognizing **stretch**, **scalehi**, **hires**, **scale**, and **none**.
|
|
|
|
|
Conversion in the opposite direction is performed with **notcurses_str_scalemode**.
|
|
|
|
|
|
|
|
|
|
Assuming a cell is twice as tall as it is wide, **NCBLIT_1x1** (and indeed
|
|
|
|
|
any NxN blitter) will stretch an image by a factor of 2 in the vertical
|
|
|
|
|