Function libnotcurses_sys::ffi::ncvisual_blitter_geom [−][src]
pub unsafe extern "C" fn ncvisual_blitter_geom(
nc: *const notcurses,
n: *const ncvisual,
vopts: *const ncvisual_options,
y: *mut c_int,
x: *mut c_int,
scaley: *mut c_int,
scalex: *mut c_int,
blitter: *mut ncblitter_e
) -> c_int
Expand description
Get the size and ratio of ncvisual pixels to output cells along the y and x axes. The input size (in pixels) will be written to ‘y’ and ‘x’. The scaling will be written to ‘scaley’ and ‘scalex’. With these: rows = (y / scaley) + !!(y % scaley) or (y + scaley - 1) / scaley cols = (x / scalex) + !!(x % scalex) or (x + scalex - 1) / scalex Returns non-zero for an invalid ‘vopts’. The blitter that will be used is returned in ‘*blitter’.