# SpotlightShaderEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/library/struct-spotlightshadereffect/

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

```rust
struct SpotlightShaderEffect
```

A coloured light screened over the content (Effector's
`SpotlightShaderEffect`): around the point (`center-x`, `center-y`) of the
area (fractions of its width and height, clamped to 0..1), fading linearly
to nothing at the distance `radius` (a fraction of the area, measured in
the fractions of each axis, clamped to 0.05..1), the colour at the opacity
`strength` (clamped to 0..1) times its own at the centre, times the alpha
of the content.

`spotlight(center-x=0.55, center-y=0.4, radius=0.42, strength=0.35,
color=#FFD26B)`. An overlay shader effect with the blend mode `Screen`,
masked by the content; a strength of 0 (the neutral value) leaves the
content unchanged.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L440)

## Members

- [`center_x`](#struct_field-center_x)
- [`center_y`](#struct_field-center_y)
- [`radius`](#struct_field-radius)
- [`strength`](#struct_field-strength)
- [`color`](#struct_field-color)

<a id="struct_field-center_x"></a>

### center_x

```rust
center_x: f64
```

The horizontal position of the centre, 0 (left) to 1 (right) (default
0.55).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L443)

<a id="struct_field-center_y"></a>

### center_y

```rust
center_y: f64
```

The vertical position of the centre, 0 (top) to 1 (bottom) (default
0.4).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L446)

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

### radius

```rust
radius: f64
```

Where the light ends, a fraction of the area (default 0.42).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L448)

<a id="struct_field-strength"></a>

### strength

```rust
strength: f64
```

The opacity of the light at its centre, 0 to 1 (default 0.35).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L450)

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

### color

```rust
color: crate::media::Color
```

The colour of the light (default #FFD26B).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L452)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- [`CustomEffect`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffect/)

## Availability

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