Commit Graph

24 Commits (10b134b5963b3e26a05769329ba77f9f17bc2ed4)

Author SHA1 Message Date
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
nick black ecdc85de11 USAGE: add section on multimedia #556 4 years ago
nick black d54e2c3957
README: point to debian unstable package 4 years ago
nick black 84107c547d
view: support -m argument for margins #551 4 years ago
nick black 0a38cd6ff5
move usage ToC to USAGE.md 4 years ago
nick black 6045c54189 move usage stuff into USAGE.md 4 years ago