nick black
4442a9fea9
rgba_trans_p: any non-zero alpha must be displayed #1540
2021-04-16 01:03:46 -04:00
nick black
b070b69eb2
get last remaining cell_ functions -> nccell_ #1532
2021-04-15 22:29:53 -04:00
nick black
7ad5219fa2
convert another crop of cell_ to nccell_ #1532
2021-04-15 22:20:16 -04:00
nick black
89fb48a30b
sprixcells: tense agreement in comment
2021-04-15 01:31:12 -04:00
nick black
30cb74428f
work on the sprixel state machine
...
Sixel: detect SPRIXCELL_TRANSPARENT cells and mark them as such.
sprixel_invalidate: fix copy-and-paste, want both TRANSPARENT and
ANNIHILATED to block progression to INVALIDATED. add gigantic
comment detailing the state machine. #1537 , #1522 , #1527 , #1483 .
2021-04-15 01:07:22 -04:00
nick black
93a08edb23
render: extract stats functions to stats.c
2021-04-15 00:13:44 -04:00
nick black
d2394f9c63
c++ wrapper for direct-mode streaming #1515
2021-04-14 18:48:53 -04:00
nick black
529972d16b
Elide unnecessary sprixel invalidations
...
When the damaged cell of a sprixel is actually entirely
transparent (or annihilated), there's no need to invalidate
it. Check for this in the TAM in sprixel_invalidate(). Good
optimization, and eliminates a lot of the flicker in `xray`
on Kitty described in #1522 .
2021-04-14 16:38:09 -04:00
nick black
9d516d8c8c
summarize_stats: don't divide by 0 writeouts
2021-04-14 11:40:14 -04:00
nick black
32500239ac
cell_extract() -> nccell_extract()
2021-04-14 10:30:22 -04:00
nick black
da2a897544
fix unintended cell abi breakage #1532
...
cell_release() and cell_duplicate() were deprecated in 2.2.6,
but replaced with static inlines. this breaks the abi, forcing
recompiles from client programs. restore them as exported
functions.
2021-04-14 10:04:28 -04:00
nick black
76bcb8f0af
zaxis test: update to api3
2021-04-14 09:36:00 -04:00
nick black
96ac640733
cell->nccell
2021-04-14 09:31:50 -04:00
nick black
657ed15632
cell_on_styles -> nccell_on_styles() #1532
2021-04-14 09:05:00 -04:00
nick black
15c330c580
[sixel_shutdown] don't disable sixel scrolling on shutdown #1533
2021-04-14 08:26:27 -04:00
nick black
81370ba311
[sixel_delete] don't scribble beyond pile rendering vector #1534
2021-04-14 08:23:17 -04:00
Nick Black
e591ec2e98
cell -> nccell throughout much of remaining API ( #1535 )
...
cell -> nccell throughout much of the API #1532
2021-04-14 06:42:14 -04:00
nick black
e9b5388dde
[sixel] clear debugging cruft #1533
2021-04-14 05:21:23 -04:00
nick black
b794dbc848
[sixel] clear sixel scrolling private mode on exit #1533
2021-04-14 05:20:59 -04:00
nick black
89678ed412
[render] only invalidate glyphs when wipe fails
2021-04-14 03:35:31 -04:00
nick black
11f79dfd31
visual_render_pixels: don't use last line of visual area #1479
2021-04-14 03:25:28 -04:00
nick black
f5d16e1e89
sprite_wipe_cell: purge unnecessary fxn check
2021-04-14 00:50:05 -04:00
nick black
282830e31c
define sixel_wipe
2021-04-14 00:48:36 -04:00
nick black
39335bc210
[sixel_wipe] set SIXEL_P2_TRANS #1527
2021-04-14 00:48:16 -04:00
nick black
567c351b8f
[sprixcell] kill unused TAM enums for now
2021-04-13 21:03:58 -04:00
nick black
53485eabc3
[paint] extract paint_sprixel()
2021-04-13 18:47:24 -04:00
nick black
3474134f23
[nctree] eliminate tautological pointer compare
2021-04-13 18:44:52 -04:00
nick black
46d70602c5
always set SIXEL_P2_TRANS on transparent pixels #1527
2021-04-13 16:42:00 -04:00
nick black
c54198a992
Emit P2=0 when sixel is entirely opaque
...
Some terminals (foot makes this claim explicitly) can draw
sixels more quickly when P2 is 0 than when P2 is 1. Since
we're already detecting transparency for the TAM matrix, do
the same globally, and prepare a sixel_p2_e value-result
parameter based on the results. If there are no transparent
pixels, emit P2=0 #1527 .
2021-04-13 15:45:50 -04:00
nick black
2f8efe53a6
[demo] shrink the fps graph horizontally a little
2021-04-13 11:36:16 -04:00
nick black
162248fcaa
[ncplayer] put blitter changes into effect at media's end #1529
2021-04-13 11:30:00 -04:00
nick black
77e8697be9
get a richer blue in banner RGB
2021-04-12 08:04:17 -04:00
nick black
cfd47c26b6
ncvisual_render_pixels: reject negative placex/placey on alignment #1526
2021-04-12 04:22:31 -04:00
nick black
669bc5fa33
[mlterm] sixel cursor hack
...
At least mlterm unhides the cursor after emitting a
Sixel, even if it was hidden beforehand. Track this
behavior using 'sprixel_cursor_hack' in the tinfo cache.
Set this based on an "mlterm" TERM heuristic match.
When it is set, supply the 'civis' capability as
cursor_hack in blitterargs, and emit it at the end of
the sixel in sixel_blit() #1524 .
2021-04-12 04:02:23 -04:00
nick black
7e08e40bff
notcurses_stop: don't treat drop_signals() as an error
2021-04-12 03:32:32 -04:00
nick black
e301ef34ae
disable alacritty sixel until ayosec/graphics is merged #1430
2021-04-12 03:25:49 -04:00
nick black
084d5d6673
notcurses_init: free memstream on error paths
2021-04-12 03:23:55 -04:00
Daniel Eklöf
013ac94cd5
[sixel]: re-enable Set Raster Attributes, and fix the ‘pad’ parameter
...
Now that we explicitly set P2=1, we can safely emit a "Set Raster
Attributes" command, to tell the terminal the final size of the image
up front.
Also fix the ‘pad’ parameter (horizontal aspect ratio); XTerm rejects
sixels with pan or pad set to 0.
2021-04-12 02:44:36 -04:00
Daniel Eklöf
8b7fa78be1
[sixel]: set P2=1
...
This indicates that empty pixels should "remain at their current
color". I.e. it makes them transparent.
This is in contrast to P2=0|2, where empty pixels are filled with the
"current background color" (which is either sixel color register #0 ,
or the current ANSI background color, depending on terminal and its
sixel implementation).
Note that due to what is most likely a bug, XTerm will behave as if
P2=1 if P2 is either left unset, or explicitly set to 0 or 2, as long
as we do *not* emit a "Set Raster Attributes" command.
2021-04-12 02:44:36 -04:00
nick black
9c7fa38187
mlterm: enable quadrants (no sextants as of 3.9.0)
2021-04-12 02:25:21 -04:00
nick black
c7fca301e8
sixel: set a huge default max geom
2021-04-12 02:17:06 -04:00
nick black
e7ca10804d
xtsmgraphics reply: always allow 'S' to terminate #1523
2021-04-12 02:14:15 -04:00
nick black
430e328df6
[query_sixel] tighten sixel check state machine #1523
2021-04-12 02:03:17 -04:00
nick black
96ca5e79cb
xray: use alpha channel for sprixel
2021-04-12 01:12:37 -04:00
nick black
2e254d29e0
ncvisual_blitset_geom: fix unknown flag diagnostic
2021-04-12 00:53:42 -04:00
nick black
f8f2784a22
[alacritty] did they disable XTSMGRAPHICS again? wtf?
2021-04-10 13:39:29 -04:00
nick black
fada4148b5
[ncplayer] add -a option for alpha channel #1518
2021-04-10 12:02:58 -04:00
nick black
76241f81d2
[rust] adapt pixel-cell.rs
2021-04-10 12:02:58 -04:00
nick black
34bcbb505b
[xray] put streaming plane back above scrolling #1518
2021-04-10 12:02:58 -04:00
nick black
bac7d634d9
[visual] pipe transcolor through, use it everywhere #1518
2021-04-10 12:02:58 -04:00
nick black
0c566cd74a
[ncvisual] pipe transcolor through #1518
2021-04-10 12:02:58 -04:00
nick black
ff76dba6ed
cell_strdup -> nccell_strdup
2021-04-10 09:21:52 -04:00
nick black
d504e972cc
cell_release -> nccell_release
2021-04-10 09:09:56 -04:00
nick black
9dbcef9969
stop exporting lookup_blitset()
...
the media code that makes up non-core libnotcurses called
into lookup_rgba(). instead, have them use the new
funtion ncvisual_blitter_geom() to access the actual blitter
being used. we can then hide lookup_blitset(), which ought
never have been exported. closes #1519 .
2021-04-10 08:56:59 -04:00
nick black
d4fff6a921
check wcwidth('⣿') for braille support
2021-04-10 07:56:56 -04:00
nick black
1f67f540e6
[stacking] guard tests for quadrants
2021-04-10 06:58:08 -04:00
nick black
1720457467
[rotate] fix unit tests for odd number of columns
2021-04-10 06:52:39 -04:00
nick black
17a27427ec
[visual] guard quadblitter tests with check
2021-04-10 06:37:05 -04:00
nick black
7488a84121
[xray] bring slider plane to top #1518
2021-04-10 06:23:48 -04:00
nick black
80d93fdfb6
disable quadrants except where whitelisted #1517
...
Require a known-good TERM heuristic match to enable
quadrants (NCBLIT_2x2); they otherwise decay to halves
(NCBLIT_2x1). The only terminal that supports quadrants
but does not support sextants is the Linux console, where
we program quadrants directly into the font table,
like a beast. Closes #1517 , and #1298 if we're lucky.
2021-04-10 05:12:45 -04:00
nick black
62242f0e41
[terminfo] add alacritty hack for sixel #1430
2021-04-10 04:41:14 -04:00
nick black
53894caccb
add ncdirect_stream #1346
2021-04-10 04:41:14 -04:00
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()).
2021-04-10 04:04:02 -04:00
nick black
35e44d81c5
caps-rendered: differentiate sixel v kitty
2021-04-10 00:48:24 -04:00
nick black
1f33ada62e
[cffi] update for ncplane_as_rgba()
2021-04-10 00:47:03 -04:00
nick black
582bdebbc3
lol remove notcurses_debug() from notcurses_render()
2021-04-10 00:39:07 -04:00
nick black
f294c6bb0b
add ncplane_pixelgeom() #1507
2021-04-10 00:34:38 -04:00
nick black
d153ccb8f4
[ncvisual] properly size created plane
...
if we go into ncvisual_render() looking to render a number
of rows not evenly divisible by the scaling factor, we need
to get an extra row (duh). correct ncvisual_render_cell() to
reflect this. the blitters already know to fill this line in
with transparency wherever the image is not defined. fix up
rotation unit tests to reflect this. closes #1513 .
2021-04-09 23:27:06 -04:00
nick black
94839c2958
[ncdirect_stream] kill unused variable warnings
2021-04-09 18:08:23 -04:00
nick black
05082fc277
ncplane_as_rgba(), returns pixel geometry along with bitmap #1508
2021-04-08 04:12:11 -04:00
nick black
694a0c133f
[terminfo] only interrogate for sixel when pixel geometry is defined #1511 #1506
2021-04-08 01:15:18 -04:00
nick black
217453780e
[terminfo] remove alacritty hacks #1506 #1430
2021-04-08 01:06:38 -04:00
nick black
b1baa5e88a
[demo] print that we're checking for pixel support #1506
2021-04-08 00:55:25 -04:00
nick black
cc3cddf40b
[sprixel] don't yet enable sixel on alacritty
2021-04-07 19:53:14 -04:00
nick black
0febe3428f
[sprixels] simplify query_sixel()
2021-04-07 18:47:20 -04:00
nick black
9dad70568b
[plot] drop inline from update_sample
2021-04-07 12:29:00 -04:00
joseLuís
fce6c6873f
fix typos
2021-04-07 15:00:48 +02:00
nick black
8db054ede7
kill off get_controlling_tty in favor of get_tty_fd #1504
2021-04-04 16:42:19 -04:00
nick black
7865539505
query_sixel: support alacritty's ugh decisions #1430
2021-04-04 05:37:19 -04:00
nick black
0c2e3d6e35
[sixel] make some sixeltable args const
2021-04-04 05:29:19 -04:00
Nick Black
7e78690597
[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes ( #1502 )
2021-04-04 05:19:36 -04:00
nick black
7c35d94a9b
paint: referene crender, not rvec #1482
2021-04-04 04:18:09 -04:00
nick black
0dbd3cf830
ncvisual_render_pixels: hide any old sprixels
2021-04-04 04:17:34 -04:00
nick black
2f47d9adef
[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes
2021-04-04 04:16:55 -04:00
nick black
656b3221af
refresh: initialize with init_rvec, not memset()
2021-04-04 00:07:18 -04:00
nick black
123447183c
[jungle] fix invalid access on some window geometries
2021-04-03 21:35:54 -04:00
nick black
3d3d235abb
[xray] update frame count for new video
2021-04-03 21:21:21 -04:00
nick black
998ebf8254
[ncplayer] meaningless timespec dealloc
2021-04-03 21:13:36 -04:00
nick black
ee2f150058
[sprixels] move destruction into free_plane() from ncplane_destroy()
2021-04-03 21:03:25 -04:00
nick black
16b7910b57
[sprixels] plug two memory leaks
2021-04-03 17:54:09 -04:00
nick black
94b073dd3d
ncvisual_render_pixels: zorch reuse on either invalid ncv or n sprixel
2021-04-02 10:35:11 -04:00
nick black
cbd92e5180
sprixel_recycle: use the valid sprixel link
2021-04-02 10:33:34 -04:00
nick black
d7408cf5aa
[bitmap] check p_beats_sprixel, use text phase 2 when set #1496
2021-04-02 04:34:33 -04:00
nick black
3c4d25a092
[ncvisual] detach from sprite in ncvisual_destroy()
2021-04-02 03:08:40 -04:00
nick black
89734a2dc7
[bitmap] proper parameters for tacache TAM2 #1495
2021-04-02 01:21:58 -04:00
nick black
ad3322e4db
erp
2021-04-02 00:55:02 -04:00
nick black
6a1e74feae
[bitmaps] clear out ncvisual link on hide
2021-04-02 00:54:45 -04:00
nick black
f968ba7774
[plots] free up title in destructor
2021-04-02 00:07:49 -04:00
nick black
021fc052fc
[render] end kitty flicker #1493
2021-04-01 22:37:48 -04:00
nick black
631697e9e2
eliminate sixel flicker #1493
2021-04-01 22:37:48 -04:00
nick black
83296b4688
Revert "eliminate sixel flicker #1493 "
...
This reverts commit aa80af8f87
.
2021-04-01 20:11:44 -04:00
nick black
aa80af8f87
eliminate sixel flicker #1493
2021-04-01 20:01:04 -04:00
nick black
d4883d30f2
[tests] add directmode bitmap test
2021-04-01 18:23:01 -04:00
nick black
c0dadcd5d7
[normal] don't use expired ncplane 'n' #1492
2021-04-01 11:49:38 -04:00
nick black
b6a9b59f9d
notcurses_plane.3: add BUGS about bitmap graphics and ncplane_at_yx()
2021-04-01 11:26:23 -04:00
nick black
fbe16935f3
[sixel] clean up sprixels on move #1449
2021-04-01 11:26:23 -04:00
nick black
d813a66581
[sixel] seed initial TAM matrix #1445
2021-03-31 02:17:38 -04:00
nick black
670dcbdd08
[kitty] initialize TAM matrix #1445
2021-03-31 02:16:08 -04:00
nick black
dd6d9392ec
[unittests] add PixelTAMSetup test #1445
2021-03-31 02:08:04 -04:00
nick black
259c5f5e3e
[tests] pixel test shouldn't check for wipe function
2021-03-31 02:01:39 -04:00
nick black
4c735cd95d
[paint] why must we constify ourselves, every day
2021-03-31 00:25:11 -04:00
nick black
21de64f65b
ncdirect_cursor_move_yx: only use cursor_yx_get with a real terminal #1486
2021-03-31 00:16:38 -04:00
nick black
afeed4d075
drone: run ctest with --output-on-failure
2021-03-30 17:13:32 -04:00
nick black
cef16e77ce
disable PixelWipe test until we can keep it from OOMing ctest
2021-03-30 17:08:30 -04:00
nick black
05f73da2da
directmode: get cursor position if we need to for cursor move #1486
2021-03-29 20:12:34 -04:00
nick black
98d506d011
[plots] error path return fixups -- thanks, unit tests!
2021-03-29 02:43:54 -04:00
nick black
4ca2bb0940
[visual-details] get compiling with OIIO C++
2021-03-29 02:43:54 -04:00
nick black
687aa93a84
[plots] c++ conversion done #1421
2021-03-29 02:43:54 -04:00
nick black
acc5be058c
[plots] move plot.cpp to C plot.c #1421
2021-03-29 02:43:54 -04:00
nick black
d62ced7aa4
[TERMINALS] wezterm notes
2021-03-29 02:43:54 -04:00
nick black
d2dfa0ecbb
[ffmpeg] move C++ to C #1421
2021-03-29 02:43:54 -04:00
nick black
322e4f4b3b
[kitty] fix off-by-one in write_kitty_data(), ugh
2021-03-29 01:52:47 -04:00
nick black
913f06d59c
[PixelWipeImages] actually test image wiping
2021-03-28 19:47:27 -04:00
nick black
0434d75689
[unittests] correct checks for putchar
2021-03-28 19:42:47 -04:00
nick black
b92991e57b
[visual] allow NCBLIT_PIXEL in ascii mode
2021-03-28 19:40:21 -04:00
nick black
c67981d668
[unittests] don't export sprite_wipe_cell()
2021-03-28 19:15:26 -04:00
nick black
57114c8005
[bitmaps] remove redundant PixelWipeBlocks test
2021-03-28 16:59:02 -04:00
nick black
5e4c07816d
[stream] restore erase(), preserve tacache across sixels #1482
2021-03-28 16:31:21 -04:00
nick black
da0da25269
[bitmaps] abstract out sprite_destroy()
2021-03-28 15:12:43 -04:00
nick black
65cc9a3ea9
[xray] keep bitmap plane below others
2021-03-28 15:12:43 -04:00
nick black
58c1cdf055
[bitmaps] ATL represent
...
Fix Sixel mutation by printing the Sixel first, and only then
printing text atop it. Come around a second time on sprixels
only. All tests and demos now work under both the Sixel and
the Kitty protocols.
Huzzah! World leader, bitch! Ain't nobody else done this.
2021-03-28 15:12:43 -04:00
nick black
7127118d27
[fallin] undo changes which put background on top
2021-03-28 12:36:33 -04:00
nick black
51182e3315
[sixel] reproduce surgery map #1457
2021-03-27 17:34:37 -04:00
nick black
6907562c9c
[kitty] apply tacache #1457
2021-03-27 17:34:37 -04:00
nick black
21c0e17c05
[kitty] tacache resuse #1457
2021-03-27 17:34:37 -04:00
nick black
2e1582af1f
plane_blit_sixel: move back to memcpy()
2021-03-27 17:34:37 -04:00
nick black
094dd89bb7
[sixel] don't double-close fp on error
2021-03-27 17:34:37 -04:00
nick black
dd5136256a
[ffmpeg] don't erase() in stream()
2021-03-27 17:34:37 -04:00
nick black
feb462bafa
[sprixels] comment out debugging cruft
2021-03-27 17:34:37 -04:00
nick black
69c8e25894
[sprixels] kill glyph copy on sprixel load
2021-03-27 17:34:37 -04:00
nick black
4ee0582321
[bitmaps] introduce sprixcell_e enum #1457
2021-03-27 17:34:37 -04:00
nick black
85d0df491e
[bitmap] intensify unit tests
2021-03-27 17:28:22 -04:00
nick black
cd6b9c2c87
[intro] kill unused param warnings
2021-03-27 12:21:11 -04:00
nick black
f887b5a122
[intro] use NCSCALE_SCALE
2021-03-27 12:11:14 -04:00
nick black
11685e77cc
[sprixel_create] eliminate copy of glyph
2021-03-27 11:43:58 -04:00
nick black
fac56fc2cc
[plane] incorporate left/top margins into resize #1472
2021-03-27 08:12:18 -04:00
nick black
5a6ee2d720
[ncplane_dup] remove cheerful diagnostic
2021-03-27 07:15:28 -04:00
nick black
a8a42c2a50
[planes] implement ncplane_resize_marginalized() #1472
2021-03-27 07:07:48 -04:00
nick black
7c5b7fe85c
[ncplane_new] allocate based on true length #1472
2021-03-27 07:07:48 -04:00
nick black
1688f66bc7
[ncplane_new_internal] fix diagnostic
2021-03-27 07:07:48 -04:00