Trait piston_window::Colored[][src]

pub trait Colored {
    pub fn mul_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self;
pub fn hue_rad(self, angle: f32) -> Self; pub fn tint(self, f: f32) -> Self { ... }
pub fn shade(self, f: f32) -> Self { ... }
pub fn hue_deg(self, angle: f32) -> Self { ... } }

Implemented by contexts that contains color.

Required methods

pub fn mul_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self[src]

Multiplies with red, green, blue and alpha values.

pub fn hue_rad(self, angle: f32) -> Self[src]

Rotates hue by radians.

Loading content...

Provided methods

pub fn tint(self, f: f32) -> Self[src]

Mixes the current color with white.

0 is black and 1 is white.

pub fn shade(self, f: f32) -> Self[src]

Mixes the current color with black.

0 is white and 1 is black.

pub fn hue_deg(self, angle: f32) -> Self[src]

Rotates hue by degrees.

Loading content...

Implementations on Foreign Types

impl Colored for [f32; 4][src]

Loading content...

Implementors

impl Colored for Ellipse[src]

impl Colored for Line[src]

impl Colored for Rectangle[src]

Loading content...