mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
Correct mistakes, update default blitter choice
This commit is contained in:
parent
e17c412736
commit
bf9c31db27
@ -310,7 +310,7 @@ If things break or seem otherwise lackluster, **please** consult the
|
|||||||
indicates support for them, even if <code>NCBLIT_PIXEL</code> has been
|
indicates support for them, even if <code>NCBLIT_PIXEL</code> has been
|
||||||
requested. Likewise, sextants (<code>NCBLIT_3x2</code>) won't be used without
|
requested. Likewise, sextants (<code>NCBLIT_3x2</code>) won't be used without
|
||||||
Unicode 13 support, octants (<code>NCBLIT_4x2</code>) won't be used without
|
Unicode 13 support, octants (<code>NCBLIT_4x2</code>) won't be used without
|
||||||
Unicode 17 support, etc. <code>ncvisual_blit()</code> will use the best blitter
|
Unicode 16 support, etc. <code>ncvisual_blit()</code> will use the best blitter
|
||||||
available, unless <code>NCVISUAL_OPTION_NODEGRADE</code> is provided (in
|
available, unless <code>NCVISUAL_OPTION_NODEGRADE</code> is provided (in
|
||||||
which case it will fail).
|
which case it will fail).
|
||||||
</details>
|
</details>
|
||||||
|
@ -95,9 +95,9 @@ multimedia support capable of decoding videos.
|
|||||||
UTF-8 encoding, and the locale was successfully loaded.
|
UTF-8 encoding, and the locale was successfully loaded.
|
||||||
|
|
||||||
**notcurses_canoctant** returns **true** if the heuristics suggest
|
**notcurses_canoctant** returns **true** if the heuristics suggest
|
||||||
that the terminal can properly render Unicode 17 octants. Likewise,
|
that the terminal can properly render Unicode 16 octants.
|
||||||
**notcurses_cansextant** returns **true** if the heuristics suggest
|
**notcurses_cansextant** returns **true** if the heuristics suggest
|
||||||
that the terminal can properly render Unicode 13 sextants. Likewise,
|
that the terminal can properly render Unicode 13 sextants, and
|
||||||
**notcurses_canquadrant** and **notcurses_canhalfblock** return **true**
|
**notcurses_canquadrant** and **notcurses_canhalfblock** return **true**
|
||||||
if the heuristics suggest that the terminal can properly render Unicode
|
if the heuristics suggest that the terminal can properly render Unicode
|
||||||
quadrants and halfblocks, respectively. **notcurses_canbraille** returns
|
quadrants and halfblocks, respectively. **notcurses_canbraille** returns
|
||||||
|
@ -345,11 +345,12 @@ or if both ***nc*** and ***n*** are **NULL**.
|
|||||||
|
|
||||||
**ncvisual_media_defblitter** returns the blitter selected by **NCBLIT_DEFAULT**
|
**ncvisual_media_defblitter** returns the blitter selected by **NCBLIT_DEFAULT**
|
||||||
in the specified configuration. If UTF8 is not enabled, this will always be
|
in the specified configuration. If UTF8 is not enabled, this will always be
|
||||||
**NCBLIT_1x1**. If octants are available, (see **notcurses_canictant**), the
|
**NCBLIT_1x1**. If ***scale*** is **NCSCALE_NONE** or **NCSCALE_SCALE**, the
|
||||||
aspect-preserving **NCBLIT_4x2** will be returned. If ***scale*** is
|
aspect-preserving **NCBLIT_2x1** will be returned. If octants are
|
||||||
**NCSCALE_NONE** or **NCSCALE_SCALE**, the aspect-preserving **NCBLIT_2x1**
|
available (see **notcurses_canoctant**), this will be **NCBLIT_4x2**,
|
||||||
will be returned. If sextants are available (see **notcurses_cansextant**),
|
or otherwise, if sextants are available (see
|
||||||
this will be **NCBLIT_3x2**, or otherwise **NCBLIT_2x2**.
|
**notcurses_cansextant**), this will be **NCBLIT_3x2**, or otherwise
|
||||||
|
**NCBLIT_2x2**.
|
||||||
|
|
||||||
# NOTES
|
# NOTES
|
||||||
|
|
||||||
@ -362,7 +363,8 @@ a multimedia backend include **ncvisual_from_file** and
|
|||||||
Sixel documentation can be found at [Dankwiki](https://nick-black.com/dankwiki/index.php?title=Sixel).
|
Sixel documentation can be found at [Dankwiki](https://nick-black.com/dankwiki/index.php?title=Sixel).
|
||||||
Kitty's graphics protocol is specified in [its documentation](https://sw.kovidgoyal.net/kitty/graphics-protocol.html).
|
Kitty's graphics protocol is specified in [its documentation](https://sw.kovidgoyal.net/kitty/graphics-protocol.html).
|
||||||
|
|
||||||
Bad font support can ruin **NCBLIT_2x2**, **NCBLIT_3x2**, **NCBLIT_4x1**,
|
Bad font support can ruin **NCBLIT_2x2**, **NCBLIT_4x2**, **NCBLIT_3x2**,
|
||||||
|
**NCBLIT_4x1**,
|
||||||
**NCBLIT_BRAILLE**, and **NCBLIT_8x1**. Braille glyphs ought ideally draw only
|
**NCBLIT_BRAILLE**, and **NCBLIT_8x1**. Braille glyphs ought ideally draw only
|
||||||
the raised dots, rather than drawing all eight dots with two different styles.
|
the raised dots, rather than drawing all eight dots with two different styles.
|
||||||
It's often best for the emulator to draw these glyphs itself.
|
It's often best for the emulator to draw these glyphs itself.
|
||||||
|
@ -3518,12 +3518,12 @@ API ALLOC struct ncplane* ncvisual_subtitle_plane(struct ncplane* parent,
|
|||||||
// Get the default *media* (not plot) blitter for this environment when using
|
// Get the default *media* (not plot) blitter for this environment when using
|
||||||
// the specified scaling method. Currently, this means:
|
// the specified scaling method. Currently, this means:
|
||||||
// - if lacking UTF-8, NCBLIT_1x1
|
// - if lacking UTF-8, NCBLIT_1x1
|
||||||
// - otherwise, if octants are known to be good, NCBLIT_4x2
|
|
||||||
// - otherwise, if not NCSCALE_STRETCH, NCBLIT_2x1
|
// - otherwise, if not NCSCALE_STRETCH, NCBLIT_2x1
|
||||||
|
// - otherwise, if octants are known to be good, NCBLIT_4x2
|
||||||
// - otherwise, if sextants are not known to be good, NCBLIT_2x2
|
// - otherwise, if sextants are not known to be good, NCBLIT_2x2
|
||||||
// - otherwise NCBLIT_3x2
|
// - otherwise NCBLIT_3x2
|
||||||
// NCBLIT_2x2 and NCBLIT_3x2 both distort the original aspect ratio, thus
|
// NCBLIT_2x2 and NCBLIT_3x2 both distort the original aspect ratio, thus
|
||||||
// NCBLIT_4x2 or NCBLIT_2x1 is used outside of NCSCALE_STRETCH.
|
// NCBLIT_2x1 is used outside of NCSCALE_STRETCH.
|
||||||
API ncblitter_e ncvisual_media_defblitter(const struct notcurses* nc, ncscale_e scale)
|
API ncblitter_e ncvisual_media_defblitter(const struct notcurses* nc, ncscale_e scale)
|
||||||
__attribute__ ((nonnull (1)));
|
__attribute__ ((nonnull (1)));
|
||||||
|
|
||||||
|
@ -1220,7 +1220,7 @@ braille_blit(ncplane* nc, int linesize, const void* data, int leny, int lenx,
|
|||||||
// 1 4
|
// 1 4
|
||||||
// 2 5
|
// 2 5
|
||||||
// 3 6
|
// 3 6
|
||||||
// 4 7
|
// 7 8
|
||||||
// FIXME fold this into the above?
|
// FIXME fold this into the above?
|
||||||
if(!rgba_trans_p(*rgbbase_l0, bargs->transcolor)){
|
if(!rgba_trans_p(*rgbbase_l0, bargs->transcolor)){
|
||||||
egcidx |= 1u;
|
egcidx |= 1u;
|
||||||
|
@ -32,12 +32,12 @@ rgba_blitter_default(const tinfo* tcache, ncscale_e scale){
|
|||||||
if(!tcache->caps.utf8){
|
if(!tcache->caps.utf8){
|
||||||
return NCBLIT_1x1; // only one that works in ASCII
|
return NCBLIT_1x1; // only one that works in ASCII
|
||||||
}
|
}
|
||||||
if(tcache->caps.octants){
|
|
||||||
return NCBLIT_4x2;
|
|
||||||
}
|
|
||||||
if(scale == NCSCALE_NONE || scale == NCSCALE_SCALE){
|
if(scale == NCSCALE_NONE || scale == NCSCALE_SCALE){
|
||||||
return NCBLIT_2x1;
|
return NCBLIT_2x1;
|
||||||
}
|
}
|
||||||
|
if(tcache->caps.octants){
|
||||||
|
return NCBLIT_4x2;
|
||||||
|
}
|
||||||
if(tcache->caps.sextants){
|
if(tcache->caps.sextants){
|
||||||
return NCBLIT_3x2;
|
return NCBLIT_3x2;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user