mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
cell_no{fore/back}ground() was never intended for export
This commit is contained in:
parent
c333c4def5
commit
17e8f62eb9
@ -231,11 +231,6 @@ namespace ncpp
|
||||
return cell_bg_default_p (&_cell);
|
||||
}
|
||||
|
||||
bool has_no_foreground () const noexcept
|
||||
{
|
||||
return cell_noforeground_p (&_cell);
|
||||
}
|
||||
|
||||
bool is_wide_right () const noexcept
|
||||
{
|
||||
return cell_wide_right_p (&_cell);
|
||||
|
@ -1012,12 +1012,6 @@ namespace ncpp
|
||||
return error_guard (ncplane_rotate_ccw (plane), -1);
|
||||
}
|
||||
|
||||
// Upstream call doesn't take ncplane* but we put it here for parity with has_no_background below
|
||||
bool has_no_foreground (Cell &cell) const noexcept
|
||||
{
|
||||
return cell.has_no_foreground ();
|
||||
}
|
||||
|
||||
const char* get_extended_gcluster (Cell &cell) const noexcept
|
||||
{
|
||||
return cell_extended_gcluster (plane, cell);
|
||||
|
@ -50,12 +50,12 @@ struct ncfadectx; // context for a palette fade operation
|
||||
typedef enum {
|
||||
NCBLIT_DEFAULT, // let the ncvisual pick
|
||||
NCBLIT_1x1, // full block █
|
||||
NCBLIT_2x1, // full/(upper|left) blocks ▄█
|
||||
NCBLIT_2x1, // upper half + 1x1 ▀█
|
||||
NCBLIT_1x1x4, // shaded full blocks ▓▒░█
|
||||
NCBLIT_2x2, // quadrants ▗▐ ▖▄▟▌▙█
|
||||
NCBLIT_4x1, // four vert/horz levels █▆▄▂ / ▎▌▊█
|
||||
NCBLIT_2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙█
|
||||
NCBLIT_4x1, // four vertical levels █▆▄▂
|
||||
NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
|
||||
NCBLIT_8x1, // eight vert/horz levels █▇▆▅▄▃▂▁ / ▏▎▍▌▋▊▉█
|
||||
NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁
|
||||
NCBLIT_SIXEL, // 6 rows, 1 col (RGB), spotty support among terminals
|
||||
} ncblitter_e;
|
||||
|
||||
@ -780,14 +780,6 @@ cellcmp(const struct ncplane* n1, const cell* RESTRICT c1,
|
||||
return strcmp(cell_extended_gcluster(n1, c1), cell_extended_gcluster(n2, c2));
|
||||
}
|
||||
|
||||
// True if the cell does not generate foreground pixels (i.e., the cell is
|
||||
// entirely whitespace or special characters).
|
||||
// FIXME do this at cell prep time and set a bit in the channels
|
||||
static inline bool
|
||||
cell_noforeground_p(const cell* c){
|
||||
return cell_simple_p(c) && (c->gcluster == ' ' || !isprint(c->gcluster));
|
||||
}
|
||||
|
||||
static inline int
|
||||
cell_load_simple(struct ncplane* n, cell* c, char ch){
|
||||
cell_release(n, c);
|
||||
|
@ -599,14 +599,6 @@ plane_debug(const ncplane* n, bool details){
|
||||
}
|
||||
}
|
||||
|
||||
// True if the cell does not generate background pixels. Only the FULL BLOCK
|
||||
// glyph has this property, AFAIK.
|
||||
// FIXME set a bit, doing this at load time
|
||||
static inline bool
|
||||
cell_nobackground_p(const egcpool* e, const cell* c){
|
||||
return !cell_simple_p(c) && !strcmp(egcpool_extended_gcluster(e, c), "\xe2\x96\x88");
|
||||
}
|
||||
|
||||
static inline void
|
||||
pool_release(egcpool* pool, cell* c){
|
||||
if(!cell_simple_p(c)){
|
||||
|
@ -756,6 +756,22 @@ stage_cursor(notcurses* nc, FILE* out, int y, int x){
|
||||
return ret;
|
||||
}
|
||||
|
||||
// True if the cell does not generate background pixels. Only the FULL BLOCK
|
||||
// glyph has this property, AFAIK.
|
||||
// FIXME set a bit, doing this at load time
|
||||
static inline bool
|
||||
cell_nobackground_p(const egcpool* e, const cell* c){
|
||||
return !cell_simple_p(c) && !strcmp(egcpool_extended_gcluster(e, c), "\xe2\x96\x88");
|
||||
}
|
||||
|
||||
// True if the cell does not generate foreground pixels (i.e., the cell is
|
||||
// entirely whitespace or special characters).
|
||||
// FIXME do this at cell prep time and set a bit in the channels
|
||||
static inline bool
|
||||
cell_noforeground_p(const cell* c){
|
||||
return cell_simple_p(c) && (c->gcluster == ' ' || !isprint(c->gcluster));
|
||||
}
|
||||
|
||||
// Producing the frame requires three steps:
|
||||
// * render -- build up a flat framebuffer from a set of ncplanes
|
||||
// * rasterize -- build up a UTF-8/ASCII stream of escapes and EGCs
|
||||
|
Loading…
x
Reference in New Issue
Block a user