Struct nanovg::Color [] [src]

pub struct Color(_);

A 32-bit color value. Used to fill or stroke paths with solid color.

Methods

impl Color
[src]

[src]

Create a new color by setting all components manually. Values are in the range 0.0...1.0.

[src]

Create a new color from three 8-bit color channels.

[src]

Create a new color from three 8-bit color channels and an 8-bit alpha channel.

[src]

Create a new color from three hsl channels.

[src]

Create a new color from three hsl channels and an 8-bit alpha channel.

[src]

Get the red component.

[src]

Get the green component.

[src]

Get the blue component.

[src]

Get the alpha component.

[src]

Set the red component.

[src]

Get the green component.

[src]

Get the blue component.

[src]

Get the alpha component.

[src]

Create a new color by linearly interpolating between two existing colors.

Trait Implementations

impl Clone for Color
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Color
[src]

impl Debug for Color
[src]

[src]

Formats the value using the given formatter. Read more

impl Paint for Color
[src]

[src]

[src]

Auto Trait Implementations

impl Send for Color

impl Sync for Color