# Trait cairo::Gradient [−] [src]

    pub trait Gradient: Pattern {
        fn add_color_stop_rgb(&self, offset: f64, red: f64, green: f64, blue: f64) { ... }
        fn add_color_stop_rgba(
            &self,
            offset: f64,
            red: f64,
            green: f64,
            blue: f64,
            alpha: f64
        ) { ... }
        fn get_color_stop_count(&self) -> isize { ... }
        fn get_color_stop_rgba(&self, index: isize) -> (f64, f64, f64, f64, f64) { ... }
    }

## Provided Methods

### `fn add_color_stop_rgb(&self, offset: f64, red: f64, green: f64, blue: f64)`

### `fn add_color_stop_rgba(
&self,
offset: f64,
red: f64,
green: f64,
blue: f64,
alpha: f64
)`

### `fn get_color_stop_count(&self) -> isize`

### `fn get_color_stop_rgba(&self, index: isize) -> (f64, f64, f64, f64, f64)`

## Implementors

- `impl Gradient for LinearGradient`
- `impl Gradient for RadialGradient`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)