# CompositionRadialGradientBrush

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/brushes/struct-compositionradialgradientbrush/

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

```rust
struct CompositionRadialGradientBrush
```

A composition brush that paints with a radial gradient.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L853)

## Members

- [`from_brush`](#function-from_brush)
- [`center`](#function-center)
- [`set_center`](#function-set_center)
- [`gradient_origin`](#function-gradient_origin)
- [`set_gradient_origin`](#function-set_gradient_origin)
- [`radius_x`](#function-radius_x)
- [`set_radius_x`](#function-set_radius_x)
- [`radius_y`](#function-radius_y)
- [`set_radius_y`](#function-set_radius_y)
- [`radius`](#function-radius)
- [`ellipse_center`](#function-ellipse_center)
- [`set_ellipse_center`](#function-set_ellipse_center)
- [`ellipse_radius`](#function-ellipse_radius)
- [`set_ellipse_radius`](#function-set_ellipse_radius)
- [`gradient_origin_offset`](#function-gradient_origin_offset)
- [`set_gradient_origin_offset`](#function-set_gradient_origin_offset)

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

### from_brush

```rust
fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionRadialGradientBrush>
```

The handle of `brush` as this class, if it is one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L853)

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

### center

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L862)

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

### set_center

```rust
fn set_center(self: &Self, value: RelativePoint)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L866)

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

### gradient_origin

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L870)

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

### set_gradient_origin

```rust
fn set_gradient_origin(self: &Self, value: RelativePoint)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L874)

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

### radius_x

```rust
fn radius_x(self: &Self) -> RelativeScalar
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L878)

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

### set_radius_x

```rust
fn set_radius_x(self: &Self, value: RelativeScalar)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L882)

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

### radius_y

```rust
fn radius_y(self: &Self) -> RelativeScalar
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L886)

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

### set_radius_y

```rust
fn set_radius_y(self: &Self, value: RelativeScalar)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L890)

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

### radius

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_brush.rs#L894)

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

### ellipse_center

```rust
fn ellipse_center(self: &Self) -> Vector
```

`EllipseCenter`: the centre of the ellipse, the upstream
`center`, in the unit of the mapping mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L223)

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

### set_ellipse_center

```rust
fn set_ellipse_center(self: &Self, value: Vector)
```

Sets the centre; the gradient origin moves with it, keeping
`gradient_origin_offset`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L229)

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

### ellipse_radius

```rust
fn ellipse_radius(self: &Self) -> Vector
```

`EllipseRadius`: the radii of the ellipse, the upstream
`radius_x` and `radius_y`, in the
unit of the mapping mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L239)

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

### set_ellipse_radius

```rust
fn set_ellipse_radius(self: &Self, value: Vector)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L243)

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

### gradient_origin_offset

```rust
fn gradient_origin_offset(self: &Self) -> Vector
```

`GradientOriginOffset`: where the gradient starts relative to the
centre of the ellipse; the upstream
`gradient_origin` is the centre plus this
offset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L253)

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

### set_gradient_origin_offset

```rust
fn set_gradient_origin_offset(self: &Self, value: Vector)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/brushes/composition_gradient_winui.rs#L257)

## 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`

## Availability

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