pub struct NcVisualOptionsBuilder<'ncplane> { /* private fields */ }
Expand description

Builder object for NcVisualOptions.

Can be constructed by calling NcVisualOptions::builder().

Implementations

Sets the NcPlane where the blitting will be done.

This NcPlane could also be considered the parent of a new plane where the blitting will occur by utilizing the child method.

When no NcPlane is provided, one will be created using the exact size necessary to render the source with perfect fidelity (this might be smaller or larger than the rendering area).

Default: None (no plane).

See also: parent, child, no_plane.

If true, a plane must also be provided, which will be the parent of a new child NcPlane into which the blitting will be done.

If false, the blitting will occur in the provided plane, if any, or in a newly created NcPlane otherwise.

Default: false (no child plaane).

Effect: Sets the CHILDPLANE flag.

See also: plane, parent.

Sets the NcPlane that will be the parent of a new NcPlane where the blitting will be done.

This is the same as calling both plane and child.

See also: plane, child.

Unsets the NcPlane.

Effect: unsets the plane & the CHILDPLANE flag.

Default: None (no plane).

Sets the NcScale.

Default: NcScale::NOSCALE.

Sets the vertical placement.

Default: 0.

Effect: Sets the y coordinate, and unsets the VerAligned flag.

Sets the horizontal placement.

Default: 0.

Effect: Sets the x coordinate, and unsets the HorAligned flag.

Sets the vertical & horizontal placement.

Default: (0, 0).

Effect: Sets the y & x coordinates and unsets the VerAligned & HorAligned flags.

Sets the vertical alignment.

Default: NcAlign::Top.

Effect: Sets the y alignment and the VerAligned flag.

Sets the horizontal alignment.

Default: NcAlign::Left.

Effect: Sets the x alignment and the VerAligned flag.

Sets the vertical & horizontal alignments.

Default: (NcAlign::Top, NcAlign::Left).

Effect: Sets the y & x alignments and the VerAligned flag.

Choose the NcBlitter.

Default: NcBlitter::Default.

Choose NcBlitter::Pixel for the blitter.

Choose the color to be considered transparent, or None.

Default: none.

Efect: (Un)Sets the transparent color, and the ADDALPHA flag.

Choose whether to use NcAlpha::BLEND with the NcVisual, so that the foreground or background colors can be a composite between a color and the corresponding colors underneath it.

Default: false (no blend).

Effect: Sets the BLEND flag.

Choose between gracefully degrading the blitter, or fail if the choosen NcBlitter is not supported by the terminal.

Default: true (degrades).

Effect: Sets the NODEGRADE flag.

See also: the rules of degradation.

Sets the NOINTERPOLATE flag.

Default: true (interpolates).

Sets the region to be rendered.

(start_y, start_x, len_y, len_x)

Sets the pixel offset within the NcCell.

Finishes the building and returns NcVisualOptions.

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 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.