# ImmutableConicGradientBrush

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/immutable/struct-immutableconicgradientbrush/

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

```rust
struct ImmutableConicGradientBrush
```

A brush that draws with a sweep gradient.

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

## Members

- [`new`](#function-new)
- [`from_stops`](#function-from_stops)
- [`from_brush`](#function-from_brush)
- [`center`](#function-center)
- [`angle`](#function-angle)

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

### new

```rust
fn new(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, center: Option<RelativePoint>, angle: f64, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
```

Creates a brush. `transform_origin` defaults to the top left corner
and `center` to the center.

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

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

### from_stops

```rust
fn from_stops(gradient_stops: &[ImmutableGradientStop]) -> Self
```

Creates a fully opaque brush with the given stops and default values
for everything else.

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

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

### from_brush

```rust
fn from_brush(source: &ConicGradientBrush) -> Self
```

Creates an immutable copy of `source`.

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

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

### center

```rust
fn center(self: &Self) -> RelativePoint
```

The center point for the gradient.

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

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

### angle

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

The starting angle of the gradient's sweep, in degrees.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`
- [`IBrush`](/docs/0.5.0/api/ferroui-base/media/trait-ibrush/)
- [`IGradientBrush`](/docs/0.5.0/api/ferroui-base/media/trait-igradientbrush/)
- [`IImmutableBrush`](/docs/0.5.0/api/ferroui-base/media/trait-iimmutablebrush/)
- [`IConicGradientBrush`](/docs/0.5.0/api/ferroui-base/media/trait-iconicgradientbrush/)

## Availability

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