@ -24,7 +24,7 @@
//W ncvisual_subtitle
//W ncvisual_subtitle
#[ allow(unused_imports) ] // for the doc comments
#[ allow(unused_imports) ] // for the doc comments
use crate ::{ NcChannel , Nc Rgb} ;
use crate ::{ NcChannel , Nc Dim, Nc Rgb} ;
mod methods ;
mod methods ;
@ -110,7 +110,7 @@ pub const NCVISUAL_OPTION_ADDALPHA: u32 = crate::bindings::ffi::NCVISUAL_OPTION_
/// Uses [`NCCELL_ALPHA_BLEND`][crate::NCCELL_ALPHA_BLEND] with visual.
/// Uses [`NCCELL_ALPHA_BLEND`][crate::NCCELL_ALPHA_BLEND] with visual.
pub const NCVISUAL_OPTION_BLEND : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_BLEND ;
pub const NCVISUAL_OPTION_BLEND : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_BLEND ;
/// Fails rather than degrade.
/// Fails rather than gracefully degrade. See [NcBlitter] .
pub const NCVISUAL_OPTION_NODEGRADE : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_NODEGRADE ;
pub const NCVISUAL_OPTION_NODEGRADE : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_NODEGRADE ;
/// Y is an alignment, not absolute.
/// Y is an alignment, not absolute.
@ -118,3 +118,83 @@ pub const NCVISUAL_OPTION_VERALIGNED: u32 = crate::bindings::ffi::NCVISUAL_OPTIO
/// X is an alignment, not absolute.
/// X is an alignment, not absolute.
pub const NCVISUAL_OPTION_HORALIGNED : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_HORALIGNED ;
pub const NCVISUAL_OPTION_HORALIGNED : u32 = crate ::bindings ::ffi ::NCVISUAL_OPTION_HORALIGNED ;
/// Blitter Mode (`NCBLIT_*`)
///
/// We never blit full blocks, but instead spaces (more efficient) with the
/// background set to the desired foreground.
///
/// ## Modes
///
/// - [`NCBLIT_1x1`]
/// - [`NCBLIT_2x1`]
/// - [`NCBLIT_2x2`]
/// - [`NCBLIT_3x2`]
/// - [`NCBLIT_4x1`]
/// - [`NCBLIT_8x1`]
/// - [`NCBLIT_BRAILLE`]
/// - [`NCBLIT_DEFAULT`]
/// - [`NCBLIT_PIXEL`]
///
/// There is a mechanism of graceful degradation, that works as follows:
/// - without braille support, NCBLIT_BRAILLE decays to NCBLIT_3x2
/// - without bitmap support, NCBLIT_PIXEL decays to NCBLIT_3x2
/// - without sextant support, NCBLIT_3x2 decays to NCBLIT_2x2
/// - without quadrant support, NCBLIT_2x2 decays to NCBLIT_2x1
/// - the only viable blitters in ASCII are NCBLIT_1x1 and NCBLIT_PIXEL
///
/// If you don't want this behaviour you have to use [NCVISUAL_OPTION_NODEGRADE]
///
pub type NcBlitter = crate ::bindings ::ffi ::ncblitter_e ;
/// [`NcBlitter`] mode using: space, compatible with ASCII
pub const NCBLIT_1x1 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_1x1 ;
/// [`NcBlitter`] mode using: halves + 1x1 (space)
/// ▄▀
pub const NCBLIT_2x1 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_2x1 ;
/// [`NcBlitter`] mode using: quadrants + 2x1
/// ▗▐ ▖▀▟▌▙
pub const NCBLIT_2x2 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_2x2 ;
/// [`NcBlitter`] mode using: sextants
/// 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧🬨🬩🬪🬫🬬🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻
pub const NCBLIT_3x2 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_3x2 ;
/// [`NcBlitter`] mode using: four vertical levels
/// █▆▄▂
pub const NCBLIT_4x1 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_4x1 ;
/// [`NcBlitter`] mode using: eight vertical levels
/// █▇▆▅▄▃▂▁
pub const NCBLIT_8x1 : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_8x1 ;
/// [`NcBlitter`] mode using: 4 rows, 2 cols (braille)
/// ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
pub const NCBLIT_BRAILLE : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_BRAILLE ;
/// [`NcBlitter`] mode where the blitter is automatically chosen
pub const NCBLIT_DEFAULT : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_DEFAULT ;
/// Sixel/Pixel mode
///
/// NCBLIT_PIXEL
///
/// See [Sixel in Wikipedia](https://en.wikipedia.org/wiki/Sixel).
pub const NCBLIT_PIXEL : NcBlitter = crate ::bindings ::ffi ::ncblitter_e_NCBLIT_PIXEL ;
/// Contains the pixel geometry information as returned by the
/// NcPlane.[pixelgeom()][crate::NcPlane#method.pixelgeom] method.
///
/// If bitmaps are not supported, the fields `max_bitmap_*` will be 0.
#[ derive(Clone, Debug) ]
pub struct NcPixelGeometry {
/// Geometry of the display region
pub display_y : NcDim ,
pub display_x : NcDim ,
pub cell_y : NcDim ,
pub cell_x : NcDim ,
pub max_bitmap_y : NcDim ,
pub max_bitmap_x : NcDim ,
}