Commit Graph

2180 Commits

Author SHA1 Message Date
nick black
185742fd08
Rendering now does tripartite fallback to basecell
Each plane has a "base cell", which like all other cells is
initialized to the null glyph, opaque default foreground color,
and opaque default background color. Prior to this change, at
each cell of a plane, we decided whether to use that cell (the
"viscell") or the base cell depending on whether the viscell had
a non-null glyph. We now evaluate each component independently.
If the viscell has a null glyph, we use the base cell's glyph.
If the viscell has a default foreground, we use the base's fg.
If the viscell has a default background, we use the base's bg.
This was done because (a) it seems more intuitive (if I set a cell
to red, I expect red, not red iff there's a glyph in that cell
for this plane), and (b) because otherwise it was impossible to
do a multicolor overlay without blowing away underlying glyphs
(since without a glyph, you always reduced to the same base cell,
which could have only one fore- and background per render).

Existing code will need to change any instances where cells
lacking glyphs are colored, and those colors are not desired.
Since any such coloring had no effect before, it seems unlikely
that any ought exist (this did bring to light an instance in
the "qrcode" demo where we were staining overmuch of the plane).

This closes #395, the last big open worry regarding our API.
2020-06-11 23:10:03 -04:00
nick black
4391c661be
don't pull logging into plot #703 2020-06-10 09:47:24 -04:00
nick black
f98acad7f6
add NCPLOT_OPTIONS_DETECTMAXONLY #610 2020-06-09 12:02:42 -04:00
nick black
2b89b0850c
jungle/normal: improve behavior under ASCII mode #696 2020-06-09 07:24:47 -04:00
nick black
a10ba4dac6
highgradient: degrade to gradient #700 #696 2020-06-09 06:08:29 -04:00
nick black
20322fe805
demo improvements for ASCII mode (#696)
* eagle: use new ncvisual_geom() to properly zoom
* qrcode: skip for now (#699)
* luigi: draw with spaces, not full blocks
2020-06-09 05:12:30 -04:00
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).
2020-06-09 05:00:08 -04:00
nick black
827c2f2013
ncplot: don't print spaces #695 2020-06-09 04:46:54 -04:00
nick black
0e1617811f
eagle: require UTF8 for now #697 #696 2020-06-09 04:45:00 -04:00
nick black
7fc38d8fdd
v1.5.0 2020-06-08 06:05:17 -04:00
nick black
470c4f13e2
remove duplicate NEWS entry 2020-06-08 05:26:58 -04:00
nick black
09f3f9097d
input: extract most of main() into input_demo() 2020-06-08 05:14:22 -04:00
nick black
1cd3ffc89a
outro: transparent legend at borrom #687 2020-06-08 04:57:26 -04:00
nick black
1ffd871784
blocks poc: handle std coredump-free #645 2020-06-08 04:37:42 -04:00
nick black
a3369d77a9
outro: plug memory leak post-fade 2020-06-08 03:33:48 -04:00
nick black
c8caa23090
brailleblitter: honor transparency #649 2020-06-08 03:19:42 -04:00
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
2020-06-08 03:01:58 -04:00
nick black
7736e4a7dc all: don't put legend so far away from plane 2020-06-08 01:31:42 -04:00
Marek Habersack
4d2e4e82d3 [C++] API sync
Changed:

 * Visual: tiny reformatting to fit the overall ncpp style
 * Visual: added error guard in `render`
 * Visual: error_guard update in `rotate`

Added:

 * Visual: simple_streamer (`ncvisual_simple_streamer`)
 * Visual: polyfill (`ncvisual_polyfill_yx`)
 * Visual: at (`ncvisual_at_yx`)
 * Visual: set (`ncvisual_set_yx`)
2020-06-07 20:22:13 -04:00
nick black
841c0a4b8f
quadblitter: respect transparency #686 2020-06-07 19:46:03 -04:00
nick black
10cbaedc77
visual: implement NC_SCALE on both paths #683 2020-06-07 19:32:13 -04:00
nick black
f1da9406f9
view: plug small memory leak 2020-06-07 19:13:32 -04:00
nick black
7e6ec274bb
view: clear standard plane between renders #685 2020-06-07 18:59:22 -04:00
nick black
6e7996f1a8
notcurses_init: properly check flags for unknowns 2020-06-07 16:11:21 -04:00
nick black
3668b201af
USAGE: update for new notcurses_options 2020-06-07 05:09:58 -04:00
nick black
b2dcc50606
notcurses_options: fold bools into flags 2020-06-07 05:08:46 -04:00
nick black
e2b43092c3
outro: fade in samoa while fading out changes #652 2020-06-07 03:22:14 -04:00
nick black
700d59dbad
yield demo: don't stain menu 2020-06-07 00:51:50 -04:00
nick black
71f6b7b02e
USAGE: pixel -> ncpixel 2020-06-06 23:39:52 -04:00
nick black
465f4694b8
rename pixel -> ncpixel 2020-06-06 23:14:24 -04:00
nick black
9f97b7b969
demo HUD: unify blur 2020-06-06 22:32:16 -04:00
nick black
77362a50f4
yield demo looks hot, hot, hot! 2020-06-06 22:14:06 -04:00
nick black
990f401427
ncvisual_set_yx() 2020-06-06 21:39:24 -04:00
nick black
d863220e23
add pixels PoC 2020-06-06 21:38:05 -04:00
nick black
b9628ca21a
sync definitions of ncvisual_from_plane() 2020-06-06 19:49:23 -04:00
nick black
fb13b148e9
add Pixel API 2020-06-06 19:34:48 -04:00
nick black
2c417ddb0c
yield demo: punch up with polyfills 2020-06-06 05:11:45 -04:00
nick black
cb521e3de7
allglyph: always have room for the legend 2020-06-06 03:10:18 -04:00
nick black
b648868361
PolyfillOnGlyph unit test fix 2020-06-06 01:58:55 -04:00
nick black
633ef1f76c
add beginnings of yield demo 2020-06-05 15:14:07 -04:00
nick black
787e66a4c8
fallin': use NCBLIT_2x2 2020-06-05 13:01:36 -04:00
nick black
595a697146
notcurses-view: space now pauses #603 2020-06-05 11:51:05 -04:00
nick black
050b44628a
punch up luigi and purpdrank with NCBLIT_2x2 2020-06-05 11:50:50 -04:00
nick black
b172d2b97e
NCVISUAL_OPTION_MAYDEGRADE -> NCVISUAL_OPTION_NODEGRADE, doc 'em 2020-06-05 08:05:02 -04:00
nick black
3bc9a4cfa2
v1.4.5 2020-06-05 06:09:17 -04:00
nick black
edcb2ef3b9
index.html: add link to wiki 2020-06-05 06:00:21 -04:00
nick black
deda0ff681
mention notcurses_reader.3 in notcurses.3 2020-06-05 05:56:29 -04:00
nick black
cd2cc6f340
allglyph: add a counter showing the current glyph 2020-06-05 04:51:04 -04:00
nick black
84ae45ef39
remove all libsixel crap #200 2020-06-05 04:19:56 -04:00
nick black
9a0f0c66fe
ncblit: accept an ncvisual_options #680 2020-06-05 03:47:13 -04:00