Commit Graph

55 Commits (96c6dc8e16d68aa7c933fb3a03756bb64e0c4dfa)

Author SHA1 Message Date
nick black 96c6dc8e16 add ncdirect_canopen_images() and ncdirect_canutf8() #753 4 years ago
nick black c783244185 ncdirect_hline_interp(), ncdirect_vline_interp(), dirlines PoC #753 4 years ago
Nick Black 162f9910c2
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627

* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
4 years ago
nick black c809913c22
ncreel: remove {tbrl}off from USAGE, python, docs #627 4 years ago
nick black b6330d142b
add notcurses_render_file() #491 4 years ago
nick black d568e0619c
docs/USAGE: CELL_FG_MASK -> CELL_FG_RGB_MASK 4 years ago
nick black 354152b48b
Redefine CELL_ALPHA_ in their natural forms
CELL_ALPHA_OPAQUE et al were defined as 0..3, meaning
CELL_ALPHA_SHIFT had to be used to compare them to their
channel representations. Instead, define them in said
representation outright, eliminating the need to shift while
retaining arithmetic properties, and zero initialization for
CELL_ALPHA_OPAQUE. Eliminate CELL_ALPHA_SHIFT #738.
4 years ago
nick black 4a3d436e5b
drone: update builders 4 years ago
nick black 79d3ae67e4
add notcurses_cantruecolor() 4 years ago
nick black d084513172
ncvisual_geom: account for scaling #726 4 years ago
nick black 7ca5a7e82c
ncneofetch: create info plane #550 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 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 28431914a8
First go at ncplane_puttext() (#690)
Very simple take at ncplane_puttext(), a new function for linebroken text. Also some very basic unit tests. I doubt this works very well yet, but it handles the simplest cases #682. Added nclog(), internal function for logging. #520
4 years ago
nick black 3668b201af
USAGE: update for new notcurses_options 4 years ago
nick black 71f6b7b02e
USAGE: pixel -> ncpixel 4 years ago
nick black d863220e23
add pixels PoC 4 years ago
nick black b9628ca21a
sync definitions of ncvisual_from_plane() 4 years ago
nick black fb13b148e9
add Pixel API 4 years ago
nick black 2c417ddb0c
yield demo: punch up with polyfills 4 years ago
nick black 633ef1f76c
add beginnings of yield demo 4 years ago
nick black 9a0f0c66fe
ncblit: accept an ncvisual_options #680 4 years ago
nick black e1d34c4f43
ncplane_highgradient: only pass a single channel #676 4 years ago
Nick Black de23139111
Open some whoopass on ncvisual rotation (#677)
Whip the ol' llama's ass (fix ncvisual rotation)

* notcurses: flush cursor change requests #673
* rotator: verify ncplane_rgba and ncblit_rgba
* ncblit: rename, accept ncblitter_e #674
* rotator: render from rgba
* rotator: get to rotation
* rotator: add a pi/4 turn at the end
* normal: reuse incoming plane for rendering #672
* rotator poc: rotate a fullplane gradient #672
* normal demo: place visual correctly
* rotator: verify ncplane_rgba and ncblit_rgba
* ncblit: rename, accept ncblitter_e #674
* rotator: render from rgba
* rotator: add a pi/4 turn at the end
* normal: reuse incoming plane for rendering #672
* rotator poc: rotate a fullplane gradient #672
* normal demo: place visual correctly
* rotator poc: throw some red into gradient
* rotator poc: done #662
* oiio: ncvisual_resize() needs set ibuf pointer #662
* normal: only need erase at top of loop
* visual poc: shorter delay
* normal demo: center rendered visual
* comment ncvisual_resize() call
* ncvisual_rotate: call ncvisual_details_seed()
* ffmpeg ncvisual: fix rotation #662
4 years ago
nick black 2b31d6ce4d
ncvisual/ncreel: update some documentation 4 years ago
nick black d41c6d3627
notcurses-ncreel: add </>/* operators 4 years ago
nick black 2d3fef115e ncfadectx_setup(): remove timespec param #659 4 years ago
nick black 3deeecdf2e fade: finish out proposed API, basic unit tests #659 4 years ago
nick black 74e8e9c3d9 fade: move more reproduced code into common area #659 4 years ago
nick black 0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 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
Marek Habersack e0462ed53a
[C++] Sync API changes (#633)
Added:

  * NotCurses: can_utf8 (`notcurses_canutf8`)
  * NotCurses: debug (`notcurses_debug`)
  * Plane: center_abs (`ncplane_center_abs`)
  * Plane: set_channels (`ncplane_set_channels`)
  * Plane: set_attr (`ncplane_set_attr`)
  * Reader: clear (`ncreader_clear`)

Changed:

  * USAGE.md: clarfied when C++ throws exceptions
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 297263b39b
Add a new C++ section to USAGE.md 4 years ago
nick black 168ec1e71d
Update USAGE for streaming API changes #604 4 years ago
nick black 9a80750316
notcurses_canopen: split into images/videos #598 4 years ago
nick black fbed12cd80
ncreel_options: add flag field #590 4 years ago
nick black d89d8c52e9
notcurses_options: add flags field 4 years ago
nick black 95ba340fba
ncplane_erase: fix bug in basecell preservation 4 years ago
nick black d2c968b948
notcurses_init(): interpret NULL as /dev/tty #571 4 years ago
nick black f0357ef6cb ncplane_contents(): declarations #582 4 years ago
nick black 48de25821c ncreader man page #403 4 years ago
nick black 7337280e17
ncplane_at_yx(): const ncplane argument 4 years ago
nick black 5bdfc0183f
ncvisual_from_plane() #559 4 years ago
nick black 90dacae213
python/docs: declare ncvisual_from_plane() 4 years ago
nick black 94fcada67c
ncvisual_rotate: unify _cw/_ccw, take radians 4 years ago
nick black f63325db60 Lots of ncvisual work
Unify ffmpeg/oiio/null implementations, where possible. This effectively
required placing all three in the same file, which meant they're all now
C++. Update FFmpeg implemenation to be C++-usable. Implement
ncvisual_rotate_cw() and ncvisual_rotate_ccw() #515. Move most of tetris
over to Visual from Plane #558. Add bgra_to_rgba(), necessary for
creating ncvisual from BGRA memory. Implement ncvisual_from_rgba()
and ncvisual_from_bgra() #557. Add unit tests on ncvisual rotation.
4 years ago
nick black 39548acc3a rename ncvisual_open_plane->ncvisual_from_file() #560 4 years ago
nick black 03f98e0101 USAGE: flesh out media section #556 4 years ago