Commit Graph

558 Commits

Author SHA1 Message Date
nick black
02c57186b4
Stacking tests: remove cruft, this works now #1318 2021-02-04 23:52:05 -05:00
nick black
4e8f857be0 use entirely delegated initializers in tests/ 2021-02-03 17:17:39 -03:00
nick black
87def26efb paint(): need invert bits not logic for stacked blitters #1068 2021-02-02 00:57:58 -05:00
nick black
39563058ca new unit test breaks #1068 2021-02-02 00:57:58 -05:00
nick black
02d09ef47b quadblitter: unit test for crossed quadrants #1068 2021-02-02 00:57:58 -05:00
nick black
33d9e60003 quadblitter: unit test for stacked blits #1068 2021-02-02 00:57:58 -05:00
nick black
b0915d1db6 Proper transparent blitter stacking
This completes the work for #1068. This addressed a subtle issue.
When we're using pixel->semigraphic art, we want slightly different
rendering. Essentially, imagine that we have two images, each two
pixels tall and one pixel wide. The top image is a transparent pixel
above a white pixel. The bottom image is a white pixel above a black
pixel. We'd expect the result to be two white pixels, but we can
instead get a black pixel above a white pixel. This is because the
*background* color is being merged from the bottom plane, but really
we want the *top* color. Ncvisuals are now blitted along with
information regarding which quadrants they draw over, and when
appropriate, we invert the foreground and background. Closes #1068.
2021-02-02 00:57:58 -05:00
nick black
cb58f45dd3 Write blit quadrants to channel
Reclaim the "blitted" and "full foreground" bits in the
channels. Instead, we now write four bits, encoding the
four quadrants we might occupy as the result of a blit.
These four imply the previous two, leaving us with four
free bits remaining in the channels. This opens a clear
path to O(1)-time, zero-space blitter stacking #1068.
w00t!
2021-02-02 00:57:58 -05:00
nick black
0446dc0f6d enable blitterstacking unit test -- fails for now 2021-02-02 00:57:58 -05:00
nick black
de0b61925e
properly dispatch remaining visual specifications 2021-01-24 05:13:05 -05:00
nick black
1108ebb5b6
Fix up some subtle pile issues
ncplane_destroy() needs to call ncplane_reparent_family(), not
ncplane_reparent() as it was doing (closes #1291). ->absy and
->absx actually are absolute; return them directly for an O(1)
ncplane_abs_yx() (down from O(N), huzzah). Add some unit tests
related to destroying and reparenting (#1286). Add ncplane_abs_y()
and ncplane_abs_x(), document them, etc.
2021-01-15 00:32:55 -05:00
nick black
7932859b50
unit test for position update following reparent #1286 2021-01-14 23:17:24 -05:00
nick black
6cf7eca50f
unit tests for ncplane_abs_yx() #1286 2021-01-14 23:09:22 -05:00
nick black
15386d57ce
nontrivial stacking unit test #1068 2021-01-08 04:59:24 -05:00
nick black
cff006f8ab
fix return value of output functions 2021-01-08 04:58:50 -05:00
nick black
54b44513c4
Wide EGC tweaks
Don't bias the nccell width by 1, or 0-length EGCs become
255 columns. We weren't actually using the width to drive
much anything until now, so this wasn't a problem, but it
is exposed as an error once we got rid of CELL_WIDE_ASIAN
and start looping through the actual egc column width.
Closes #1278, closes #1277
2021-01-03 17:42:28 -05:00
nick black
5636a146e4
Wide unit test: rewrite without CELL_WIDEASIAN_MASK #1277 2021-01-03 14:55:58 -05:00
nick black
9245fda17f
genericize setup_signals() for ncdirect #1271 2021-01-03 01:31:22 -05:00
nick black
7ab2bddde7
notcurses-tester: no alternate screen 2020-12-31 00:32:47 -05:00
nick black
69e329d328
BigMult unit tests: fix for non-'.' decseps 2020-12-28 14:23:32 -05:00
nick black
1d8fcbb5e4
ncdirect: styles{set, on, off} -> _styles #1247 2020-12-28 02:21:37 -05:00
nick black
66349ecbd0
progress bar unit tests: skip non-utf8 2020-12-28 02:01:54 -05:00
nick black
1c4d942cfc DualCell{Left, Right} unit tests #1258 2020-12-28 01:58:54 -05:00
nick black
f729d855f9 complete SingleCellDown/SingleCellUp tests #1258 2020-12-28 01:58:54 -05:00
nick black
cd8dd4232c Progress bar unit test SingleCellUp #1258 2020-12-28 01:58:54 -05:00
nick black
dad7a02b25
add test file for progressbars #1258 2020-12-27 23:36:24 -05:00
nick black
45d0ca54e9
add SetStruck directmode test 2020-12-16 06:46:54 -05:00
nick black
35cb5d9511
GrowPlanes tests: use valid arguments #1215 2020-12-16 06:40:43 -05:00
nick black
bcbf7a490f
add ReparentDeep unit test #1214 2020-12-16 03:21:46 -05:00
nick black
fd2acde1b1 rename cell->nccell, keep alias #1200 2020-12-13 00:49:37 -05:00
nick black
a3e7b3b5d0
utf8_egc_len: count all printing glyphs #1174 2020-12-12 06:28:17 -05:00
nick black
f3b86230e6
NCPlane tests: reenable GrowPlane #1198 2020-12-11 20:59:34 -05:00
nick black
0aa060b9f1
Reels unit test: REQUIRE tablet plane #1197 2020-12-11 20:29:48 -05:00
nick black
2c4566fdb3
notcurses-tester: drop loglevel to _ERROR 2020-12-11 20:05:33 -05:00
nick black
4a7353c1ec
PlaneAtCursorAttrs: home cursor #1197 2020-12-11 19:55:53 -05:00
nick black
a3220b8a73
add ncplane_descendant_p(), unit test it #1192 2020-12-09 00:18:47 -05:00
nick black
ec7bfea22d
get Piles reparent unit test working #1193 2020-12-08 23:54:10 -05:00
nick black
f46fa11fb2 Blitting: fix endianness in unit tests #1130 2020-12-09 01:33:08 +00:00
nick black
448251e3f2 NCPlane: endianness fixes for unit tests #1130 2020-12-09 01:30:38 +00:00
nick black
46d6bfe64b Fills: fix endianness issues in tests #1130 2020-12-09 01:28:36 +00:00
nick black
eb7e0b7a4c Rotate: fix unit test endianness #1130 2020-12-09 01:25:55 +00:00
nick black
b99e6b8bc6 Visual tests: complete endianness fixes #1130 2020-12-09 01:16:46 +00:00
nick black
6915e44cca
Visual/Quadblitter: fix endianness in test #1130 2020-12-08 20:11:40 -05:00
nick black
c9dcef2ca5
Visual unit tests: endianness fixes #1130 2020-12-08 20:06:25 -05:00
nick black
42ac6bb90b
more pile reparenting testing #1193 2020-12-08 14:52:41 -05:00
nick black
beed7c359c
add some pile rendering unit tests 2020-12-08 13:50:31 -05:00
nick black
47c4931906
EmitEmojiStr: purge a few not yet valid on ubuntu #1189 2020-12-08 05:40:38 -05:00
nick black
8584fb2b05
Metric unit test: call notcurses_stop() at end only 2020-12-06 22:55:13 -05:00
nick black
f8a6d21362
pull sleep out of unit test, doh 2020-12-06 09:18:32 -05:00
nick black
93f7f681a4
add unit tests for all plottypes #1081 2020-12-06 02:51:08 -05:00