# IGradientStop

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/trait-igradientstop/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait IGradientStop: 'static
```

Describes the location and color of a transition point in a gradient.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_gradient_stop.rs#L7)

## Members

- [`color`](#function-color)
- [`offset`](#function-offset)
- [`as_composition_gradient_stop`](#function-as_composition_gradient_stop)
- [`is_immutable_gradient_stop`](#function-is_immutable_gradient_stop)

<a id="function-color"></a>

### color

```rust
fn color(self: &Self) -> Color
```

The gradient stop color.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_gradient_stop.rs#L9)

<a id="function-offset"></a>

### offset

```rust
fn offset(self: &Self) -> f64
```

The gradient stop offset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_gradient_stop.rs#L12)

<a id="function-as_composition_gradient_stop"></a>

### as_composition_gradient_stop

```rust
fn as_composition_gradient_stop(self: &Self) -> Option<&crate::rendering::composition::CompositionGradientStop>
```

The stop as a composition gradient stop, if it is one (the `is
CompositionGradientStop` test of upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_gradient_stop.rs#L16)

<a id="function-is_immutable_gradient_stop"></a>

### is_immutable_gradient_stop

```rust
fn is_immutable_gradient_stop(self: &Self) -> bool
```

Whether the stop is an `ImmutableGradientStop`
(the `as ImmutableGradientStop` test of upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_gradient_stop.rs#L22)

## Trait implementations

- [`IGradientStop`](/docs/0.5.0/api/ferroui-base/media/trait-igradientstop/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
