Trait libnotcurses_sys::NcChannelMethods [−][src]
pub trait NcChannelMethods {}Show methods
fn new() -> Self; fn default() -> Self; fn from_rgb(rgb: NcRgb) -> Self; fn from_rgb_alpha(rgb: NcRgb, alpha: NcAlphaBits) -> Self; fn from_rgb8(r: NcComponent, g: NcComponent, b: NcComponent) -> Self; fn from_rgb8_alpha(
r: NcComponent,
g: NcComponent,
b: NcComponent,
alpha: NcAlphaBits
) -> Self; fn fcombine(&self, bchannel: NcChannel) -> NcChannels; fn bcombine(&self, fchannel: NcChannel) -> NcChannels; fn alpha(&self) -> NcAlphaBits; fn set_alpha(&mut self, alpha: NcAlphaBits) -> Self; fn rgb(&self) -> NcRgb; fn set(&mut self, rgb: NcRgb) -> Self; fn rgb8(&self) -> (NcComponent, NcComponent, NcComponent); fn set_rgb8(
&mut self,
r: NcComponent,
g: NcComponent,
b: NcComponent
) -> Self; fn r(&self) -> NcComponent; fn g(&self) -> NcComponent; fn b(&self) -> NcComponent; fn set_r(&mut self, r: NcComponent) -> Self; fn set_g(&mut self, g: NcComponent) -> Self; fn set_b(&mut self, b: NcComponent) -> Self; fn default_p(&self) -> bool; fn set_default(&mut self) -> Self; fn set_not_default(&mut self) -> Self; fn palindex_p(&self) -> bool;
Expand description
Enables the NcChannel
methods.
Required methods
fn from_rgb_alpha(rgb: NcRgb, alpha: NcAlphaBits) -> Self
[src]fn from_rgb8(r: NcComponent, g: NcComponent, b: NcComponent) -> Self
[src]fn from_rgb8_alpha(
r: NcComponent,
g: NcComponent,
b: NcComponent,
alpha: NcAlphaBits
) -> Self
[src]fn fcombine(&self, bchannel: NcChannel) -> NcChannels
[src]fn bcombine(&self, fchannel: NcChannel) -> NcChannels
[src]fn alpha(&self) -> NcAlphaBits
[src]fn set_alpha(&mut self, alpha: NcAlphaBits) -> Self
[src]fn rgb8(&self) -> (NcComponent, NcComponent, NcComponent)
[src]fn set_rgb8(&mut self, r: NcComponent, g: NcComponent, b: NcComponent) -> Self
[src]fn r(&self) -> NcComponent
[src]fn g(&self) -> NcComponent
[src]fn b(&self) -> NcComponent
[src]fn set_r(&mut self, r: NcComponent) -> Self
[src]fn set_g(&mut self, g: NcComponent) -> Self
[src]fn set_b(&mut self, b: NcComponent) -> Self
[src]fn set_default(&mut self) -> Self
[src]fn set_not_default(&mut self) -> Self
[src]fn palindex_p(&self) -> bool
[src]Implementors
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().