Struct kansas::color::Rgb [−][src]
pub struct Rgb(_, _, _);
internal representation of a solid color value
Methods
impl Rgb
[src]
impl Rgb
pub fn blend_alpha(self, a: f32) -> Self
[src]
pub fn blend_alpha(self, a: f32) -> Self
compute alpha
pub fn mix(self, other: Self, weight: f32) -> Self
[src]
pub fn mix(self, other: Self, weight: f32) -> Self
mix two colors together with a certain weight
this is a linear mix. 0xFF0000
mixed with 0x00FF00
at a weight of
0.5
is 0x808000
.
Trait Implementations
impl Debug for Rgb
[src]
impl Debug for Rgb
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Rgb
[src]
impl Copy for Rgb
impl Clone for Rgb
[src]
impl Clone for Rgb
fn clone(&self) -> Rgb
[src]
fn clone(&self) -> Rgb
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Rgb
[src]
impl PartialEq for Rgb
fn eq(&self, other: &Rgb) -> bool
[src]
fn eq(&self, other: &Rgb) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rgb) -> bool
[src]
fn ne(&self, other: &Rgb) -> bool
This method tests for !=
.
impl PartialOrd for Rgb
[src]
impl PartialOrd for Rgb
fn partial_cmp(&self, other: &Rgb) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Rgb) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rgb) -> bool
[src]
fn lt(&self, other: &Rgb) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rgb) -> bool
[src]
fn le(&self, other: &Rgb) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rgb) -> bool
[src]
fn gt(&self, other: &Rgb) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rgb) -> bool
[src]
fn ge(&self, other: &Rgb) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Add for Rgb
[src]
impl Add for Rgb
type Output = Rgb
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
fn add(self, rhs: Self) -> Self::Output
Performs the +
operation.
impl Default for Rgb
[src]
impl Default for Rgb
impl CanvasColor for Rgb
[src]
impl CanvasColor for Rgb