Commit Graph

79 Commits (11287b608152c9eca71c67284219276183fb8409)

Author SHA1 Message Date
nick black 6d2ba86acc
Clear screen if we want smcup but it's not available #817 4 years ago
nick black 0e7e8b02eb
notcurses-input: refresh on start to clear screen in absence of smcup 4 years ago
nick black 09f3f9097d
input: extract most of main() into input_demo() 4 years ago
nick black b172d2b97e
NCVISUAL_OPTION_MAYDEGRADE -> NCVISUAL_OPTION_NODEGRADE, doc 'em 4 years ago
nick black 0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 4 years ago
nick black f47bde1c4e
Graceful fallback among blitters #637
If we're in ASCII mode, no blitter except for NCBLIT_1x1 is going to
work. Whenever NCBLIT_DEFAULT is provided, select NCBLIT_1x1 if we're
in ASCII mode. Add NCVISUAL_OPTIONS_MAYDEGRADE and
NCPLOT_OPTIONS_MAYDEGRADE. Both serve to allow smooth degradation when a
blitter other than NCBLIT_DEFAULT has been provided. Closes #637.

Make calc_gradient_cell() static inline so our templated ncppplot
implementation can use it (ugh). When using NCBLIT_1x1 for plots in
ASCII mode, use space rather than full block, and invert colors.

Use NCBLIT_DEFAULT in the demo for the FPS plot.
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 37a4114f42
O(1) z-axis moves #623
Replace the singly-linked z-axis with a doubly-linked list,
and reimplement all z-axis moves as O(1) functions.
Eliminate ncplane_move_{above/below}_unsafe(), as there are no
longer unsafe moves.
4 years ago
nick black e5b1c2cdea
view/demo/tetris: NCOPTION_INHIBIT_SETLOCALE 4 years ago
nick black 381263e9fe
Unify interrogate_terminfo() #614 4 years ago
nick black 84c51d9bde
perfect exponential plots #606
Previously, we had the first interval top out at 1.0. This made
clean mathematical sense, but it meant that we wasted the lowest
|states - 1| representations. We now top out at ibase**(states - 1).
The very bottom representation tops out at 1, meaning that any data
is always distinguishable from no data. We no longer explicitly
print spaces (aka the zeroth state for each glyph clade), so that
we can exhibit more transparency. Properly account for miny at
all times. Slots in an exponential plot are now exponential
throughout; before, it was exponential across rows, and linear
within a row.
4 years ago
nick black a440382fb5 demo: use NCPLOT_OPTIONS_EXPOENTIALD #470 4 years ago
nick black 66bafd59b3
subproc, fdplane, plot, selector, mselector: flag words #590 4 years ago
nick black ad0685aa1b switch to nc_err_e #532 4 years ago
Nick Black 0e73b9d3d5
Floating-point ncplot, genericize ncplot (#531)
* compile ncplot as c++ generic #446
* add floating-point plots #446
4 years ago
nick black 60e3e604a8
Handle fallout from reversion of Notcurses::render() semantic inversion (see #510) 4 years ago
nick black 0e47db3979 quadrant/braille step plots #461 4 years ago
nick black 6ec9b2d250 hrm 4 years ago
nick black d9884a5f74 8x1 4 years ago
nick black d274af34b9 ncplot: define 2x2 and 4x2 sets #461 4 years ago
nick black 4297bbb3dc
notcurses-input: hook up ^L #493 4 years ago
nick black 1a4c8bbf85
notcurses-input: flip for ncpp::render inversion 4 years ago
nick black be2be9442a
better colors on notcurses-input plot 5 years ago
nick black f08bbf83a7
notcurses-input: join ticker thread on exit 5 years ago
nick black b04a37c433
plots: always start from the right #457 5 years ago
nick black cb7e844db1 unify notcurses-input+notcurses-keyplot #455 5 years ago
Nick Black c2a645e9af
Rust wrapper work (#454)
* packaging: s/libtinfo/Terminfo/g
* rust: add stddim_yx()
* rust: check for valid init in unit tests
* rust: serialize up tests
* constify notcurses_term_dim_yx()
* rust: add dim wrappers
* remove notcurses_resize() from public API #367
* call notcurses_resize() from notcurses_refresh() #367
5 years ago
nick black 0a8e5ef70d
notcurses_keyplot: error out on null ncplot 5 years ago
nick black 85c568b3a4
ncplot: redraw upon creation so axis labels are visible 5 years ago
nick black dfd54f540a keyplot: ticker thead so we needn't provide input 5 years ago
nick black 8214665b7e keyplot: only show yaxis labels on one plot #438 5 years ago
nick black 2a7ccffec6 ncplot: add labelaxisd, use it in keyplot #438 5 years ago
nick black c0f8d9b444
eliminate detectdomain, infer it from maxy==miny #439 5 years ago
nick black d2365b9f18 notcurses-keyplot: use full length of plane #436 5 years ago
nick black 1c75ac5bd3 plot: implement minchannel with ncplane_stain() #136 5 years ago
nick black 8f65958a53 plot: use at least maxchannel #136 5 years ago
nick black 68b4ba1706 plots: implement remaining vertical grid types #136 5 years ago
nick black 5f3eb3dc24 keyplot: add third plot, this one with half blocks #433 5 years ago
nick black f1f94deda8 keyplot: input loop #430 5 years ago
nick black 5bccf6b446 ncplot: implement x windowing #430 5 years ago
nick black b3cda0d09f notcurses-keyplot: throw a perimeter around base plane 5 years ago
nick black d2fe768c30 plot unit tests #430 5 years ago
nick black 359303ed83 notcurses-keyplot: read input 5 years ago
nick black b3e874a179 ncplot: fold minx, maxx into rangex 5 years ago
nick black 09d8912d4e notcurses-keyplot #430 5 years ago
nick black 5239900ac8 notcurses-input: upgrade shared_ptr to unique_ptr 5 years ago
nick black 5e27499194 add notcurses-keyplot #430 5 years ago
nick black 4af5c79b2a
notcurses-input: cast input to wchar_t for output 5 years ago
nick black 2ea10d4b28 Remove clear_screen_start option
As it turns out, we can't portably load the initial terminal contents
(there are some hacks of various EXTREME nature, but none of them are
worth it for the rather limited benefit). The O(1)-time damage
inference requires knowledge of what was previously present to
inibit unnecessary draws. We would then need some special cell value
indicating "not yet written to" to distinguish a purposeful null
cell from an initial cell. Again, we could do this, but for what value?

Finally, the idea of clearing new area on SIGWINCH was always flawed,
as we can't do that from a signal handler.

With the advent of direct mode #77, the reason for this largely goes
away in any case.
5 years ago
Marek Habersack 75a90461dd Add C++ bindings 5 years ago