Type Definition libnotcurses_sys::NcChannel [−][src]
type NcChannel = u32;
Expand description
32 bits of context-dependent info containing RGB + 2 bits of alpha + extra
It is:
- a 24-bit
NcRgb
value - plus 8 bits divided in:
- 2 bits of
NcAlphaBits
- 6 bits of context-dependent info
- 2 bits of
The context details are documented in NcChannels
Diagram
~~AA~~~~ RRRRRRRR GGGGGGGG BBBBBBBB
type in C: channel (uint32_t)
Trait Implementations
New NcChannel
, expects NcRgb
& NcAlphaBits
.
New NcChannel
, expects three RGB NcComponent
components.
fn from_rgb8_alpha(
r: NcComponent,
g: NcComponent,
b: NcComponent,
alpha: NcAlphaBits
) -> Self
[src]
fn from_rgb8_alpha(
r: NcComponent,
g: NcComponent,
b: NcComponent,
alpha: NcAlphaBits
) -> Self
[src]New NcChannel
, expects three RGB NcComponent
components & NcAlphaBits
.
Combines this NcChannel
as foreground, with another as background
into an NcChannels
.
C style function: channels_combine().
Combines this NcChannel
as background, with another as foreground
into an NcChannels
.
C style function: channels_combine().
Gets the NcAlphaBits
.
C style function: channel_alpha().
Sets the NcAlphaBits
.
C style function: channel_set_alpha().
Gets the NcRgb
.
C style function: channel_rgb().
Sets the NcRgb
, and marks the NcChannel as NOT using the
“default color”, retaining the other bits unchanged.
C style function: channel_set().
Gets the three NcComponent
s.
C style function: channel_rgb8().
Sets the three NcComponent
s, and
marks the NcChannel as NOT using the “default color”.
C style function: channel_set_rgb8().
Gets the red NcComponent
.
C style function: channel_r().
Gets the green NcComponent
.
C style function: channel_g().
Gets the blue NcComponent
.
C style function: channel_b().
Sets the red NcComponent
, and returns the new NcChannel
.
C style function: channel_set_r().
Sets the green NcComponent
, and returns the new NcChannel
.
C style function: channel_set_g().
Sets the blue NcComponent
, and returns the new NcChannel
.
C style function: channel_set_b().
Is this NcChannel
using the “default color” rather than RGB/palette-indexed?
C style function: channel_default_p().
Marks this NcChannel
as using its “default color”,
which also marks it opaque.
C style function: channel_set_default().
Marks this NcChannel
as not using its “default color”.
The following methods also marks the channel as NOT using the “default color”:
C style function: channel_set_not_default().
Is this NcChannel using palette-indexed color rather than RGB?
C style function: channel_set_default().