Commit Graph

74 Commits (master)

Author SHA1 Message Date
joseLuís b1f636a2d9 [docs] rename plane/visual sections to regions 3 years ago
nick black 7a91a2f905 normalize cell initializer names (prefix with NC) 3 years ago
nick black efc57333a7 [demo] pass start time to demos for more precise deadlines 3 years ago
nick black 5ff59ce421
[putstr] take size_t* for sbytes, not int* #2331 3 years ago
nick black c20e859a6d [python] API conversions 3 years ago
nick black d29813457b stylemasks ought always be uint16_t 3 years ago
nick black a0b34f7062 [core] introduce ncvisual_geom(), replacing ncvisual_blitter_geom() #1684 3 years ago
nick black e95e2fac66 ncvisual_render -> ncvisual_blit (nctetris) 3 years ago
nick black 4f1de02710
replace random() with rand() for windows goodness 3 years ago
nick black 4bb85d28c8
use non-interpolative scaling with eagle/luigi 3 years ago
nick black cadd4aefee s/CELL_ALPHA_/NCCELL_ALPHA_/g 3 years ago
Nick Black 8c6cd6a630
Further work on opacity optimizations (#1549)
* [bitmap] on move, clear old OPAQUE cells #1527
* update ncvisual_blitter_geom() documentation #1547
* replace some ncvisual_blitter_geom with NCVISUAL_OPTION_VERALIGNED
* [normal] replace ncvisual_blitter_geom with NCVISUAL_OPTION_VERALIGNED
* [intro] use ncvisual_blitter_geom() correctly #1547
* ncvisual_blitter_geom: only set *blitter on success
3 years ago
nick black 96ac640733
cell->nccell 3 years ago
nick black d504e972cc
cell_release -> nccell_release 3 years ago
Nick Black 04b1ba8ed2
Dankamongmen/unify geom (#1514)
deprecate ncvisual_geom() in favor of new ncvisual_blitter_geom(), which allows caller to get the blitter used. replace the checks and calculations in ncvisual_render() with a call to ncvisual_blitter_geom(), unifying the two paths (and eliminating several bugs in the unloved ncvisual_geom()).
3 years ago
nick black af91bfb015 [eagle] don't run pixel background 3 years ago
nick black 836f356305 [debug] setab, not setbf 3 years ago
nick black 91e932ed26 ncvisual_render: handle NCSCALE_NONE_HIRES #1250 4 years ago
nick black dd1cdc40d5 add NCSCALE_NONE_HIRES, NCSCALE_SCALE_HIRES #1250 4 years ago
nick black 4d8efcab82
Progress towards NCBLIT_3x2 by default
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
4 years ago
nick black fd2acde1b1 rename cell->nccell, keep alias #1200 4 years ago
nick black 73d9668d13
de-picklize eagles with help from k. sarkozy 4 years ago
nick black 3ce7d36eed
eagle demo: explicitly request NCBLIT_2x2 4 years ago
nick black 61baabe9a1 eagle, HUD: use default blitter 4 years ago
nick black 3e209f3539 eagle, luigi, sliders, outro: ncplane_create #1115 4 years ago
nick black 61aa96fd8a
eagle: 3x2->2x2 to match cowardly defaults 4 years ago
nick black 16bffab27a
eagle demo: use NCBLIT_3x2 4 years ago
nick black a4367fcfb5 rip out ncplane_ creation functions #985 4 years ago
nick black b7a57eaab7 convert all channel rgb calls #985 4 years ago
nick black 4dd1d6a4c8 Annihilate nc_err_e and all infrastructure #948 4 years ago
nick black 0c6f160493
eagle: always zoom to target area #732 4 years ago
nick black 699407a14a
eagle demo: don't STRETCH for geom() call 4 years ago
Nick Black 0084dbaa6d
qrcode generalization #699 (#713)
Add convenience function ncplane_home(). Add an ncblitter_e param
to ncplane_qrcode(), and split int maxversion into value-result
int* ymax and int* xmax. Write the actual sizes of the resulting
visual into these parameters. Update the qrcode demo. Add the
qrcode PoC. Update demos to ncplane_home(), where possible.

ncplane_qrcode() now takes an ncblitter_e and two value-result int*s
in the place of a single value int. The final size of the displayed qrcode
is written to *ymax and *xmax. If the code can't fit within the specified
dimensions, an error is returned. Standard rules for pluggable blitters
apply regarding fallback etc. #699
4 years ago
nick black 20322fe805
demo improvements for ASCII mode (#696)
* eagle: use new ncvisual_geom() to properly zoom
* qrcode: skip for now (#699)
* luigi: draw with spaces, not full blocks
4 years ago
nick black af46077775
ncvisual_geom: take degradation into account #697
In order to properly determine the scaling of an ncvisual to
be rendered, ncvisual_geom() needs know the blitting method.
For this reason, it took an ncblitter_e argument. It also,
however, needs handle degradation, which means knowing whether
NCVISUAL_OPTIONS_NODEGRADE is in use. It thus really wants the
struct ncvisual_options. Pass and accept it. Closes #697, and
fixes the "yield" demo in ASCII mode (#696).
4 years ago
nick black 0e1617811f
eagle: require UTF8 for now #697 #696 4 years ago
nick black b172d2b97e
NCVISUAL_OPTION_MAYDEGRADE -> NCVISUAL_OPTION_NODEGRADE, doc 'em 4 years ago
nick black 4f5c8ef3d7 eagle/outro support for non-multimedia builds 4 years ago
nick black 33318254b2
absorb first ncvisual_decode into ncvisual_from_file() #655 4 years ago
Nick Black ebcba82d4b
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:

Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:

decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.

There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().

This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.

The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.

Closes #638, #562, and #622.
4 years ago
nick black 9675ed251e
eagle demo: work with ascii mode #634 4 years ago
nick black 9a80750316
notcurses_canopen: split into images/videos #598 4 years ago
nick black 39548acc3a rename ncvisual_open_plane->ncvisual_from_file() #560 4 years ago
nick black 0b4ada19b1 Remove AVFrame from API #532 4 years ago
nick black 2037cdfacb move libav.c to nc_err_e #532 4 years ago
nick black ad0685aa1b switch to nc_err_e #532 4 years ago
nick black 67100dc5e9
Process menu/HUD input in demo_nanosleep() #509 4 years ago
nick black ae1421db15
ncvisual_render() API change/documentation #422
ncvisual_render() now returns the number of cells emitted
rather than just 0/-1. -1 is still returned on failure.
Rather than 0 for length meaning "all possible length", it
now means 0, and -1 means "all possible length". All demos,
tests, and PoCs have been updated. #422
4 years ago
Nick Black c056a0a026
Subregion renders #293 (#404)
Add four new fields to notcurses_options: margin_{tblr}, which requests margins to the top, right, bottom, and left. Render only within those margins, leaving the screen otherwise untouched (well, cleared if using the alternate screen). #293
4 years ago
nick black c6520ab84c add notcurses_drop_planes, use from demo #346 4 years ago