Don't bias the nccell width by 1, or 0-length EGCs become
255 columns. We weren't actually using the width to drive
much anything until now, so this wasn't a problem, but it
is exposed as an error once we got rid of CELL_WIDE_ASIAN
and start looping through the actual egc column width.
Closes#1278, closes#1277
Improve the documentation for ncplane_set_base_cell() and
ncplane_set_base(). Go by render.c's authority (all three
channels are independently checked for transparency, and
replaced with the base cell if so--egc, fg, and bg). Add a
BASE CELL section to notcurses_plane.3. Check for, and reject,
an nccell which is secondary among a multicolumn EGC.
Closes#1238.
Add a new member 'sextants' to the terminfo cache (both
notcurses and ncvisual contain one of these, and both
initialize it the same way -- interrogate_terminfo()).
Add a new function, 'notcurses_media_defblitter()', and
deprecate 'ncvisual_default_blitter()' (the latter didn't
receive enough information to return NCBLIT_3x2). Update
all callers. Add new *internal* function rgba_default_blitter(),
so this logic can be freely changed in the future. If
sextants are available, and we're scaling, return NCBLIT_3x2.
Once we detect sextant availability, we'll have sexblitter
as a default -- stay tuned! #1114
Thread out ncls to perform the media decode in different threads, in parallel. Only the display needs be locked. On a directory of 200 files on my 39070X, this speeds ncls from ~5s to ~1s. On 75 files, we go from ~.5s to ~.2s. On a single file, we lose about 5%. To facilitate this, ncdirect_render_image() has been split into two helpers, ncdirect_render_frame() and ncdirect_raster_frame().
Progress bars now support four 32-bit channels in ncprogbar_options, and uses them to color a gradient. The redraw procedure has been changed from O(n) to O(1). ASCII progress bars have been repaired. Closes#1213.
Some EGCs are more than 2 columns (wcwidth() never returns more than 2, so far as i can tell, but when multiple characters combine, we use the sum). An example would be ကြေ (Myanmar) which occupies three columns over the course of three characters. Track the width (biased by 1) in cell->width, taking over 8 bits from cell->reserved. Use this width in rasterization. Closes#1203.
- Disambiguate the docs for ncplane_erase()
- Add ncpile_top(), ncpile_bottom()
- Refuse attempts to modify the standard plane's resizecb
- Copy alignment and resizecb in ncplane_dup()
- Add cell_load_egc32()
CMake:
Simplify cmake target+version config generation and make it actually
work. With the changes it is now possible to detect and use
`Notcurses` in the following way:
find_package(Notcurses REQUIRED)
...
target_link_libraries(myapp PRIVATE notcurses::notcurses)
Also, added the same CMake configuration for `Notcurses++`, to be used
in the following way:
find_package(Notcurses REQUIRED
find_package(Notcurses++ REQUIRED)
...
target_link_libraries(myapp PRIVATE notcurses++::notcurses++)
Docs:
`notcurses_cell(3)`: `cell_styles_{on,off} -> cell_{on,off}_styles`
and `cell_load_simple` -> `cell_load_char`
C++ API:
* Plane: added constructors taking `ncplane_options const&` instead of
the multitude of individual parameters
* Plane: drop `struct` when `ncplane_options` is used.
* Plane: added `strdup` (`cell_strdup`)
* Plane: added `extract` (`cell_extract`)
Added:
* Pile: new class derived from Plane, which implements all the
`ncpile_*` calls
* Plane: `get_parent` (`ncplane_parent`)
* Plane: protected constructor for use by `Pile` (or other derived
classes which cannot provide a valid `ncplane*` when invoking parent
constructor.
* Plane: `set_plane` for use by the derived classes above.
Changed:
* Plane: `to_ncplane` is a `const` method now.