Commit Graph

88 Commits

Author SHA1 Message Date
nick black
85e55de569 recognize Tc unofficial terminfo capability as synonym for RGB 2021-07-11 17:27:04 -04:00
Nick Black
cd2b5de5fa
Panblitter ncplane_as_rgba() (#1697)
ncplane_as_rgba: genericize across blitters

ncplane_as_rgba() previously was implemented explicitly
in terms of NCBLIT_2x1. it now uses the `egcs` field of the
`blitset`. this supports NCBLIT_2x2 and NCBLIT_3x2 in
ncplane_rgba(). Closes #1490.
2021-06-01 02:25:11 -04:00
nick black
3eb004b61d s/channels/ncchannels/g #1570 2021-04-29 01:32:08 -04:00
nick black
4a36a3853e
notcurses-input: use 8x1 blitter for plot 2021-02-03 01:38:12 -05:00
nick black
14fa544433
add NCPLOT_OPTION_PRINTSAMPLE #1183 2020-12-06 06:33:54 -05:00
nick black
4d524f92bc apply htole() in ncpixel_*() #1130 2020-11-28 23:55:17 -05:00
nick black
e885d87d1a introduce NCKEY_ESC, use it everywhere 2020-10-15 07:46:32 -04:00
nick black
b7a57eaab7 convert all channel rgb calls #985 2020-09-18 01:39:21 -04:00
Nick Black
73dc0a7d69
Zoo 2, electric boogaloo (#939)
* Reimplement the widget zoo demo. The previous PoC
  was a multithreaded monster with behavior dependent
  on screen geometry. Replace it with a single thread state
  machine. Closes #936.
* Support titles for ncplot. Adds title to the ncplot_options
  struct, which may be NULL. Closes #941 .
* Properly color ncplot according to maxchannels and
  minchannels. Closes #940
* Add tools/function-table.sh script for generating public API list.
2020-08-23 12:44:53 -04:00
nick black
6d2ba86acc
Clear screen if we want smcup but it's not available #817 2020-07-22 17:53:46 -04:00
nick black
0e7e8b02eb
notcurses-input: refresh on start to clear screen in absence of smcup 2020-07-22 13:25:00 -04:00
nick black
09f3f9097d
input: extract most of main() into input_demo() 2020-06-08 05:14:22 -04:00
nick black
b172d2b97e
NCVISUAL_OPTION_MAYDEGRADE -> NCVISUAL_OPTION_NODEGRADE, doc 'em 2020-06-05 08:05:02 -04:00
nick black
0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 2020-05-29 14:53:53 -04:00
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.
2020-05-29 01:24:34 -04:00
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.
2020-05-28 21:16:58 -04:00
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.
2020-05-20 15:32:27 -04:00
nick black
e5b1c2cdea
view/demo/tetris: NCOPTION_INHIBIT_SETLOCALE 2020-05-19 08:52:36 -04:00
nick black
381263e9fe
Unify interrogate_terminfo() #614 2020-05-19 07:32:26 -04:00
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.
2020-05-16 23:30:07 -04:00
nick black
a440382fb5 demo: use NCPLOT_OPTIONS_EXPOENTIALD #470 2020-05-09 13:35:20 -04:00
nick black
66bafd59b3
subproc, fdplane, plot, selector, mselector: flag words #590 2020-05-09 09:06:06 -04:00
nick black
ad0685aa1b switch to nc_err_e #532 2020-04-24 04:17:56 -04:00
Nick Black
0e73b9d3d5
Floating-point ncplot, genericize ncplot (#531)
* compile ncplot as c++ generic #446
* add floating-point plots #446
2020-04-23 03:52:07 -04:00
nick black
60e3e604a8
Handle fallout from reversion of Notcurses::render() semantic inversion (see #510) 2020-04-18 15:28:26 -04:00
nick black
0e47db3979 quadrant/braille step plots #461 2020-04-16 11:41:20 -04:00
nick black
6ec9b2d250 hrm 2020-04-16 11:41:20 -04:00
nick black
d9884a5f74 8x1 2020-04-16 11:41:20 -04:00
nick black
d274af34b9 ncplot: define 2x2 and 4x2 sets #461 2020-04-16 11:41:20 -04:00
nick black
4297bbb3dc
notcurses-input: hook up ^L #493 2020-04-16 06:34:16 -04:00
nick black
1a4c8bbf85
notcurses-input: flip for ncpp::render inversion 2020-04-16 05:55:31 -04:00
nick black
be2be9442a
better colors on notcurses-input plot 2020-04-08 21:32:41 -04:00
nick black
f08bbf83a7
notcurses-input: join ticker thread on exit 2020-04-08 21:29:24 -04:00
nick black
b04a37c433
plots: always start from the right #457 2020-04-08 21:26:15 -04:00
nick black
cb7e844db1 unify notcurses-input+notcurses-keyplot #455 2020-04-08 09:39:10 -04:00
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
2020-04-08 05:39:41 -04:00
nick black
0a8e5ef70d
notcurses_keyplot: error out on null ncplot 2020-04-06 02:59:35 -04:00
nick black
85c568b3a4
ncplot: redraw upon creation so axis labels are visible 2020-04-06 02:20:21 -04:00
nick black
dfd54f540a keyplot: ticker thead so we needn't provide input 2020-04-04 12:32:19 -04:00
nick black
8214665b7e keyplot: only show yaxis labels on one plot #438 2020-04-04 12:32:19 -04:00
nick black
2a7ccffec6 ncplot: add labelaxisd, use it in keyplot #438 2020-04-04 12:32:19 -04:00
nick black
c0f8d9b444
eliminate detectdomain, infer it from maxy==miny #439 2020-04-04 08:56:31 -04:00
nick black
d2365b9f18 notcurses-keyplot: use full length of plane #436 2020-04-04 08:30:49 -04:00
nick black
1c75ac5bd3 plot: implement minchannel with ncplane_stain() #136 2020-04-03 08:27:08 -04:00
nick black
8f65958a53 plot: use at least maxchannel #136 2020-04-03 08:27:08 -04:00
nick black
68b4ba1706 plots: implement remaining vertical grid types #136 2020-04-03 08:27:08 -04:00
nick black
5f3eb3dc24 keyplot: add third plot, this one with half blocks #433 2020-04-03 08:27:08 -04:00
nick black
f1f94deda8 keyplot: input loop #430 2020-04-03 05:51:02 -04:00
nick black
5bccf6b446 ncplot: implement x windowing #430 2020-04-03 05:51:02 -04:00
nick black
b3cda0d09f notcurses-keyplot: throw a perimeter around base plane 2020-04-03 05:51:02 -04:00