#[repr(u32)]
#[non_exhaustive]
pub enum NcBlitter {
    Default,
    Ascii,
    Half,
    Quadrant,
    Sextant,
    Braille,
    Pixel,
    _4x1,
    _8x1,
}
Expand description

The blitter mode to use for rasterizing an NcVisual.

We never blit full blocks, but instead spaces (more efficient) with the background set to the desired foreground.

Default

NcBlitter::Default

Degradation

There is a mechanism of graceful degradation, that works as follows:

If you don’t want this behaviour you have to set the NcVisualFlag::NoDegrade on NcVisualOptions or call degrade(false) on NcVisualOptionsBuilder.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Default

§

Ascii

Blitter mode using only spaces, compatible with ASCII (1x1).

§

Half

Blitter mode using halves + Ascii (2x1). ▄▀

§

Quadrant

Blitter mode using quadrants + Half (2x2). ▗▐ ▖▀▟▌▙

§

Sextant

Blitter mode using sextants + Quadrant (3x2). 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧🬨🬩🬪🬫🬬🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻

§

Braille

Blitter mode using braille (4x2). ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿

§

Pixel

Blitter mode using Pixels/Sixels.

§

_4x1

NcBlitter mode using: four vertical levels (4x1). █▆▄▂

§

_8x1

NcBlitter mode using: eight vertical levels (8x1). █▇▆▅▄▃▂▁

Implementations§

The number of height subdivisions in a cell using the current blitter.

Default & Pixel returns None.

The number of width subdivisions in a cell using the current blitter.

Default & Pixel returns None.

The inner Cell’s dimensions (height, width) using the current blitter.

Default & Pixel returns None.

Blits a flat array data of NcRgba values to the NcPlane that must be configured in vopts.

The blit begins at vopts.y and vopts.x relative to the plane.

Each source row ought occupy line_size bytes (this might be greater than vopts.lenx * 4 due to padding or partial blits).

A subregion of the input can be specified with the begy×begx and leny×lenx fields from vopts.

Returns the number of pixels blitted on success.

C style function: ncblit_rgba().

Like blit_rgba, but for BGRx.

C style function: ncblit_bgrx().

Like blit_rgba, but for RGB.

line_size must be a multiple of 3 for this RGB data.

Supply an alpha value to be applied throughout.

C style function: ncblit_rgb_packed().

Like blit_rgb_packed, but line_size must be a multiple of 4 for this RGBx data.

Supply an alpha value to be applied throughout.

C style function: ncblit_rgb_loose().

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
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.