Struct tcod::colors::Color
[−]
[src]
#[repr(C)]pub struct Color { pub r: u8, pub g: u8, pub b: u8, }
Fields
r: u8
g: u8
b: u8
Methods
impl Color
[src]
fn new(r: u8, g: u8, b: u8) -> Color
fn new_from_hsv(h: f32, s: f32, v: f32) -> Color
fn hsv(self) -> (f32, f32, f32)
fn shift_hue(self, shift: f32) -> Color
fn scale_hsv(self, scale: f32, value: f32) -> Color
Trait Implementations
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Color
[src]
impl Default for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
This method tests for !=
.
impl AsNative<TCOD_color_t> for Color
[src]
unsafe fn as_native(&self) -> &TCOD_color_t
impl FromNative<TCOD_color_t> for Color
[src]
unsafe fn from_native(input: TCOD_color_t) -> Color
impl Add<Color> for Color
[src]
type Output = Color
The resulting type after applying the +
operator
fn add(self, rhs: Color) -> Color
The method for the +
operator
impl Sub<Color> for Color
[src]
type Output = Color
The resulting type after applying the -
operator
fn sub(self, rhs: Color) -> Color
The method for the -
operator
impl Mul<Color> for Color
[src]
type Output = Color
The resulting type after applying the *
operator
fn mul(self, rhs: Color) -> Color
The method for the *
operator
impl Mul<f32> for Color
[src]
type Output = Color
The resulting type after applying the *
operator
fn mul(self, rhs: f32) -> Color
The method for the *
operator