# CrossFadeEffect

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

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

```rust
struct CrossFadeEffect
```

Blends two sources by a weight (Win2D `CrossFadeEffect`): `source1` at
weight 0, `source2` at weight 1. Animatable: `Weight` (also as
`CrossFade`, the name of the Win2D member).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L287)

## Members

- [`name`](#struct_field-name)
- [`weight`](#struct_field-weight)
- [`source1`](#struct_field-source1)
- [`source2`](#struct_field-source2)

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

### name

```rust
name: String
```

The name of the effect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L289)

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

### weight

```rust
weight: f32
```

The weight of `source2`, 0 to 1 (default 0.5).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L291)

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

### source1

```rust
source1: Option<GraphicsEffectSource>
```

The input shown at weight 0.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L293)

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

### source2

```rust
source2: Option<GraphicsEffectSource>
```

The input shown at weight 1.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L295)

## 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`
- `From<CrossFadeEffect>`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`

## Availability

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