Struct webrender_api::ColorF [] [src]

#[repr(C)]
pub struct ColorF { pub r: f32, pub g: f32, pub b: f32, pub a: f32, }

Represents RGBA screen colors with floating point numbers.

All components must be between 0.0 and 1.0. An alpha value of 1.0 is opaque while 0.0 is fully transparent.

Fields

Methods

impl ColorF
[src]

[src]

Constructs a new ColorF from its components.

[src]

Multiply the RGB channels (but not alpha) with a given factor.

[src]

[src]

Multiply the RGB components with the alpha channel.

Trait Implementations

impl Clone for ColorF
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for ColorF
[src]

impl Debug for ColorF
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for ColorF
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl From<ColorF> for ColorU
[src]

[src]

Performs the conversion.

impl From<ColorU> for ColorF
[src]

[src]

Performs the conversion.