pub type NcVisualOptions = ncvisual_options;Expand description
Options struct for NcVisual.
It is recommended to construct it via NcVisualOptionsBuilder
by calling NcVisualOptions::builder().
§Usage
If a plane is not provided, one will be created, having the exact size
necessary to display the visual (this might be smaller or larger than
the rendering area). if ChildPlane is provided, this will be
interpreted as the parent.
A subregion of the visual can be rendered using beg_y, beg_x, len_y,
and len_x.
§Fields
-
scaling: anNcScaleindicating how the source will be stretched/scaled relative to theNcPlane. -
y: if anNcPlaneis provided innthen this specifies where theNcVisualwill be on that plane.Otherwise it specifies where the created
NcPlanewill be placed relative to the standard plane’s origin.If
VerAlignedis set, this will be interpreted as anNcAlignvalue. -
x: if anNcPlaneis provided innthen this specifies where theNcVisualwill be on that plane.Otherwise it specifies where the created
NcPlanewill be placed relative to the standard plane’s origin.If
HorAlignedis set, this will be interpreted as anNcAlignvalue. -
begy: origin of rendered section in the y axis. -
begx: origin of rendered section in the x axis. -
leny: length of rendered section in the y axis. -
lenx: length of rendered section in the x axis. -
transcolor: treats this color as transparent when theAddAlphaflag is active. -
pxoffy: pixel offset within the cell in the y axis.If
NcBlitter::Pixelis used the bitmap will be drawn offset from the upper-left cell’s origin by these amounts, otherwise this will be ignored.It is an error if either number exceeds the cell-pixel geometry in any dimension (see
NcPixelGeometry.cell_y,NcVisualGeometry.cdim_yx). -
pxoffx: pixel offset within the cell in the x axis.If
NcBlitter::Pixelis used, the bitmap will be drawn offset from the upper-left cell’s origin by these amounts, otherwise this will be ignored.It is an error if either number exceeds the cell-pixel geometry in any dimension (see
NcPixelGeometry.cell_x,NcVisualGeometry.cdim_yx).
Aliased Type§
#[repr(C)]pub struct NcVisualOptions {}Fields§
§n: *mut ncplaneif 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). if NCVISUAL_OPTION_CHILDPLANE is provided, this must be non-NULL, and will be interpreted as the parent.
scaling: u32the scaling is ignored if no ncplane is provided (it ought be NCSCALE_NONE in this case). otherwise, the source is stretched/scaled relative to the provided ncplane.
y: i32if an ncplane is provided, y and x specify where the visual will be rendered on that plane. otherwise, they specify where the created ncplane will be placed relative to the standard plane’s origin. x is an ncalign_e value if NCVISUAL_OPTION_HORALIGNED is provided. y is an ncalign_e if NCVISUAL_OPTION_VERALIGNED is provided.
x: i32if an ncplane is provided, y and x specify where the visual will be rendered on that plane. otherwise, they specify where the created ncplane will be placed relative to the standard plane’s origin. x is an ncalign_e value if NCVISUAL_OPTION_HORALIGNED is provided. y is an ncalign_e if NCVISUAL_OPTION_VERALIGNED is provided.
begy: u32origin of rendered region in pixels
begx: u32origin of rendered region in pixels
leny: u32size of rendered region in pixels
lenx: u32size of rendered region in pixels
blitter: u32glyph set to use (maps input to output cells)
flags: u64bitmask over NCVISUAL_OPTION_*
transcolor: u32treat this color as transparent under NCVISUAL_OPTION_ADDALPHA
pxoffy: u32pixel offsets within the cell. if NCBLIT_PIXEL is used, the bitmap will be drawn offset from the upper-left cell’s origin by these amounts. it is an error if either number exceeds the cell-pixel geometry in its dimension. if NCBLIT_PIXEL is not used, these fields are ignored. this functionality can be used for smooth bitmap movement.
pxoffx: u32pixel offsets within the cell. if NCBLIT_PIXEL is used, the bitmap will be drawn offset from the upper-left cell’s origin by these amounts. it is an error if either number exceeds the cell-pixel geometry in its dimension. if NCBLIT_PIXEL is not used, these fields are ignored. this functionality can be used for smooth bitmap movement.