Struct insa::Insa

source ·
pub struct Insa { /* private fields */ }
Expand description

The main interface to image to text converion

Implementations§

Initialize using just space brush, no fixed background.

Initialize using well known round chars on dark background

Initialize using well known round chars on dark background

Initialize using well known block drawing elements and using background

Load additional brushes from a font

let font = include_bytes!("../docs/unifont-15.0.01.ttf");
let font = fontdue::Font::from_bytes(font.as_ref(), fontdue::FontSettings::default())
 .expect("tried and tested included font");
let mut insa = insa::Insa::default();
insa.load_brushes(&font, ".oO8°");
println!("{insa:?}")

ref access the internal brush map

Mut access internal brush map

Does Insa invert dark/light?

Mut access to - does Insa invert dark/light?

Should Insa invert dark/light?

Does Insa invert dark/light?

Mut access to - does Insa invert dark/light?

Should Insa invert dark/light?

The width of the brush in pixels

The height of the brush in pixels

Convert a raster bitmap image to text. The returned iterator reveals the number of text columns and rows

Convert a single symbol, assuming position 0,0 and the symbol width and height for input

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.