Trait graphics::Colored [−][src]
pub trait Colored: Sized { fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self; fn hue_rad(self, angle: ColorComponent) -> Self; fn tint(self, f: ColorComponent) -> Self { ... } fn shade(self, f: ColorComponent) -> Self { ... } fn hue_deg(self, angle: ColorComponent) -> Self { ... } }
Implemented by contexts that contains color.
Required methods
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
Multiplies with red, green, blue and alpha values.
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
Rotates hue by radians.
Provided methods
fn tint(self, f: ColorComponent) -> Self
[src]
Mixes the current color with white.
0 is black and 1 is white.
fn shade(self, f: ColorComponent) -> Self
[src]
Mixes the current color with black.
0 is white and 1 is black.
fn hue_deg(self, angle: ColorComponent) -> Self
[src]
Rotates hue by degrees.
Implementors
impl Colored for Ellipse
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
impl Colored for Line
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
impl Colored for Rectangle
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
fn hue_rad(self, angle: ColorComponent) -> Self
[src]
impl Colored for Color
[src]
fn mul_rgba(
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self
[src]
self,
r: ColorComponent,
g: ColorComponent,
b: ColorComponent,
a: ColorComponent
) -> Self